|
|
|
@ -110,7 +110,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
@PostMapping("/singleInvoiceCheck") |
|
|
|
|
@ResponseBody |
|
|
|
|
@SysLog("发票查验") |
|
|
|
|
public ResponseEntity<String> singleInvoiceCheck(@RequestBody Map<String, String> pramsMap) throws ParseException { |
|
|
|
|
public ResponseEntity<String> singleInvoiceCheck(@RequestBody Map<String, String> pramsMap) throws Exception { |
|
|
|
|
log.info("传入的参数为:{}", pramsMap); |
|
|
|
|
String userid = "101833"; |
|
|
|
|
String dbName = "business"; |
|
|
|
@ -197,8 +197,25 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
detailWrapper.eq("uuid", uuid); |
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.DETAIL_READ); |
|
|
|
|
List<BaseTDxRecordInvoiceDetail> baseTDxRecordInvoiceDetail = baseTDxRecordInvoiceDetailDao.selectList(detailWrapper); |
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ); |
|
|
|
|
|
|
|
|
|
if(baseTDxRecordInvoiceDetail != null && baseTDxRecordInvoiceDetail.size() == 0){ |
|
|
|
|
//先删除原有主数据,再查验更新主数据和明细数据
|
|
|
|
|
int delete = baseTDxRecordInvoiceDao.delete(recordWrapper); |
|
|
|
|
if(delete > 0) { |
|
|
|
|
checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap); |
|
|
|
|
|
|
|
|
|
if (!checkInvoiceResult.containsKey("code")) { |
|
|
|
|
if (!checkInvoiceResult.containsKey("cyjg")) { |
|
|
|
|
checkInvoiceResult.put("invoiceNo", checkInvoiceResult.getString("invoiceNumber")); |
|
|
|
|
signSaveInvoiceInfoService.saveQueryInvoiceResult(checkInvoiceResult, userid, "1", dbName); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.DETAIL_READ); |
|
|
|
|
baseTDxRecordInvoiceDetail = baseTDxRecordInvoiceDetailDao.selectList(detailWrapper); |
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
JSONObject checkInvoice = (JSONObject) JSONObject.toJSON(checkInvoiceByUuid); |
|
|
|
|
JSONArray checkInvoiceDetail = (JSONArray) JSONObject.toJSON(baseTDxRecordInvoiceDetail); |
|
|
|
|