认证查询:解决整合手工认证的逻辑冲突

release
路明慧 2 years ago
parent 33e2ae6312
commit b0f9f8adf0
  1. 2
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  2. 25
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  3. 2
      dxhy-core/src/main/java/com/dxhy/core/thread/RzFpxxExportThread.java
  4. 18
      dxhy-core/src/main/resources/mapper/FpZhMapper.xml

@ -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("认证状态不能为空!"));

@ -80,16 +80,24 @@
and t.company = #{company}
and t.gf_tax_no = #{gfsh}
and t.comp_code = #{companyCode}
<if test="rzclzt != null and rzclzt != '0'.toString() and rzclzt != '6'.toString()">
<if test="rzclzt != null and rzclzt != '' and rzclzt == '4'.toString()">
and t.bdk_status in ('1','2')
</if>
<if test="rzclzt != null and (rzclzt == '0'.toString() or rzclzt == '6'.toString())">
<if test="rzclzt != null and rzclzt != '' and (rzclzt == '0'.toString() or rzclzt == '6'.toString())">
AND t.inaccount_status = '1'
AND t.rzh_yesorno = '0'
<if test=" bzdh == ''">
and t.bzdh is not null
</if>
</if>
<if test="rzclzt != null and rzclzt != '' and rzclzt == '99'">
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')
)
</if>
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' ">
and t.invoice_status = #{invoiceStatus}
</if>
@ -372,11 +380,10 @@
and t.auth_status in ('0','2','3','4','5','6')
and t.export_mark = '0'
and t.company =#{company}
<if test="rzclzt != null and rzclzt != '0'.toString() and rzclzt != '6'.toString()">
<if test="rzclzt != null and rzclzt != '' and rzclzt == '4'.toString()">
and t.bdk_status in ('1','2')
</if>
<if test="rzclzt != null and (rzclzt == '0'.toString() or rzclzt == '6'.toString())">
<if test="rzclzt != null and rzclzt != '' and (rzclzt == '0'.toString() or rzclzt == '6'.toString())">
AND t.inaccount_status = '1'
AND t.rzh_yesorno = '0'
<if test=" bzdh == ''">
@ -384,7 +391,13 @@
</if>
</if>
<if test="rzclzt != null and rzclzt != '' and rzclzt == '99'">
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')
)
</if>
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' ">
and t.invoice_status = #{invoiceStatus}
</if>

@ -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){

@ -111,17 +111,24 @@
and t.company = #{company}
and t.gf_tax_no = #{gfsh}
and t.comp_code = #{companyCode}
<if test="rzclzt != null and rzclzt != '0'.toString() and rzclzt != '6'.toString()">
<if test="rzclzt != null and rzclzt != '' and rzclzt == '4'.toString()">
and t.bdk_status in ('1','2')
</if>
<if test="rzclzt != null and (rzclzt == '0'.toString() or rzclzt == '6'.toString())">
<if test="rzclzt != null and rzclzt != '' and (rzclzt == '0'.toString() or rzclzt == '6'.toString())">
AND t.inaccount_status = '1'
AND t.rzh_yesorno = '0'
<if test=" bzdh == ''">
and t.bzdh is not null
</if>
</if>
<if test="rzclzt != null and rzclzt != '' and rzclzt == '99'">
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')
)
</if>
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' ">
and t.invoice_status = #{invoiceStatus}
</if>
@ -164,9 +171,12 @@
<if test="imageId != null and imageId != '' and imageId != 'null' ">
and t.image_id = #{imageId}
</if>
<if test="rzclzt !=null and rzclzt != ''">
<if test="rzclzt == '0'.toString() or rzclzt == '4'.toString() or rzclzt == '5'.toString() or rzclzt == '6'.toString()">
and t.auth_status = #{rzclzt}
</if>
<if test="rzclzt == '1'.toString() ">
and (t.auth_status = '2' or t.auth_status = '3')
</if>
<if test="rzlx!=null and rzlx!=''">
and t.bdk_status = #{rzlx}
</if>

Loading…
Cancel
Save