|
|
|
@ -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)); |
|
|
|
|
} |
|
|
|
|