|
|
|
@ -276,6 +276,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ); |
|
|
|
|
|
|
|
|
|
if(baseTDxRecordInvoiceDetail != null && baseTDxRecordInvoiceDetail.size() != 0){ |
|
|
|
|
log.info("发票明细不为空,明细:{}",JSONObject.toJSONString(baseTDxRecordInvoiceDetail)); |
|
|
|
|
//先删除原有主数据,再查验更新主数据和明细数据
|
|
|
|
|
int delete = baseTDxRecordInvoiceDao.delete(recordWrapper); |
|
|
|
|
if(delete > 0) { |
|
|
|
@ -310,17 +311,21 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
// saveCheckLog(pramsMap, checkInvoice);
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
|
|
|
|
|
|
if (checkInvoiceResult.containsKey("code")) { |
|
|
|
|
log.info("发票详细:{}",JSONObject.toJSONString(baseTDxRecordInvoiceDetail)); |
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0,JSONObject.toJSONString(data), |
|
|
|
|
(String) checkInvoiceResult.get("message")); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
|
if (checkInvoiceResult.containsKey("cyjg") && !"0001".equals(checkInvoiceResult.getString("cyjg"))) { |
|
|
|
|
log.info("进项票池已存在发票,查验结果:{}",JSONObject.toJSON(checkInvoiceResult)); |
|
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0,JSONObject.toJSONString(data), |
|
|
|
|
(String) checkInvoiceResult.get("cyjgxx")); |
|
|
|
|
} else { |
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
|
requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord,JSONObject.toJSONString(data)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|