|
|
@ -106,6 +106,9 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private GatherService gatherService; |
|
|
|
private GatherService gatherService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private RequestRecordService requestRecordService; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 查验发票 |
|
|
|
* 查验发票 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -117,6 +120,8 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
String userid = "101833"; |
|
|
|
String userid = "101833"; |
|
|
|
String dbName = "business"; |
|
|
|
String dbName = "business"; |
|
|
|
JSONObject checkInvoiceResult = null; |
|
|
|
JSONObject checkInvoiceResult = null; |
|
|
|
|
|
|
|
RequestRecord singleInvoiceCheckRecord = requestRecordService.getBaseRequestRecord(JSONObject.toJSONString(pramsMap), |
|
|
|
|
|
|
|
"/singleInvoiceCheck",pramsMap.get("invoiceCode"),pramsMap.get("invoiceNumber"), "singleInvoiceCheck"); |
|
|
|
|
|
|
|
|
|
|
|
//挡板开关
|
|
|
|
//挡板开关
|
|
|
|
if ("1".equals(isPresure)) { |
|
|
|
if ("1".equals(isPresure)) { |
|
|
@ -129,6 +134,8 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
data.put("message", "success"); |
|
|
|
data.put("message", "success"); |
|
|
|
data.put("data", checkInvoiceResult); |
|
|
|
data.put("data", checkInvoiceResult); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord, 0,0, JSONObject.toJSONString(data)); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -139,6 +146,9 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
log.info("查验类发票,执行查验操作后入库"); |
|
|
|
log.info("查验类发票,执行查验操作后入库"); |
|
|
|
//权限校验
|
|
|
|
//权限校验
|
|
|
|
if (StringUtils.isBlank(pramsMap.get("invoiceNumber"))) { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("invoiceNumber"))) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,1,1,JSONObject.toJSONString(R.error("发票号码不能为空!")),0); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error("发票号码不能为空!"))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error("发票号码不能为空!"))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -150,10 +160,16 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
pramsMap.put("invoiceDate", billingDate); |
|
|
|
pramsMap.put("invoiceDate", billingDate); |
|
|
|
pramsMap.put("billingDate", billingDate); |
|
|
|
pramsMap.put("billingDate", billingDate); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,1,1,JSONObject.toJSONString(R.error("开票日期不能为空!")), 0); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error("开票日期不能为空!"))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error("开票日期不能为空!"))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(pramsMap.get("invoiceType"))) { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("invoiceType"))) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,1,1,JSONObject.toJSONString(R.error("发票类型不能为空!")), 0); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error("发票类型不能为空!"))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error("发票类型不能为空!"))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -164,10 +180,16 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|| SNFplxEnum.QDZP.getSnFplxDm().equals(pramsMap.get("invoiceType")) |
|
|
|
|| SNFplxEnum.QDZP.getSnFplxDm().equals(pramsMap.get("invoiceType")) |
|
|
|
|| SNFplxEnum.QDPP.getSnFplxDm().equals(pramsMap.get("invoiceType"))) { |
|
|
|
|| SNFplxEnum.QDPP.getSnFplxDm().equals(pramsMap.get("invoiceType"))) { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("totalAmount"))) { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("totalAmount"))) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,1,1,JSONObject.toJSONString(R.error("金额不能为空!")), 0); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error("金额不能为空!"))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error("金额不能为空!"))); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("checkCode"))) { |
|
|
|
if (StringUtils.isBlank(pramsMap.get("checkCode"))) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,1,1,JSONObject.toJSONString(R.error("校验码不能为空!")), 0); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error("校验码不能为空!"))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error("校验码不能为空!"))); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -182,6 +204,9 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
log.info("uuid={}", uuid); |
|
|
|
log.info("uuid={}", uuid); |
|
|
|
String notes = invoiceQueryService.checkingInvoiceInfo("business", uuid, getUserInfo()); |
|
|
|
String notes = invoiceQueryService.checkingInvoiceInfo("business", uuid, getUserInfo()); |
|
|
|
if (notes != null) { |
|
|
|
if (notes != null) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,1,1,JSONObject.toJSONString(R.error(notes)), 0); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error(notes))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error(notes))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -201,12 +226,20 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
List<BaseTDxRecordInvoiceDetail> baseTDxRecordInvoiceDetail = baseTDxRecordInvoiceDetailDao.selectList(detailWrapper); |
|
|
|
List<BaseTDxRecordInvoiceDetail> baseTDxRecordInvoiceDetail = baseTDxRecordInvoiceDetailDao.selectList(detailWrapper); |
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ); |
|
|
|
DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// RequestRecord singleCheckInvoiceRecord = null;
|
|
|
|
if(baseTDxRecordInvoiceDetail != null && baseTDxRecordInvoiceDetail.size() == 0){ |
|
|
|
if(baseTDxRecordInvoiceDetail != null && baseTDxRecordInvoiceDetail.size() == 0){ |
|
|
|
//先删除原有主数据,再查验更新主数据和明细数据
|
|
|
|
//先删除原有主数据,再查验更新主数据和明细数据
|
|
|
|
int delete = baseTDxRecordInvoiceDao.delete(recordWrapper); |
|
|
|
int delete = baseTDxRecordInvoiceDao.delete(recordWrapper); |
|
|
|
if(delete > 0) { |
|
|
|
if(delete > 0) { |
|
|
|
|
|
|
|
// singleCheckInvoiceRecord =requestRecordService.getBaseRequestRecord(JSONObject.toJSONString(pramsMap),
|
|
|
|
|
|
|
|
// "/singleInvoiceCheck", pramsMap.get("invoiceCode"),pramsMap.get("invoiceNumber"),
|
|
|
|
|
|
|
|
// "singleCheckInvoice",1);
|
|
|
|
|
|
|
|
|
|
|
|
checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap); |
|
|
|
checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
singleInvoiceCheckRecord.setActiveCall("singleCheckInvoice"); |
|
|
|
|
|
|
|
singleInvoiceCheckRecord.setActiveCallResponse(JSONObject.toJSONString(checkInvoiceResult)); |
|
|
|
|
|
|
|
|
|
|
|
if (!checkInvoiceResult.containsKey("code")) { |
|
|
|
if (!checkInvoiceResult.containsKey("code")) { |
|
|
|
if (!checkInvoiceResult.containsKey("cyjg")) { |
|
|
|
if (!checkInvoiceResult.containsKey("cyjg")) { |
|
|
|
checkInvoiceResult.put("invoiceNo", checkInvoiceResult.getString("invoiceNumber")); |
|
|
|
checkInvoiceResult.put("invoiceNo", checkInvoiceResult.getString("invoiceNumber")); |
|
|
@ -228,6 +261,16 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
//查验结果保存
|
|
|
|
//查验结果保存
|
|
|
|
// saveCheckLog(pramsMap, checkInvoice);
|
|
|
|
// saveCheckLog(pramsMap, checkInvoice);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (checkInvoiceResult!=null && checkInvoiceResult.containsKey("code")) { |
|
|
|
|
|
|
|
if (checkInvoiceResult.containsKey("cyjg")) { |
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,1,1,JSONObject.toJSONString(data), 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,0,0,JSONObject.toJSONString(data)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
TdxSaleRecordInvoice tdxSaleRecordInvoice = tdxSaleRecordInvoiceDao.selectByUuid(uuid); |
|
|
|
TdxSaleRecordInvoice tdxSaleRecordInvoice = tdxSaleRecordInvoiceDao.selectByUuid(uuid); |
|
|
@ -252,18 +295,27 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
//查验结果保存
|
|
|
|
//查验结果保存
|
|
|
|
// saveCheckLog(pramsMap,checkInvoice);
|
|
|
|
// saveCheckLog(pramsMap,checkInvoice);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,0,0,JSONObject.toJSONString(data)); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RequestRecord singleCheckInvoiceRecord =requestRecordService.getBaseRequestRecord(JSONObject.toJSONString(pramsMap), |
|
|
|
|
|
|
|
"/singleInvoiceCheck", pramsMap.get("invoiceCode"),pramsMap.get("invoiceNumber"), |
|
|
|
|
|
|
|
"singleCheckInvoice",1); |
|
|
|
try { |
|
|
|
try { |
|
|
|
checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap); |
|
|
|
checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap); |
|
|
|
|
|
|
|
|
|
|
|
log.info("查验结果为:{}", checkInvoiceResult); |
|
|
|
log.info("查验结果为:{}", checkInvoiceResult); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
|
log.error("查验失败,errormsg:{}",e.getMessage()); |
|
|
|
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()))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error("查验失败,"+e.getMessage()))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -272,6 +324,10 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
if (checkInvoiceResult.containsKey("cyjg") && !"0001".equals(checkInvoiceResult.getString("cyjg"))) { |
|
|
|
if (checkInvoiceResult.containsKey("cyjg") && !"0001".equals(checkInvoiceResult.getString("cyjg"))) { |
|
|
|
R data = new R(); |
|
|
|
R data = new R(); |
|
|
|
data = errorInfo(checkInvoiceResult, data); |
|
|
|
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)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -285,6 +341,9 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
checkInvoiceResult.put("invoiceNo", checkInvoiceResult.getString("invoiceNumber")); |
|
|
|
checkInvoiceResult.put("invoiceNo", checkInvoiceResult.getString("invoiceNumber")); |
|
|
|
log.info("返回给影像系统的结果为:{}", checkInvoiceResult); |
|
|
|
log.info("返回给影像系统的结果为:{}", checkInvoiceResult); |
|
|
|
signSaveInvoiceInfoService.saveQueryInvoiceResult(checkInvoiceResult, userid, "1", dbName); |
|
|
|
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)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
@ -305,9 +364,15 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
data.put("data", checkInvoiceResult); |
|
|
|
data.put("data", checkInvoiceResult); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,0,0,JSONObject.toJSONString(data)); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(singleInvoiceCheckRecord,1,1,JSONObject.toJSONString(R.error().put("data", checkInvoiceResult)),0); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error().put("data", checkInvoiceResult))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error().put("data", checkInvoiceResult))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -559,6 +624,21 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
|
|
|
|
|
|
|
log.info("影像系统同步数据:{}", JSONObject.toJSONString(snRequestObject)); |
|
|
|
log.info("影像系统同步数据:{}", JSONObject.toJSONString(snRequestObject)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<RequestRecord> recordList = new ArrayList<>(); |
|
|
|
|
|
|
|
List<String> invoiceCodes = new ArrayList<>(); |
|
|
|
|
|
|
|
List<String> invoiceNos = new ArrayList<>(); |
|
|
|
|
|
|
|
if (snRequestObject.getInvoiceInfoList()!=null &&snRequestObject.getInvoiceInfoList().size()>0) { |
|
|
|
|
|
|
|
snRequestObject.getInvoiceInfoList().stream().forEach(invoiceInfo->{ |
|
|
|
|
|
|
|
invoiceCodes.add(invoiceInfo.getInvoiceCode()); |
|
|
|
|
|
|
|
invoiceNos.add(invoiceInfo.getInvoiceNumber()); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
RequestRecord record = requestRecordService.getBaseRequestRecord(JSONObject.toJSONString(snRequestObject), |
|
|
|
|
|
|
|
"/syncInvoiceInfo", |
|
|
|
|
|
|
|
JSONObject.toJSONString(invoiceCodes), |
|
|
|
|
|
|
|
JSONObject.toJSONString(invoiceNos), |
|
|
|
|
|
|
|
"syncInvoiceInfo", 0); |
|
|
|
|
|
|
|
|
|
|
|
String dbName = "business"; |
|
|
|
String dbName = "business"; |
|
|
|
// 入参统一在入口处理
|
|
|
|
// 入参统一在入口处理
|
|
|
|
String orgCode = snRequestObject.getCompCode(); |
|
|
|
String orgCode = snRequestObject.getCompCode(); |
|
|
@ -619,6 +699,9 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
if (!"ok".equals(result) && !"0000".equals(result)) { |
|
|
|
if (!"ok".equals(result) && !"0000".equals(result)) { |
|
|
|
R data = new R(1000, "default success"); |
|
|
|
R data = new R(1000, "default success"); |
|
|
|
data.put("data", result); |
|
|
|
data.put("data", result); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(record,0, 0, JSONObject.toJSONString(R.error(result))); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error(result))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error(result))); |
|
|
|
} |
|
|
|
} |
|
|
|
SAPInvoiceInfo info = convertToSapOnject(invoice, imageId, compCode); |
|
|
|
SAPInvoiceInfo info = convertToSapOnject(invoice, imageId, compCode); |
|
|
@ -631,16 +714,29 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
JSONObject request = new JSONObject(); |
|
|
|
JSONObject request = new JSONObject(); |
|
|
|
request.put("IS_INPUT", object); |
|
|
|
request.put("IS_INPUT", object); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RequestRecord pushCheckResultToSAPRecord =requestRecordService.getBaseRequestRecord(request.toJSONString(), |
|
|
|
|
|
|
|
"/syncInvoiceInfo", |
|
|
|
|
|
|
|
JSONObject.toJSONString(invoiceCodes), |
|
|
|
|
|
|
|
JSONObject.toJSONString(invoiceNos), |
|
|
|
|
|
|
|
"pushCheckResultToSAP", 1); |
|
|
|
try { |
|
|
|
try { |
|
|
|
//将信息推送到影像系统
|
|
|
|
//将信息推送到影像系统
|
|
|
|
result = snPushCheckRecordService.pushCheckResultToSAP(request.toJSONString()); |
|
|
|
result = snPushCheckRecordService.pushCheckResultToSAP(request.toJSONString()); |
|
|
|
|
|
|
|
|
|
|
|
R data = new R(1000, "default success"); |
|
|
|
R data = new R(1000, "default success"); |
|
|
|
data.put("data", result); |
|
|
|
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)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
|
log.error("", e); |
|
|
|
log.error("", e); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_PUSH_SDNY))); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -660,6 +756,9 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
|
|
|
|
|
|
|
R data = new R(1000, "default success"); |
|
|
|
R data = new R(1000, "default success"); |
|
|
|
data.put("data", ""); |
|
|
|
data.put("data", ""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(record,0, 0, JSONObject.toJSONString(data)); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//删除对应的影像号
|
|
|
|
//删除对应的影像号
|
|
|
@ -677,6 +776,9 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
} |
|
|
|
} |
|
|
|
R data = new R(1000, "default success"); |
|
|
|
R data = new R(1000, "default success"); |
|
|
|
data.put("data", ""); |
|
|
|
data.put("data", ""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(record,0, 0, JSONObject.toJSONString(data)); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -684,14 +786,23 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
} catch (TimeoutException exception) { |
|
|
|
} catch (TimeoutException exception) { |
|
|
|
log.error("同步SAP失败,报错信息为:{}", exception); |
|
|
|
log.error("同步SAP失败,报错信息为:{}", exception); |
|
|
|
exception.printStackTrace(); |
|
|
|
exception.printStackTrace(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(record,1, 1, JSONObject.toJSONString(R.error(CommonConstants.CONNECT_TIMEOUT)),1); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.CONNECT_TIMEOUT))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.CONNECT_TIMEOUT))); |
|
|
|
} catch(NullPointerException exception){ |
|
|
|
} catch(NullPointerException exception){ |
|
|
|
log.error("同步SAP失败,报错信息为:{}", exception); |
|
|
|
log.error("同步SAP失败,报错信息为:{}", exception); |
|
|
|
exception.printStackTrace(); |
|
|
|
exception.printStackTrace(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(record,1, 1, JSONObject.toJSONString(R.error(CommonConstants.NULL_POINTER_TIMEOUT)), 1); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.NULL_POINTER_TIMEOUT))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.NULL_POINTER_TIMEOUT))); |
|
|
|
} catch(Exception exception){ |
|
|
|
} catch(Exception exception){ |
|
|
|
log.error("同步SAP失败,报错信息为:{}", exception); |
|
|
|
log.error("同步SAP失败,报错信息为:{}", exception); |
|
|
|
exception.printStackTrace(); |
|
|
|
exception.printStackTrace(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestRecordService.saveRecord(record,1, 1, JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT)),1); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|