diff --git a/dxhy-core/src/main/java/com/dxhy/core/model/BbfpzhcxRespVO.java b/dxhy-core/src/main/java/com/dxhy/core/model/BbfpzhcxRespVO.java index 222727b1..9637e04a 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/model/BbfpzhcxRespVO.java +++ b/dxhy-core/src/main/java/com/dxhy/core/model/BbfpzhcxRespVO.java @@ -170,6 +170,11 @@ public class BbfpzhcxRespVO implements Serializable { private String voucherNumber; private String illegalEnterprise; private String bzr; + private String bzdh; + private String snVoucherNumber; + private String postingTime; + private String imageNumber; + private String accountPeriod; public BbfpzhcxRespVO() {} diff --git a/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpzhcxServiceImpl.java b/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpzhcxServiceImpl.java index b6d1301d..4b7a81e4 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpzhcxServiceImpl.java +++ b/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpzhcxServiceImpl.java @@ -97,6 +97,12 @@ public class FpzhcxServiceImpl extends MpBaseServiceImpl businesses = (List)prams.get("userBusiness"); + String bzdh = prams.getString("bzdh"); + String imageNumber = prams.getString("imageNumber"); String inAccountStatus = prams.getString("inAccountStatus"); + String snVoucherNumber =prams.getString("snVoucherNumber"); + String accountPeriod = prams.getString("accountPeriod"); + if (org.apache.commons.lang3.StringUtils.isNotEmpty(accountPeriod) && accountPeriod.length() > 7){ + accountPeriod = accountPeriod.substring(0,7); + } + String postingTimeEnd = prams.getString("postingTimeEnd"); + String postingTimeStart = prams.getString("postingTimeStart"); JSONObject jsonObject = tabulateRedisService.getTabulateExcel(company, menuId); // 参数转换为需要的形式 Map pramsMap = new HashMap<>(30); pramsMap.put("dbName", dbName); pramsMap.put("business", businesses); pramsMap.put("bzr",bzr); + pramsMap.put("bzdh",bzdh); + pramsMap.put("imageNumber",imageNumber); + pramsMap.put("inAccountStatus",inAccountStatus); + pramsMap.put("snVoucherNumber",snVoucherNumber); + pramsMap.put("postingTimeEnd",postingTimeEnd); + pramsMap.put("postingTimeStart",postingTimeStart); + pramsMap.put("accountPeriod",accountPeriod); List gfshList = new ArrayList<>(); if (!StringHelper.isBlank(gfsh)) { diff --git a/dxhy-core/src/main/resources/mapper/BbfpzhMapper.xml b/dxhy-core/src/main/resources/mapper/BbfpzhMapper.xml index 1707e1e9..f54cddcd 100644 --- a/dxhy-core/src/main/resources/mapper/BbfpzhMapper.xml +++ b/dxhy-core/src/main/resources/mapper/BbfpzhMapper.xml @@ -37,6 +37,12 @@ + + + + + + select t.invoice_code,t.invoice_no,DATE_FORMAT(t.invoice_date,'%Y-%m-%d') kprq,t.gf_tax_no - gfsh,t.gf_name gfmc,t.bzr, + gfsh,t.gf_name gfmc,t.bzr,t.inaccount_status,t.bzdh,t.sn_voucher_number,t.posting_time,t.image_id,t.account_period, t.xf_tax_no,t.xf_name,t.tax_amount,t.invoice_status,t.invoice_amount,t.dk_tax_amount,DATE_FORMAT(t.rzh_date,'%Y-%m-%d') rzh_date ,DATE_FORMAT(t.qs_date,'%Y-%m-%d') qs_date,t.rzh_type,t.dept_id deptId, t.gx_user_name,t.rzh_belong_date @@ -65,35 +71,41 @@ #{item} + + and t.bzdh = #{bzdh} + + + and t.bzr like concat('%',#{bzr},'%') + + + and t.inaccount_status = #{inAccountStatus} + + test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99'"> and t.invoice_status = #{invoiceStatus} + + and t.qs_status = #{qszt} + and t.voucher_number like concat('%',concat(#{voucherNumber},'%')) - - and t.qs_status = #{qszt} - - + and t.rzh_yesorno = #{rzzt} - - and t.bzr like concat('%',#{bzr},'%') - + test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99'"> and t.invoice_type = #{invoiceType} and t.invoice_source = #{invoiceSource} + test="fprzfs != null and fprzfs != '' and fprzfs != 'null' and fprzfs != '99'"> and t.rzh_type = #{fprzfs} + test="fprzclzt != null and fprzclzt != '' and fprzclzt != 'null' and fprzclzt != '99'"> and t.auth_status = #{fprzclzt} @@ -102,9 +114,6 @@ and t.xf_name like CONCAT(#{xfmc},'%') - - and t.settlement_no like concat(#{settlementNo},'%') - and SUBSTR(t.xf_tax_no , -6) = #{xfsh} @@ -122,33 +131,33 @@ and t.tax_amount <= #{taxAmountMax} + and t.qs_name = #{qsr} and t.confirm_user like CONCAT(#{rzhr},'%') + + and t.settlement_no like concat(#{settlementNo},'%') + and t.glzt = #{glzt} - and t.invoice_no = #{invoiceNo} - - and t.rzh_belong_date = #{skssq} - - + and t.rzh_date between #{rzksrq} and #{rzjsrq} - - and t.qs_date between #{qsksrq} and #{qsjsrq} + + and t.rzh_belong_date = #{skssq} - + and t.qs_type = #{qsfs} - - and t.company = #{company} + + and t.qs_date between #{qsksrq} and #{qsjsrq} @@ -164,12 +173,20 @@ ) or (t.dept_id is null or t.dept_id='' or t.dept_id='99')) - - and t.export_mark = #{exportMark} + + + + + and t.sn_voucher_number = #{snVoucherNumber} - - and t.in_account_status = #{inAccountStatus} + + and posting_time between #{postingTimeStart} and #{postingTimeEnd} + + + and t.image_id = #{imageNumber} + + + and t.account_period = #{accountPeriod} order by t.invoice_date desc