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 24abd855..222727b1 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 @@ -169,6 +169,7 @@ public class BbfpzhcxRespVO implements Serializable { private String remark; private String voucherNumber; private String illegalEnterprise; + private String bzr; public BbfpzhcxRespVO() {} diff --git a/dxhy-core/src/main/java/com/dxhy/core/model/BbycfpcxRespVO.java b/dxhy-core/src/main/java/com/dxhy/core/model/BbycfpcxRespVO.java index 3cda344d..7a9d047d 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/model/BbycfpcxRespVO.java +++ b/dxhy-core/src/main/java/com/dxhy/core/model/BbycfpcxRespVO.java @@ -96,6 +96,13 @@ public class BbycfpcxRespVO implements Serializable { private String rzlx; private String skssq; private String businessName; + private String bzdh; + private String bzr; + private String imageNumber; + private String snVoucherNumber; + private String accountPeriod; + private String postingTime; + private String inAccountStatus; /** * 合计数量 diff --git a/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/YcfpcxServiceImpl.java b/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/YcfpcxServiceImpl.java index 73654a9d..2bd0b916 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/YcfpcxServiceImpl.java +++ b/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/YcfpcxServiceImpl.java @@ -69,6 +69,12 @@ public class YcfpcxServiceImpl extends MpBaseServiceImpl businesses = (List)prams.get("userBusiness"); String inAccountStatus = prams.getString("inAccountStatus"); JSONObject jsonObject = tabulateRedisService.getTabulateExcel(company, menuId); @@ -142,6 +143,7 @@ public class FpzhcxExportThread extends BaseThread { Map pramsMap = new HashMap<>(30); pramsMap.put("dbName", dbName); pramsMap.put("business", businesses); + pramsMap.put("bzr",bzr); List gfshList = new ArrayList<>(); if (!StringHelper.isBlank(gfsh)) { diff --git a/dxhy-core/src/main/java/com/dxhy/core/thread/YcfpcxExportThread.java b/dxhy-core/src/main/java/com/dxhy/core/thread/YcfpcxExportThread.java index 024d5853..bfea7796 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/thread/YcfpcxExportThread.java +++ b/dxhy-core/src/main/java/com/dxhy/core/thread/YcfpcxExportThread.java @@ -20,6 +20,7 @@ import com.dxhy.oss.service.FileService; import cn.hutool.core.date.DateUtil; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; /** * 报表发票综合查询导出 @@ -125,11 +126,30 @@ public class YcfpcxExportThread extends BaseThread { String menuId = prams.getString("menuId"); List businessList = (List)prams.get("business"); String businessCode = prams.getString("businessCode"); + String bzr = prams.getString("bzr"); + 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 (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<>(16); pramsMap.put("dbName", dbName); pramsMap.put("business", businessList); + 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)) { gfshList = StringHelper.stringToList(gfsh); diff --git a/dxhy-core/src/main/resources/mapper/BbfpzhMapper.xml b/dxhy-core/src/main/resources/mapper/BbfpzhMapper.xml index a5c796c4..1707e1e9 100644 --- a/dxhy-core/src/main/resources/mapper/BbfpzhMapper.xml +++ b/dxhy-core/src/main/resources/mapper/BbfpzhMapper.xml @@ -36,6 +36,7 @@ + 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, + gfsh,t.gf_name gfmc,t.bzr, 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 @@ -77,6 +78,9 @@ and t.rzh_yesorno = #{rzzt} + + and t.bzr like concat('%',#{bzr},'%') + and t.invoice_type = #{invoiceType} diff --git a/dxhy-core/src/main/resources/mapper/BbycfpcxMapper.xml b/dxhy-core/src/main/resources/mapper/BbycfpcxMapper.xml index 426ce535..e6957fc8 100644 --- a/dxhy-core/src/main/resources/mapper/BbycfpcxMapper.xml +++ b/dxhy-core/src/main/resources/mapper/BbycfpcxMapper.xml @@ -8,7 +8,13 @@ - + + + + + + + @@ -35,7 +41,7 @@ resultMap="BaseResultMap" databaseId="mysql"> select t.invoice_code fpdm, t.invoice_no fphm ,t.invoice_type invoiceType,DATE_FORMAT(t.invoice_date,'%Y-%m-%d') - kprq,t.gf_tax_no gfsh,t.gf_name gfmc, + kprq,t.gf_tax_no gfsh,t.gf_name gfmc,t.inaccount_status,t.bzdh,t.bzr,t.sn_voucher_number,t.account_period,t.posting_time,t.image_id, t.xf_tax_no xfsh,t.xf_name xfmc,t.tax_amount se,t.invoice_amount je,DATE_FORMAT(t.qs_date,'%Y-%m-%d') qsrq, t.qs_status qszt,t.qs_name qsr, t.invoice_status yczt,DATE_FORMAT(t.status_update_date,'%Y-%m-%d') ycsj , DATE_FORMAT(t.rzh_date,'%Y-%m-%d') rzsj,t.rzh_yesorno rzzt,t.auth_status rzclzt,t.bdk_status @@ -44,30 +50,51 @@ WHERE t.invoice_status != '0' and t.invoice_type in ('01','03','08','14','31') and t.invoice_date between #{kpksrq} and #{kpjsrq} + and t.company = #{company} and t.gf_tax_no in #{item} + + and t.bzdh = #{bzdh} + + + and t.bzr like concat('%',#{bzr},'%') + + + and t.inaccount_status = #{inAccountStatus} + + + and t.sn_voucher_number = #{snVoucherNumber} + + + and t.posting_time between #{postingTimeStart} and #{postingTimeEnd} + + + and t.image_id = #{imageNumber} + + + and t.account_period = #{accountPeriod} + + test="yczt != null and yczt != '' and yczt != 'null' "> and t.invoice_status = #{yczt} - + and t.qs_status = #{qszt} - + and t.rzh_yesorno = #{rzzt} - + + and (t.rzh_yesorno = '2' OR t.rzh_yesorno = '1') + + and t.xf_name like CONCAT(#{xfmc},'%') - + and t.invoice_no = #{invoiceNo} - - and t.company = #{company} - and t.dept_id = #{businessCode} diff --git a/dxhy-core/src/main/resources/mapper/FpZhMapper.xml b/dxhy-core/src/main/resources/mapper/FpZhMapper.xml index 5cd659e2..036406d8 100644 --- a/dxhy-core/src/main/resources/mapper/FpZhMapper.xml +++ b/dxhy-core/src/main/resources/mapper/FpZhMapper.xml @@ -104,7 +104,7 @@ - and t.comp_code = #{companyCodes} + and t.comp_code = #{companyCode} and (t.comp_code = '' or t.comp_code is null)