进项和销项票池导出条件与查询条件保持一致

release
yishiqihuasheng 2 years ago
parent 596a8ef304
commit 5153fea813
  1. 24
      dxhy-core/src/main/java/com/dxhy/core/thread/PoolAddTaxThread.java
  2. 23
      dxhy-core/src/main/java/com/dxhy/core/thread/PoolSaleThread.java
  3. 44
      dxhy-core/src/main/resources/mapper/ExtPaperMapper.xml

@ -181,6 +181,12 @@ public class PoolAddTaxThread extends BaseThread {
} else { } else {
pramsMap.put("gfsh", gfshList); pramsMap.put("gfsh", gfshList);
} }
boolean flag = checkList(gfshList);
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
}
if (cjksyf != null && !"".equals(cjksyf)) { if (cjksyf != null && !"".equals(cjksyf)) {
pramsMap.put("cjksyf", DateUtils.getMorning(DateUtils.strToDate(cjksyf))); pramsMap.put("cjksyf", DateUtils.getMorning(DateUtils.strToDate(cjksyf)));
} }
@ -468,4 +474,22 @@ public class PoolAddTaxThread extends BaseThread {
return filePath.toString(); return filePath.toString();
} }
public boolean checkList(List<String> list) {
boolean flag =false;
if (list == null || list.isEmpty()){
flag = true;
}else {
String s = list.toString().replace("[","").replace("]","");
if (StringHelper.isBlank(s)){
flag = true;
}
if (StringHelper.isNotBlank(s) && s.contains(",")){
String replace = s.replace(",", "");
if (StringHelper.isBlank(replace)){
flag = true;
}
}
}
return flag;
}
} }

@ -186,6 +186,11 @@ public class PoolSaleThread extends BaseThread {
} else { } else {
pramsMap.put("gfsh", gfshList); pramsMap.put("gfsh", gfshList);
} }
boolean flag = checkList(gfshList);
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
}
if (cjksyf != null && !"".equals(cjksyf)) { if (cjksyf != null && !"".equals(cjksyf)) {
pramsMap.put("cjksyf", DateUtils.getMorning(DateUtils.strToDate(cjksyf))); pramsMap.put("cjksyf", DateUtils.getMorning(DateUtils.strToDate(cjksyf)));
} }
@ -468,4 +473,22 @@ public class PoolSaleThread extends BaseThread {
return filePath.toString(); return filePath.toString();
} }
public boolean checkList(List<String> list) {
boolean flag =false;
if (list == null || list.isEmpty()){
flag = true;
}else {
String s = list.toString().replace("[","").replace("]","");
if (StringHelper.isBlank(s)){
flag = true;
}
if (StringHelper.isNotBlank(s) && s.contains(",")){
String replace = s.replace(",", "");
if (StringHelper.isBlank(replace)){
flag = true;
}
}
}
return flag;
}
} }

@ -293,10 +293,13 @@
like like
CONCAT('%',#{keyWord},'%') CONCAT('%',#{keyWord},'%')
</if> </if>
and t.gf_tax_no in <if test="sign != '88'">
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> and t.gf_tax_no in
#{item} <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
</foreach> #{item}
</foreach>
</if>
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' "> <if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType} and t.invoice_type = #{invoiceType}
</if> </if>
@ -400,10 +403,13 @@
like like
CONCAT('%',#{keyWord},'%') CONCAT('%',#{keyWord},'%')
</if> </if>
and t.xf_tax_no in <if test="sign != '88'">
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> and t.xf_tax_no in
#{item} <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
</foreach> #{item}
</foreach>
</if>
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' "> <if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType} and t.invoice_type = #{invoiceType}
</if> </if>
@ -559,10 +565,13 @@
like like
CONCAT('%',#{keyWord},'%') CONCAT('%',#{keyWord},'%')
</if> </if>
and t.gf_tax_no in <if test="sign != '88'">
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> and t.gf_tax_no in
#{item} <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
</foreach> #{item}
</foreach>
</if>
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' "> <if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType} and t.invoice_type = #{invoiceType}
</if> </if>
@ -669,10 +678,13 @@
like like
CONCAT('%',#{keyWord},'%') CONCAT('%',#{keyWord},'%')
</if> </if>
and t.xf_tax_no in <if test="sign != '88'">
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> and t.xf_tax_no in
#{item} <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
</foreach> #{item}
</foreach>
</if>
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' "> <if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType} and t.invoice_type = #{invoiceType}
</if> </if>

Loading…
Cancel
Save