ariesy 统计查询导出 v2

release
yefei 2 years ago
parent bdd3e57992
commit 7b7b25463c
  1. 8
      dxhy-core/src/main/java/com/dxhy/core/thread/FpzhcxmxExportThread.java
  2. 8
      dxhy-core/src/main/java/com/dxhy/core/thread/FpzhcxslExportThread.java
  3. 20
      dxhy-core/src/main/resources/mapper/BbfpzhMapper.xml
  4. 5
      dxhy-core/src/main/resources/mapper/BbfpzhmxMapper.xml
  5. 5
      dxhy-core/src/main/resources/mapper/BbfpzhslMapper.xml
  6. 12
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtFpzhcxController.java

@ -138,13 +138,7 @@ public class FpzhcxmxExportThread extends BaseThread {
Map<String, Object> pramsMap = new HashMap<>(31); Map<String, Object> pramsMap = new HashMap<>(31);
pramsMap.put("dbName", dbName); pramsMap.put("dbName", dbName);
pramsMap.put("business", businesses); pramsMap.put("business", businesses);
List<String> gfshList = new ArrayList<>(); pramsMap.put("gfsh", gfsh);
if (!StringHelper.isBlank(gfsh)) {
gfshList = StringHelper.stringToList(gfsh);
pramsMap.put("gfsh", gfshList);
} else {
pramsMap.put("gfsh", gfshList);
}
if (!StringHelper.isBlank(invoiceType)) { if (!StringHelper.isBlank(invoiceType)) {
if (!"99".equals(invoiceType)) { if (!"99".equals(invoiceType)) {
pramsMap.put("invoiceType", invoiceType); pramsMap.put("invoiceType", invoiceType);

@ -135,13 +135,7 @@ public class FpzhcxslExportThread extends BaseThread {
Map<String, Object> pramsMap = new HashMap<>(31); Map<String, Object> pramsMap = new HashMap<>(31);
pramsMap.put("dbName", dbName); pramsMap.put("dbName", dbName);
pramsMap.put("business", businesses); pramsMap.put("business", businesses);
List<String> gfshList = new ArrayList<>(); pramsMap.put("gfsh", gfsh);
if (!StringHelper.isBlank(gfsh)) {
gfshList = StringHelper.stringToList(gfsh);
pramsMap.put("gfsh", gfshList);
} else {
pramsMap.put("gfsh", gfshList);
}
if (!StringHelper.isBlank(invoiceType)) { if (!StringHelper.isBlank(invoiceType)) {
if (!"99".equals(invoiceType)) { if (!"99".equals(invoiceType)) {
pramsMap.put("invoiceType", invoiceType); pramsMap.put("invoiceType", invoiceType);

@ -67,23 +67,9 @@
from t_dx_record_invoice t from t_dx_record_invoice t
WHERE t.invoice_date between #{kpksrq} and #{kpjsrq} WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.company = #{company} and t.company = #{company}
and t.gf_tax_no in and t.gf_tax_no = #{gfsh}
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> <if test="companyCode != null and companyCode != '' and companyCode != 'null'">
#{item} and (t.comp_code = #{companyCode} or t.comp_code is null or t.comp_code = '')
</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>
<if test="bzdh != null and bzdh != '' and bzdh != 'null'"> <if test="bzdh != null and bzdh != '' and bzdh != 'null'">
and t.bzdh = #{bzdh} and t.bzdh = #{bzdh}

@ -52,10 +52,7 @@
${dxhyTertiary}.t_dx_record_invoice t ${dxhyTertiary}.t_dx_record_invoice t
left JOIN ${dxhyDetail}.t_dx_record_invoice_detail b ON t.uuid = b.uuid left JOIN ${dxhyDetail}.t_dx_record_invoice_detail b ON t.uuid = b.uuid
WHERE t.invoice_date between #{kpksrq} and #{kpjsrq} WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.gf_tax_no in and t.gf_tax_no = #{gfsh}
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99' "> <if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99' ">
and t.invoice_status = #{invoiceStatus} and t.invoice_status = #{invoiceStatus}
</if> </if>

@ -30,10 +30,7 @@
on t.invoice_no = tdis.invoice_no on t.invoice_no = tdis.invoice_no
where where
t.invoice_date between #{kpksrq} and #{kpjsrq} t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.gf_tax_no in and t.gf_tax_no = #{gfsh}
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99' "> <if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' and invoiceStatus != '99' ">
and t.invoice_status = #{invoiceStatus} and t.invoice_status = #{invoiceStatus}
</if> </if>

@ -371,16 +371,8 @@ public class ExtFpzhcxController extends AbstractController {
Map<String, Object> data = new HashMap<>(16); Map<String, Object> data = new HashMap<>(16);
data.put("dbName", getUserInfo().getDbName()); data.put("dbName", getUserInfo().getDbName());
List<String> gfshList = new ArrayList<>();
if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) { data.put("gfsh", pramsMap.get("gfsh").toString());
gfshList.add(pramsMap.get("gfsh").toString());
} else {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", ""));
}
}
data.put("gfsh", gfshList);
if (pramsMap.get("yczt") != null && !"".equals(pramsMap.get("yczt")) && !"99".equals(pramsMap.get("yczt"))) { if (pramsMap.get("yczt") != null && !"".equals(pramsMap.get("yczt")) && !"99".equals(pramsMap.get("yczt"))) {
data.put("yczt", pramsMap.get("yczt")); data.put("yczt", pramsMap.get("yczt"));
} }

Loading…
Cancel
Save