发票综合查询导出

release
yishiqihuasheng 2 years ago
parent 5e4e68cfbf
commit 1526cf4d61
  1. 2
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpzhcxServiceImpl.java
  2. 19
      dxhy-core/src/main/java/com/dxhy/core/thread/FpzhcxmxExportThread.java
  3. 19
      dxhy-core/src/main/java/com/dxhy/core/thread/FpzhcxslExportThread.java
  4. 26
      dxhy-core/src/main/resources/mapper/BbfpzhmxMapper.xml
  5. 26
      dxhy-core/src/main/resources/mapper/BbfpzhslMapper.xml

@ -44,6 +44,7 @@ public class FpzhcxServiceImpl extends MpBaseServiceImpl<BbfpzhDao, BbfpzhcxResp
try {
String gfsh = (String) pramsMap.get("gfsh");
log.info("购方税号为"+gfsh);
if (StringUtils.isBlank(gfsh)) {
// 未从getUserInfo()获取到购方税号信息
json.put("hjsl", "0");
@ -51,6 +52,7 @@ public class FpzhcxServiceImpl extends MpBaseServiceImpl<BbfpzhDao, BbfpzhcxResp
json.put("hjse", "0");
json.put("total", "0");
json.put("datalist", new ArrayList<BbfpzhcxRespVO>());
log.info("未获取到购方税号信息");
} else {
PageHelper.startPage(curr, size);
List<BbfpzhcxRespVO> pageList = super.baseMapper.selectByPramsMap(pramsMap);

@ -135,12 +135,31 @@ public class FpzhcxmxExportThread extends BaseThread {
String company = prams.getString("company");
List<Business> businesses = (List<Business>)prams.get("userBusiness");
String inAccountStatus = prams.getString("inAccountStatus");
String bzr = prams.getString("bzr");
String bzdh = prams.getString("bzdh");
String imageNumber = prams.getString("imageNumber");
String snVoucherNumber =prams.getString("snVoucherNumber");
// JSONArray companyCodeArray = prams.getJSONArray("companyCodes");
// List<String> companyCodes = companyCodeArray.toJavaList(String.class);
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");
// 参数转换为需要的形式
Map<String, Object> pramsMap = new HashMap<>(31);
pramsMap.put("dbName", dbName);
pramsMap.put("business", businesses);
pramsMap.put("gfsh", gfsh);
pramsMap.put("companyCode",companyCode);
pramsMap.put("bzdh",bzdh);
pramsMap.put("bzr",bzr);
pramsMap.put("imageNumber",imageNumber);
pramsMap.put("snVoucherNumber",snVoucherNumber);
pramsMap.put("accountPeriod",accountPeriod);
pramsMap.put("postingTimeEnd",postingTimeEnd);
pramsMap.put("postingTimeStart",postingTimeStart);
if (!StringHelper.isBlank(invoiceType)) {
if (!"99".equals(invoiceType)) {
pramsMap.put("invoiceType", invoiceType);

@ -132,11 +132,30 @@ public class FpzhcxslExportThread extends BaseThread {
String company = prams.getString("company");
List<Business> businesses = (List<Business>)prams.get("userBusiness");
String inAccountStatus = prams.getString("inAccountStatus");
String bzr = prams.getString("bzr");
String bzdh = prams.getString("bzdh");
String imageNumber = prams.getString("imageNumber");
String snVoucherNumber =prams.getString("snVoucherNumber");
// JSONArray companyCodeArray = prams.getJSONArray("companyCodes");
// List<String> companyCodes = companyCodeArray.toJavaList(String.class);
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");
// 参数转换为需要的形式
Map<String, Object> pramsMap = new HashMap<>(31);
pramsMap.put("dbName", dbName);
pramsMap.put("business", businesses);
pramsMap.put("gfsh", gfsh);
pramsMap.put("bzdh",bzdh);
pramsMap.put("bzr",bzr);
pramsMap.put("imageNumber",imageNumber);
pramsMap.put("snVoucherNumber",snVoucherNumber);
pramsMap.put("accountPeriod",accountPeriod);
pramsMap.put("postingTimeEnd",postingTimeEnd);
pramsMap.put("postingTimeStart",postingTimeStart);
pramsMap.put("companyCode",companyCode);
if (!StringHelper.isBlank(invoiceType)) {
if (!"99".equals(invoiceType)) {

@ -53,7 +53,31 @@
left JOIN ${dxhyDetail}.t_dx_record_invoice_detail b ON t.uuid = b.uuid
WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.gf_tax_no = #{gfsh}
and t.comp_code = #{companyCode}
and (t.comp_code = #{companyCode} or t.comp_code is null or t.comp_code = '')
<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 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="bzdh != null and bzdh != '' and bzdh != 'null'">
and t.bzdh = #{bzdh}
</if>
<if test="bzr != null and bzr != '' and bzr != 'null'">
and t.bzr like concat('%',#{bzr},'%')
</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="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99' ">
and t.invoice_status = #{invoiceStatus}
</if>

@ -31,7 +31,31 @@
where
t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.gf_tax_no = #{gfsh}
and t.comp_code = #{companyCode}
and (t.comp_code = #{companyCode} or t.comp_code is null or t.comp_code = '')
<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 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="bzdh != null and bzdh != '' and bzdh != 'null'">
and t.bzdh = #{bzdh}
</if>
<if test="bzr != null and bzr != '' and bzr != 'null'">
and t.bzr like concat('%',#{bzr},'%')
</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="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99' ">
and t.invoice_status = #{invoiceStatus}
</if>

Loading…
Cancel
Save