diff --git a/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml b/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml index d37d8305..da77c910 100644 --- a/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml +++ b/dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml @@ -130,7 +130,7 @@ and t.qs_status = #{qszt} - and t.auth_status = #{rzzt} + and t.auth_status in ('1','6') and (t.auth_status = '2' or t.auth_status = '3') @@ -452,7 +452,7 @@ and t.qs_status = #{qszt} - and t.auth_status = #{rzzt} + and t.auth_status in ('0','6') and (t.auth_status = '2' or t.auth_status = '3') diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java b/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java index 1c40c2fc..a0383090 100644 --- a/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java +++ b/dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java @@ -446,6 +446,15 @@ public class SDNYMainProcessController extends AbstractController { map.put("taxRate", "0.00"); } } + JSONArray invoiceLineList = checkInvoiceResult.getJSONArray("invoiceLineList"); + for (int i = 0; i < invoiceLineList.size(); i++) { + JSONObject detail = invoiceLineList.getJSONObject(i); + String commodityName = detail.getString("commodityName"); + log.info("查验货物名称{}", commodityName); + if (StringUtils.isNotBlank(commodityName) && commodityName.contains("详见销货清单")){ + invoiceLineList.remove(i); + } + } data.put("data", checkInvoiceResult); return ResponseEntity.ok(JSONObject.toJSONString(data)); @@ -708,16 +717,26 @@ public class SDNYMainProcessController extends AbstractController { signSaveInvoiceInfoService.saveQueryInvoiceResult(checkInvoiceResult, "", "1", dbName); } - Object o = checkInvoiceResult.get("invoiceLineList"); - JSONArray jsonArray = JSONObject.parseArray(JSONObject.toJSONString(o)); - for (Object object : jsonArray) { - Map map = JSONObject.parseObject(JSONObject.toJSONString(object), Map.class); - String taxRate = (String) map.get("taxRate"); - if ("0".equals(taxRate) || "*".equals(taxRate) || "**".equals(taxRate) || "***".equals(taxRate) || "不征税".equals(taxRate) || "免税".equals(taxRate)) { - map.put("taxRate", "0.00"); - } - } - data.put("data", checkInvoiceResult); + Object o = checkInvoiceResult.get("invoiceLineList"); + JSONArray jsonArray = JSONObject.parseArray(JSONObject.toJSONString(o)); + for (Object object : jsonArray) { + Map map = JSONObject.parseObject(JSONObject.toJSONString(object), Map.class); + String taxRate = (String) map.get("taxRate"); + if ("0".equals(taxRate) || "*".equals(taxRate) || "**".equals(taxRate) || "***".equals(taxRate) || "不征税".equals(taxRate) || "免税".equals(taxRate)) { + map.put("taxRate", "0.00"); + } + } + + JSONArray invoiceLineList = checkInvoiceResult.getJSONArray("invoiceLineList"); + for (int i = 0; i < invoiceLineList.size(); i++) { + JSONObject detail = invoiceLineList.getJSONObject(i); + String commodityName = detail.getString("commodityName"); + log.info("查验货物名称{}", commodityName); + if (StringUtils.isNotBlank(commodityName) && commodityName.contains("详见销货清单")){ + invoiceLineList.remove(i); + } + } + data.put("data", checkInvoiceResult); return ResponseEntity.ok(JSONObject.toJSONString(data)); }