|
|
|
@ -114,7 +114,7 @@ public class EleCheckInvoiceImpl implements ICheckInvoice { |
|
|
|
|
JSONObject resultContent = resultJson.getJSONObject("data"); |
|
|
|
|
if (resultContent == null) { // 如果这里为null,可能出现查验失败,大象报错有可能在最外层的returnCode里报错,也可能在data里的code报错,巨坑
|
|
|
|
|
String checkResult = resultJson.getString("code"); |
|
|
|
|
if ("0001".equals(checkResult) || "0006".equals(checkResult) || "0009".equals(checkResult)) { |
|
|
|
|
if ("0001".equals(checkResult) || "0006".equals(checkResult) || "0009".equals(checkResult) || "1005".equals(checkResult) ) { |
|
|
|
|
// 如果需要扣费
|
|
|
|
|
robUserMoney += 1; |
|
|
|
|
} |
|
|
|
@ -127,7 +127,7 @@ public class EleCheckInvoiceImpl implements ICheckInvoice { |
|
|
|
|
invoiceCheck = this.handelCheckResult(invoiceCheck, resultContent); // 批量处理一把
|
|
|
|
|
|
|
|
|
|
// TODO: 2023/6/5 确定一下哪些需要扣钱
|
|
|
|
|
List<String> cyjgList = Arrays.asList("9999", "0002", "0005", "1004", "1005", "1006", "1007", "1008", "1009","1010", "1011", "1012", "1013", "1014", "1015", "1020", "1021"); |
|
|
|
|
List<String> cyjgList = Arrays.asList("9999", "0002", "0005", "1004", "1006", "1007", "1008", "1009","1010", "1011", "1012", "1013", "1014", "1015", "1020", "1021"); |
|
|
|
|
if (cyjgList.contains(invoiceCheck.getCyjg())) { |
|
|
|
|
log.info("单个发票校验错误结果:companyId=" + companyId + ",errorCode=" + invoiceCheck.getCyjg() + ",returnMessage=" + invoiceCheck.getCyjgxx()); |
|
|
|
|
return new AjaxResult(5,invoiceCheck.getCyjgxx()); |
|
|
|
@ -162,7 +162,7 @@ public class EleCheckInvoiceImpl implements ICheckInvoice { |
|
|
|
|
} else { |
|
|
|
|
// 如果不存在用户数据,判断下状态,如果查验结果属于成功,则扣钱
|
|
|
|
|
String checkResult = invoiceCheck.getCyjg(); |
|
|
|
|
if ("0001".equals(checkResult) || "0006".equals(checkResult) || "0009".equals(checkResult)) { |
|
|
|
|
if ("0001".equals(checkResult) || "0006".equals(checkResult) || "0009".equals(checkResult) || "1005".equals(checkResult)) { |
|
|
|
|
// 如果需要扣费
|
|
|
|
|
robUserMoney += 1; |
|
|
|
|
} |
|
|
|
@ -177,6 +177,11 @@ public class EleCheckInvoiceImpl implements ICheckInvoice { |
|
|
|
|
// 开始批量更新数据库 老田加的队列。这里没有。他写的队列也不对,上面已经插入过了这里还插入。SB
|
|
|
|
|
// RedisQueueUtil.build().setData(invoiceCheck).onQueue("income_result_save_consumer").retry(0).dispatch();
|
|
|
|
|
|
|
|
|
|
if (!"0001".equals(invoiceCheck.getCyjg()) ) { |
|
|
|
|
log.info("单个发票校验错误结果:companyId=" + companyId + ",errorCode=" + invoiceCheck.getCyjg() + ",returnMessage=" + invoiceCheck.getCyjgxx()); |
|
|
|
|
return new AjaxResult(Integer.parseInt(invoiceCheck.getCyjg()),invoiceCheck.getCyjgxx()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// TODO: 2023/6/5 测试关闭
|
|
|
|
|
// :校验是否查询本企业发票
|
|
|
|
|
/*String xhfsbh = invoiceCheck.getXhfsbh() != null ? invoiceCheck.getXhfsbh() : ""; |
|
|
|
|