diff --git a/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java b/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
index e12468a3..33296232 100644
--- a/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
+++ b/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
@@ -313,7 +313,7 @@ public class BaseInvoiceController extends AbstractController {
if (!"99".equals(rzclzt)) {
pramsMap.put("rzclzt", rzclzt);
} else {
- pramsMap.put("rzclzt", "");
+ pramsMap.put("rzclzt", "99");
}
} else {
return ResponseEntity.ok(R.error("认证状态不能为空!"));
diff --git a/dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml b/dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
index 194e2588..559abec3 100644
--- a/dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
+++ b/dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
@@ -75,12 +75,29 @@
from t_dx_record_invoice t
WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.invoice_type in('01','03','08','14','31','283','161','183','185')
- and t.bdk_status in ('1','2')
and t.export_mark = '0'
and t.auth_status in ('0','2','3','4','5','6')
and t.company = #{company}
and t.gf_tax_no = #{gfsh}
and t.comp_code = #{companyCode}
+
+ and t.bdk_status in ('1','2')
+
+
+ AND t.inaccount_status = '1'
+ AND t.rzh_yesorno = '0'
+
+ and t.bzdh is not null
+
+
+
+
+ AND (
+ (t.auth_status = '4' and t.bdk_status IN ( '1', '2' ))
+ or (t.auth_status in ('0','6') AND t.inaccount_status = '1' AND t.rzh_yesorno = '0' and t.bzdh is not null)
+ or t.auth_status in ('2','3','5')
+ )
+
and t.invoice_status = #{invoiceStatus}
@@ -361,9 +378,26 @@
and t.comp_code = #{companyCode}
and t.invoice_type in('01','03','08','14','31','283','161','183','185')
and t.auth_status in ('0','2','3','4','5','6')
- and t.bdk_status in ('1','2')
and t.export_mark = '0'
and t.company =#{company}
+
+ and t.bdk_status in ('1','2')
+
+
+ AND t.inaccount_status = '1'
+ AND t.rzh_yesorno = '0'
+
+ and t.bzdh is not null
+
+
+
+
+ AND (
+ (t.auth_status = '4' and t.bdk_status IN ( '1', '2' ))
+ or (t.auth_status in ('0','6') AND t.inaccount_status = '1' AND t.rzh_yesorno = '0' and t.bzdh is not null)
+ or t.auth_status in ('2','3','5')
+ )
+
and t.invoice_status = #{invoiceStatus}
diff --git a/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml b/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
index e3f0b072..5c50827a 100644
--- a/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
+++ b/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
@@ -523,6 +523,9 @@
and t.bzdh = #{bzdh}
+
+ and t.bzdh is not null
+
and t.inaccount_status = #{inAccountStatus}
diff --git a/dxhy-core/src/main/java/com/dxhy/core/thread/RzFpxxExportThread.java b/dxhy-core/src/main/java/com/dxhy/core/thread/RzFpxxExportThread.java
index e269b54b..b0ba0500 100644
--- a/dxhy-core/src/main/java/com/dxhy/core/thread/RzFpxxExportThread.java
+++ b/dxhy-core/src/main/java/com/dxhy/core/thread/RzFpxxExportThread.java
@@ -245,7 +245,7 @@ public class RzFpxxExportThread extends BaseThread {
if (!"99".equals(rzclzt) && StringUtils.isNotBlank(rzclzt)) {
pramsMap.put("rzclzt", rzclzt);
} else {
- pramsMap.put("rzclzt", "");
+ pramsMap.put("rzclzt", "99");
}
if (!StringUtils.isBlank(invoiceNo)) {
if(invoiceNo.length()==8){
diff --git a/dxhy-core/src/main/resources/mapper/FpZhMapper.xml b/dxhy-core/src/main/resources/mapper/FpZhMapper.xml
index 5096e391..974d6414 100644
--- a/dxhy-core/src/main/resources/mapper/FpZhMapper.xml
+++ b/dxhy-core/src/main/resources/mapper/FpZhMapper.xml
@@ -106,13 +106,29 @@
from t_dx_record_invoice t
WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.invoice_type in ('01','03','08','14','31','283','161','183','185')
- and t.bdk_status in ('1','2')
and t.export_mark = '0'
and t.auth_status in ('0','2','3','4','5','6')
and t.company = #{company}
and t.gf_tax_no = #{gfsh}
and t.comp_code = #{companyCode}
+
+ and t.bdk_status in ('1','2')
+
+
+ AND t.inaccount_status = '1'
+ AND t.rzh_yesorno = '0'
+
+ and t.bzdh is not null
+
+
+
+ AND (
+ (t.auth_status = '4' and t.bdk_status IN ( '1', '2' ))
+ or (t.auth_status in ('0','6') AND t.inaccount_status = '1' AND t.rzh_yesorno = '0' and t.bzdh is not null)
+ or t.auth_status in ('2','3','5')
+ )
+
and t.invoice_status = #{invoiceStatus}
@@ -155,9 +171,12 @@
and t.image_id = #{imageId}
-
+
and t.auth_status = #{rzclzt}
+
+ and (t.auth_status = '2' or t.auth_status = '3')
+
and t.bdk_status = #{rzlx}