一件认证添加条件

release
yishiqihuasheng 2 years ago
parent f1d383358b
commit e4d593350c
  1. 79
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseRzTDxRecordInvoiceController.java
  2. 134
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml

@ -136,9 +136,37 @@ public class BaseRzTDxRecordInvoiceController extends AbstractController {
String xfmc = (String)map.get("xfmc");
String position = (String)map.get("position");
String fpzt = (String)map.get("invoiceStatus");
String companyCode = (String) map.get("companyCode");
String qsr = (String)map.get("qsr");
String bzdh = (String) map.get("bzdh");
String bzr = (String) map.get("bzr");
String inAccountStatus = (String) map.get("inAccountStatus");
String sfkrz = (String)map.get("sfkrz");
String suspendDate = (String) map.get("suspendDate");
if (org.apache.commons.lang3.StringUtils.isNotEmpty(suspendDate) && suspendDate.length() >7){
suspendDate = suspendDate.substring(0,7);
}
String suspendStatus = (String) map.get("suspendStastus");
Map<String, Object> pramsMap = new HashMap<>(20);
pramsMap.put("bzdh",bzdh);
pramsMap.put("bzr",bzr);
pramsMap.put("inAccountStatus",inAccountStatus);
pramsMap.put("suspendDate",suspendDate);
pramsMap.put("suspendStatus",suspendStatus);
if (sfkrz != null) {
if (!"99".equals(sfkrz)) {
pramsMap.put("sfkrz", sfkrz);
}
}
if(pramsMap.get("imageNumber") != null){
pramsMap.put("imageNumber",pramsMap.get("imageNumber"));
}
pramsMap.put("postingTimeEnd", map.get("postingTimeEnd"));
pramsMap.put("snVoucherNumber", map.get("snVoucherNumber"));
pramsMap.put("postingTimeStart", map.get("postingTimeStart"));
pramsMap.put("company", map.get("company"));
pramsMap.put("business", getUserInfo().getBusiness());
pramsMap.put("dbName", getUserInfo().getDbName());
pramsMap.put("name", getUserName());
@ -146,6 +174,13 @@ public class BaseRzTDxRecordInvoiceController extends AbstractController {
List<Tax> taxList = getUserInfo().getOrg();
pramsMap.put("taxList", taxList);
pramsMap.put("qsflag", getUserInfo().getQsStatus());
if (map.get("accountPeriod") != null && !"".equals(map.get("accountPeriod"))) {
String accountPeriod = map.get("accountPeriod").toString().substring(0,7);
pramsMap.put("accountPeriod", accountPeriod);
log.info("accountPeriod:{}",accountPeriod);
}
List<String> gfshList = new ArrayList<>();
if (!"99".equals(gfsh) && StringUtils.isNotBlank(gfsh)) {
@ -155,6 +190,14 @@ public class BaseRzTDxRecordInvoiceController extends AbstractController {
}
pramsMap.put("gfsh", gfshList);
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
log.info("组织机构====>{}",pramsMap.get("companyCodes"));
}
if (org.apache.commons.lang3.StringUtils.isNotBlank(companyCode)){
pramsMap.put("companyCode",companyCode);
}
if (!StringUtils.isBlank(invoiceType)) {
if (!"99".equals(invoiceType)) {
pramsMap.put("invoiceType", invoiceType);
@ -272,15 +315,47 @@ public class BaseRzTDxRecordInvoiceController extends AbstractController {
String xfmc = (String)map.get("xfmc");
String position = (String)map.get("position");
String fpzt = (String)map.get("invoiceStatus");
String companyCode = (String) map.get("companyCode");
String qsr = (String)map.get("qsr");
String bzdh = (String) map.get("bzdh");
String bzr = (String) map.get("bzr");
String inAccountStatus = (String) map.get("inAccountStatus");
String sfkrz = (String)map.get("sfkrz");
String suspendDate = (String) map.get("suspendDate");
if (org.apache.commons.lang3.StringUtils.isNotEmpty(suspendDate) && suspendDate.length() >7){
suspendDate = suspendDate.substring(0,7);
}
String suspendStatus = (String) map.get("suspendStastus");
Map<String, Object> pramsMap = new HashMap<>(20);
pramsMap.put("bzdh",bzdh);
pramsMap.put("bzr",bzr);
pramsMap.put("inAccountStatus",inAccountStatus);
pramsMap.put("suspendDate",suspendDate);
pramsMap.put("suspendStatus",suspendStatus);
if (sfkrz != null) {
if (!"99".equals(sfkrz)) {
pramsMap.put("sfkrz", sfkrz);
}
}
if(pramsMap.get("imageNumber") != null){
pramsMap.put("imageNumber",pramsMap.get("imageNumber"));
}
pramsMap.put("business", getUserInfo().getBusiness());
pramsMap.put("dbName", getUserInfo().getDbName());
pramsMap.put("name", getUserName());
List<Tax> taxList = getUserInfo().getOrg();
pramsMap.put("taxList", taxList);
pramsMap.put("qsflag", getUserInfo().getQsStatus());
if (map.get("accountPeriod") != null && !"".equals(map.get("accountPeriod"))) {
String accountPeriod = map.get("accountPeriod").toString().substring(0,7);
pramsMap.put("accountPeriod", accountPeriod);
log.info("accountPeriod:{}",accountPeriod);
}
pramsMap.put("postingTimeEnd", map.get("postingTimeEnd"));
pramsMap.put("snVoucherNumber", map.get("snVoucherNumber"));
pramsMap.put("postingTimeStart", map.get("postingTimeStart"));
pramsMap.put("company", map.get("company"));
List<String> gfshList = new ArrayList<>();
if (!"99".equals(gfsh) && StringUtils.isNotBlank(gfsh)) {

@ -409,14 +409,14 @@
and t.invoice_status in ('0','7')
and t.invoice_amount>0
and t.tax_amount>=0
and date_format(t.invoice_date,'%Y%m%d') between c.select_start_date and c.select_end_date
and t.invoice_date between c.select_start_date and c.select_end_date
and d.tj_status in('0','3')
</if>
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()">
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount &lt;0 or t.tax_amount &lt;0 or
date_format(t.invoice_date,'%Y%m%d') &lt;= c.select_start_date or
date_format(t.invoice_date,'%Y%m%d') &gt;=
t.invoice_date &lt;= c.select_start_date or
t.invoice_date &gt;=
c.select_end_date or d.tj_status in ('1','2'))
</if>
@ -1031,11 +1031,74 @@
and t.invoice_amount>0
and t.tax_amount>=0
and d.tj_status in('0','3')
and date_format(t.invoice_date,'%Y%m%d') between c.select_start_date and c.select_end_date
and invoice_date between c.select_start_date and c.select_end_date
and t.company = #{company}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and (t.comp_code in
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")">
#{companyCode}
</foreach>
or t.comp_code is null or t.comp_code = ''
)
</if>
<if test="companyCode != null and companyCode != '99' and companyCode != '88' and companyCode != '' and companyCode != 'null'" >
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '1'.toString()">
and t.invoice_status in ('0','7')
and t.invoice_amount>0
and t.tax_amount>=0
and t.invoice_date between c.select_start_date and c.select_end_date
and d.tj_status in('0','3')
</if>
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()">
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount &lt;0 or t.tax_amount &lt;0 or
t.invoice_date &lt;= c.select_start_date or
t.invoice_date &gt;=
c.select_end_date or d.tj_status in ('1','2'))
</if>
<if test="suspendStatus != null and suspendStatus != '' and suspendStatus != 'null' and suspendStatus != '99' and suspendStatus == '1'.toString()">
and t.suspend_status = '1'
</if>
<if test="suspendStatus != null and suspendStatus != '' and suspendStatus != 'null' and suspendStatus != '99' and suspendStatus == '0'.toString()">
and (t.suspend_status = '' or t.suspend_status is null or t.suspend_status = '0')
</if>
<if test="suspendDate != null and suspendDate != '' and suspendDate != 'null' ">
and t.suspend_date = #{suspendDate}
</if>
<if test="bzr != null and bzr != '' and bzr != 'null'">
and t.bzr like concat('%',#{bzr},'%')
</if>
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and bzdh != '99'">
and t.bzdh = #{bzdh}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '1'.toString()">
and t.inaccount_status = #{inAccountStatus}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '0'.toString()">
and (t.inaccount_status = '0' or t.inaccount_status = '' or t.inaccount_status is null)
</if>
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if test="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<if test="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<if test="qszt != null and qszt != '' and qszt != 'null' ">
and t.qs_status = #{qszt}
</if>
@ -1201,10 +1264,73 @@
and t.tax_amount>=0
and d.tj_status in('0','3')
and date_format(t.invoice_date,'%Y%m%d') between c.select_start_date and c.select_end_date
and t.company = #{company}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and (t.comp_code in
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")">
#{companyCode}
</foreach>
or t.comp_code is null or t.comp_code = ''
)
</if>
<if test="companyCode != null and companyCode != '99' and companyCode != '88' and companyCode != '' and companyCode != 'null'" >
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '1'.toString()">
and t.invoice_status in ('0','7')
and t.invoice_amount>0
and t.tax_amount>=0
and t.invoice_date between c.select_start_date and c.select_end_date
and d.tj_status in('0','3')
</if>
<if test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()">
and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount &lt;0 or t.tax_amount &lt;0 or
t.invoice_date &lt;= c.select_start_date or
t.invoice_date &gt;=
c.select_end_date or d.tj_status in ('1','2'))
</if>
<if test="suspendStatus != null and suspendStatus != '' and suspendStatus != 'null' and suspendStatus != '99' and suspendStatus == '1'.toString()">
and t.suspend_status = '1'
</if>
<if test="suspendStatus != null and suspendStatus != '' and suspendStatus != 'null' and suspendStatus != '99' and suspendStatus == '0'.toString()">
and (t.suspend_status = '' or t.suspend_status is null or t.suspend_status = '0')
</if>
<if test="suspendDate != null and suspendDate != '' and suspendDate != 'null' ">
and t.suspend_date = #{suspendDate}
</if>
<if test="bzr != null and bzr != '' and bzr != 'null'">
and t.bzr like concat('%',#{bzr},'%')
</if>
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and bzdh != '99'">
and t.bzdh = #{bzdh}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '1'.toString()">
and t.inaccount_status = #{inAccountStatus}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99' and inAccountStatus == '0'.toString()">
and (t.inaccount_status = '0' or t.inaccount_status = '' or t.inaccount_status is null)
</if>
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if test="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<if test="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<if test="qszt != null and qszt != '' and qszt != 'null' ">
and t.qs_status = #{qszt}
</if>

Loading…
Cancel
Save