Merge remote-tracking branch 'origin/checkResult' into release

# Conflicts:
#	dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java
release
wangrangrang 2 years ago
commit c14e1b1682
  1. 4
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
  2. 39
      dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java

@ -130,7 +130,7 @@
and t.qs_status = #{qszt}
</if>
<if test="rzzt == '0'.toString()">
and t.auth_status = #{rzzt}
and t.auth_status in ('1','6')
</if>
<if test="rzzt == '1'.toString()">
and (t.auth_status = '2' or t.auth_status = '3')
@ -452,7 +452,7 @@
and t.qs_status = #{qszt}
</if>
<if test="rzzt == '0'.toString()">
and t.auth_status = #{rzzt}
and t.auth_status in ('0','6')
</if>
<if test="rzzt == '1'.toString()">
and (t.auth_status = '2' or t.auth_status = '3')

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

Loading…
Cancel
Save