|
|
@ -283,34 +283,8 @@ public class IfsCallErrorLogServiceImpl extends ServiceImpl<IfsCallErrorLogMappe |
|
|
String ifsResponse = null; |
|
|
String ifsResponse = null; |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
// 1. 从错误日志中恢复请求参数 - rqrq |
|
|
|
|
|
// if (errorLog.getRequestData() == null || errorLog.getRequestData().isEmpty()) { |
|
|
|
|
|
// 如果没有保存请求数据,重新构建 - rqrq |
|
|
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
|
|
params.put("ifsDBName", ifsDBName); |
|
|
|
|
|
params.put("domainUserID", domainUserID); |
|
|
|
|
|
params.put("ifsSiteID", errorLog.getSite()); |
|
|
|
|
|
params.put("partNo", errorLog.getPartNo()); |
|
|
|
|
|
params.put("qtyToIssue", errorLog.getQty()); |
|
|
|
|
|
params.put("locationNo", errorLog.getSourceLocation()); |
|
|
|
|
|
params.put("destLocationNo", errorLog.getDestLocation()); |
|
|
|
|
|
params.put("lotBatchNo", errorLog.getLotBatchNo()); |
|
|
|
|
|
|
|
|
|
|
|
if (errorLog.getExpiredDate() != null) { |
|
|
|
|
|
params.put("expiryDate", new SimpleDateFormat("yyyy-MM-dd").format(errorLog.getExpiredDate())); |
|
|
|
|
|
} else { |
|
|
|
|
|
params.put("expiryDate", null); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ObjectMapper objectMapper = new ObjectMapper(); |
|
|
|
|
|
jsonBody = objectMapper.writeValueAsString(params); |
|
|
|
|
|
// } else { |
|
|
|
|
|
// // 使用保存的请求数据 - rqrq |
|
|
|
|
|
// jsonBody = errorLog.getRequestData(); |
|
|
|
|
|
// } |
|
|
|
|
|
// |
|
|
|
|
|
System.out.println("请求数据: " + jsonBody); |
|
|
|
|
|
jsonBody = errorLog.getRequestData(); |
|
|
jsonBody = errorLog.getRequestData(); |
|
|
|
|
|
System.out.println("请求数据: " + jsonBody); |
|
|
// 2. 调用IFS接口 - rqrq |
|
|
// 2. 调用IFS接口 - rqrq |
|
|
ifsResponse = HttpUtils.doPost(ifsUrl + errorLog.getInterfaceName(), jsonBody, null); |
|
|
ifsResponse = HttpUtils.doPost(ifsUrl + errorLog.getInterfaceName(), jsonBody, null); |
|
|
|
|
|
|
|
|
|