|
|
|
@ -302,18 +302,19 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
RequestRecord singleCheckInvoiceRecord =requestRecordService.getBaseRequestRecord(JSONObject.toJSONString(pramsMap), |
|
|
|
|
"/singleInvoiceCheck", pramsMap.get("invoiceCode"),pramsMap.get("invoiceNumber"), |
|
|
|
|
"singleCheckInvoice",1); |
|
|
|
|
// RequestRecord singleCheckInvoiceRecord =requestRecordService.getBaseRequestRecord(JSONObject.toJSONString(pramsMap),
|
|
|
|
|
// "/singleInvoiceCheck", pramsMap.get("invoiceCode"),pramsMap.get("invoiceNumber"),
|
|
|
|
|
// "singleCheckInvoice",1);
|
|
|
|
|
try { |
|
|
|
|
checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap); |
|
|
|
|
singleInvoiceCheckRecord.setActiveCall("singleCheckInvoice"); |
|
|
|
|
singleInvoiceCheckRecord.setActiveCallResponse(JSONObject.toJSONString(checkInvoiceResult)); |
|
|
|
|
|
|
|
|
|
log.info("查验结果为:{}", checkInvoiceResult); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
log.error("查验失败,errormsg:{}",e.getMessage()); |
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleCheckInvoiceRecord,1,1,JSONObject.toJSONString(R.error("查验失败,"+e.getMessage())),1); |
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,1,1,JSONObject.toJSONString(R.error("查验失败,"+e.getMessage())), 1); |
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error("查验失败,"+e.getMessage()))); |
|
|
|
@ -326,7 +327,6 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
data = errorInfo(checkInvoiceResult, data); |
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,1,1,JSONObject.toJSONString(data), 0); |
|
|
|
|
requestRecordService.saveRecord(singleCheckInvoiceRecord,1,1,JSONObject.toJSONString(checkInvoiceResult), 0); |
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
|
|
|
|
|
@ -343,7 +343,6 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
signSaveInvoiceInfoService.saveQueryInvoiceResult(checkInvoiceResult, userid, "1", dbName); |
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,0,0,JSONObject.toJSONString(data)); |
|
|
|
|
requestRecordService.saveRecord(singleCheckInvoiceRecord,0,0,JSONObject.toJSONString(checkInvoiceResult)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
@ -637,7 +636,8 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
"/syncInvoiceInfo", |
|
|
|
|
JSONObject.toJSONString(invoiceCodes), |
|
|
|
|
JSONObject.toJSONString(invoiceNos), |
|
|
|
|
"syncInvoiceInfo", 0); |
|
|
|
|
"syncInvoiceInfo"); |
|
|
|
|
record.setImageId(snRequestObject.getImageId()); |
|
|
|
|
|
|
|
|
|
String dbName = "business"; |
|
|
|
|
// 入参统一在入口处理
|
|
|
|
@ -714,19 +714,21 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
JSONObject request = new JSONObject(); |
|
|
|
|
request.put("IS_INPUT", object); |
|
|
|
|
|
|
|
|
|
RequestRecord pushCheckResultToSAPRecord =requestRecordService.getBaseRequestRecord(request.toJSONString(), |
|
|
|
|
"/syncInvoiceInfo", |
|
|
|
|
JSONObject.toJSONString(invoiceCodes), |
|
|
|
|
JSONObject.toJSONString(invoiceNos), |
|
|
|
|
"pushCheckResultToSAP", 1); |
|
|
|
|
// RequestRecord pushCheckResultToSAPRecord =requestRecordService.getBaseRequestRecord(request.toJSONString(),
|
|
|
|
|
// "/syncInvoiceInfo",
|
|
|
|
|
// JSONObject.toJSONString(invoiceCodes),
|
|
|
|
|
// JSONObject.toJSONString(invoiceNos),
|
|
|
|
|
// "pushCheckResultToSAP", 1);
|
|
|
|
|
try { |
|
|
|
|
record.setActiveCall("pushCheckResultToSAP"); |
|
|
|
|
//将信息推送到影像系统
|
|
|
|
|
result = snPushCheckRecordService.pushCheckResultToSAP(request.toJSONString()); |
|
|
|
|
|
|
|
|
|
record.setActiveCallResponse(JSONObject.toJSONString(result)); |
|
|
|
|
|
|
|
|
|
R data = new R(1000, "default success"); |
|
|
|
|
data.put("data", result); |
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(pushCheckResultToSAPRecord,0, 0, JSONObject.toJSONString(data)); |
|
|
|
|
requestRecordService.saveRecord(record,0, 0, JSONObject.toJSONString(data)); |
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
@ -734,7 +736,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
log.error("", e); |
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(pushCheckResultToSAPRecord,1, 1, JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_PUSH_SDNY)), 1); |
|
|
|
|
// requestRecordService.saveRecord(pushCheckResultToSAPRecord,1, 1, JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_PUSH_SDNY)), 1);
|
|
|
|
|
requestRecordService.saveRecord(record,1, 1, JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_PUSH_SDNY)), 1); |
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_PUSH_SDNY))); |
|
|
|
|