|
|
@ -136,6 +136,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
data.put("data", checkInvoiceResult); |
|
|
|
data.put("data", checkInvoiceResult); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord, JSONObject.toJSONString(data)); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord, JSONObject.toJSONString(data)); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("发票查验接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
|
log.error("发票查验接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
@ -155,6 +156,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("invoiceNumber"))) { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("invoiceNumber"))) { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0,JSONObject.toJSONString(R.error("发票号码不能为空!")), "发票号码不能为空!"); |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0,JSONObject.toJSONString(R.error("发票号码不能为空!")), "发票号码不能为空!"); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("发票查验接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
|
log.error("发票查验接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
@ -174,6 +176,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, |
|
|
|
JSONObject.toJSONString(R.error("开票日期不能为空!")), "开票日期不能为空!"); |
|
|
|
JSONObject.toJSONString(R.error("开票日期不能为空!")), "开票日期不能为空!"); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
@ -187,6 +190,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("invoiceType"))) { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("invoiceType"))) { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, |
|
|
|
JSONObject.toJSONString(R.error("发票类型不能为空!")), "发票类型不能为空!"); |
|
|
|
JSONObject.toJSONString(R.error("发票类型不能为空!")), "发票类型不能为空!"); |
|
|
|
} catch (BaseException e) { |
|
|
|
} catch (BaseException e) { |
|
|
@ -206,6 +210,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("totalAmount"))) { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("totalAmount"))) { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, |
|
|
|
JSONObject.toJSONString(R.error("金额不能为空!")), "金额不能为空!"); |
|
|
|
JSONObject.toJSONString(R.error("金额不能为空!")), "金额不能为空!"); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
@ -219,6 +224,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("checkCode"))) { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("checkCode"))) { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, |
|
|
|
JSONObject.toJSONString(R.error("校验码不能为空!")), "校验码不能为空!"); |
|
|
|
JSONObject.toJSONString(R.error("校验码不能为空!")), "校验码不能为空!"); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
@ -242,6 +248,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
if (notes != null) { |
|
|
|
if (notes != null) { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0, |
|
|
|
JSONObject.toJSONString(R.error(notes)), notes); |
|
|
|
JSONObject.toJSONString(R.error(notes)), notes); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
@ -303,6 +310,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
// saveCheckLog(pramsMap, checkInvoice);
|
|
|
|
// saveCheckLog(pramsMap, checkInvoice);
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
if (checkInvoiceResult.containsKey("code")) { |
|
|
|
if (checkInvoiceResult.containsKey("code")) { |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0,JSONObject.toJSONString(data), |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0,JSONObject.toJSONString(data), |
|
|
|
(String) checkInvoiceResult.get("message")); |
|
|
|
(String) checkInvoiceResult.get("message")); |
|
|
@ -346,6 +354,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
// saveCheckLog(pramsMap,checkInvoice);
|
|
|
|
// saveCheckLog(pramsMap,checkInvoice);
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord, JSONObject.toJSONString(data)); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord, JSONObject.toJSONString(data)); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("发票查验接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
|
log.error("发票查验接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
@ -373,6 +382,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
log.error("查验失败,errormsg:{}",e.getMessage()); |
|
|
|
log.error("查验失败,errormsg:{}",e.getMessage()); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,1,JSONObject.toJSONString(R.error("查验失败,"+e.getMessage())), |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,1,JSONObject.toJSONString(R.error("查验失败,"+e.getMessage())), |
|
|
|
"查验失败,异常信息:{}"+JSONObject.toJSONString(e.getMessage())); |
|
|
|
"查验失败,异常信息:{}"+JSONObject.toJSONString(e.getMessage())); |
|
|
|
} catch (Exception exception) { |
|
|
|
} catch (Exception exception) { |
|
|
@ -390,6 +400,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
data = errorInfo(checkInvoiceResult, data); |
|
|
|
data = errorInfo(checkInvoiceResult, data); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0,JSONObject.toJSONString(data), |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord, 0,JSONObject.toJSONString(data), |
|
|
|
(String) checkInvoiceResult.get("cyjgxx")); |
|
|
|
(String) checkInvoiceResult.get("cyjgxx")); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
@ -411,6 +422,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
signSaveInvoiceInfoService.saveQueryInvoiceResult(checkInvoiceResult, userid, "1", dbName); |
|
|
|
signSaveInvoiceInfoService.saveQueryInvoiceResult(checkInvoiceResult, userid, "1", dbName); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord,JSONObject.toJSONString(data)); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord,JSONObject.toJSONString(data)); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("发票查验接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
|
log.error("发票查验接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
@ -449,6 +461,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
data.put("data", checkInvoiceResult); |
|
|
|
data.put("data", checkInvoiceResult); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord,JSONObject.toJSONString(data)); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(singleInvoiceCheckRecord,JSONObject.toJSONString(data)); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("发票查验接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
|
log.error("发票查验接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
@ -460,6 +473,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0,JSONObject.toJSONString(R.error().put("data", checkInvoiceResult)), |
|
|
|
requestRecordService.saveFailedRequestRecord(singleInvoiceCheckRecord,0,JSONObject.toJSONString(R.error().put("data", checkInvoiceResult)), |
|
|
|
"未知异常,请联系管理员"); |
|
|
|
"未知异常,请联系管理员"); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
@ -799,6 +813,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
data.put("data", result); |
|
|
|
data.put("data", result); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(record,0, JSONObject.toJSONString(R.error(result)), result); |
|
|
|
requestRecordService.saveFailedRequestRecord(record,0, JSONObject.toJSONString(R.error(result)), result); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("发票同步接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
|
log.error("发票同步接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
@ -829,6 +844,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
data.put("data", result); |
|
|
|
data.put("data", result); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(record, JSONObject.toJSONString(data)); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(record, JSONObject.toJSONString(data)); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("发票同步接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
|
log.error("发票同步接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
@ -842,6 +858,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
|
|
|
|
|
|
|
// 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);
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(record,1, JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_PUSH_SDNY)), |
|
|
|
requestRecordService.saveFailedRequestRecord(record,1, JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_PUSH_SDNY)), |
|
|
|
"推送sap失败,失败原因:"+"{"+JSONObject.toJSONString(e)+"}"); |
|
|
|
"推送sap失败,失败原因:"+"{"+JSONObject.toJSONString(e)+"}"); |
|
|
|
} catch (Exception exception) { |
|
|
|
} catch (Exception exception) { |
|
|
@ -870,6 +887,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
data.put("data", ""); |
|
|
|
data.put("data", ""); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(record, JSONObject.toJSONString(data)); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(record, JSONObject.toJSONString(data)); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("发票同步接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
|
log.error("发票同步接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
@ -895,6 +913,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
data.put("data", ""); |
|
|
|
data.put("data", ""); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(record, JSONObject.toJSONString(data)); |
|
|
|
requestRecordService.saveSuccessfulRequestRecord(record, JSONObject.toJSONString(data)); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("发票同步接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
|
log.error("发票同步接口记录保存失败,errormsg:{}",e.getMessage()); |
|
|
@ -910,6 +929,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
exception.printStackTrace(); |
|
|
|
exception.printStackTrace(); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(record,1, JSONObject.toJSONString(R.error(CommonConstants.CONNECT_TIMEOUT)), |
|
|
|
requestRecordService.saveFailedRequestRecord(record,1, JSONObject.toJSONString(R.error(CommonConstants.CONNECT_TIMEOUT)), |
|
|
|
"同步SAP失败,报错信息为:"+"{"+JSONObject.toJSONString(exception)+"}"); |
|
|
|
"同步SAP失败,报错信息为:"+"{"+JSONObject.toJSONString(exception)+"}"); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
@ -923,6 +943,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
exception.printStackTrace(); |
|
|
|
exception.printStackTrace(); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(record,1, JSONObject.toJSONString(R.error(CommonConstants.NULL_POINTER_TIMEOUT)), |
|
|
|
requestRecordService.saveFailedRequestRecord(record,1, JSONObject.toJSONString(R.error(CommonConstants.NULL_POINTER_TIMEOUT)), |
|
|
|
"同步SAP失败,报错信息为:"+"{"+JSONObject.toJSONString(exception)+"}"); |
|
|
|
"同步SAP失败,报错信息为:"+"{"+JSONObject.toJSONString(exception)+"}"); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
@ -936,6 +957,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
exception.printStackTrace(); |
|
|
|
exception.printStackTrace(); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); |
|
|
|
requestRecordService.saveFailedRequestRecord(record,1, JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT)), |
|
|
|
requestRecordService.saveFailedRequestRecord(record,1, JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT)), |
|
|
|
"同步SAP失败,报错信息为:"+"{"+JSONObject.toJSONString(exception)+"}"); |
|
|
|
"同步SAP失败,报错信息为:"+"{"+JSONObject.toJSONString(exception)+"}"); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|