diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/RequestRecordServiceImpl.java b/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/RequestRecordServiceImpl.java index 2f238dfd..f9be9d4e 100644 --- a/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/RequestRecordServiceImpl.java +++ b/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/RequestRecordServiceImpl.java @@ -146,33 +146,32 @@ public class RequestRecordServiceImpl extends MpBaseServiceImpl map = JSONObject.parseObject(JSONObject.toJSONString(invokeResponse), Map.class); + JSONObject rspJson = JSONObject.parseObject(JSONObject.toJSONString(invokeResponse), JSONObject.class); data.put("data", invokeResponse); - if (map.containsKey("SAPKEY")) { - if (!map.containsValue("处理成功")) { - updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data), map.get("ZMESSAGE"), 0); + if (rspJson.containsKey("SAPKEY")) { + if (!rspJson.containsKey("处理成功")) { + updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data), rspJson.getString("ZMESSAGE"), 0); return ResponseEntity.ok(JSONObject.toJSONString(data)); } } - if (map.containsKey("code")) { - updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data), map.get("message"), 0); + if (rspJson.containsKey("code")) { + updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data), rspJson.getString("message"), 0); return ResponseEntity.ok(JSONObject.toJSONString(data)); } else { - if (map.containsKey("cyjg")) { - updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data), map.get("cyjgxx"), 0); + if (rspJson.containsKey("cyjg")) { + updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data), rspJson.getString("cyjgxx"), 0); return ResponseEntity.ok(JSONObject.toJSONString(data)); } } updateSuccessfulRecallRecord(dbRecord, 0, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data)); return ResponseEntity.ok(JSONObject.toJSONString(data)); - } - catch (Exception e) { + }catch (Exception e) { log.info("重调出现异常,异常信息:{}",e); updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), - JSONObject.toJSONString(data), "重调用失败,异常信息:{}"+JSONObject.toJSONString(e.getMessage()), 0); + JSONObject.toJSONString(data), "重调用出现异常:"+JSONObject.toJSONString(e.getMessage()), 0); return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT))); } @@ -217,7 +216,6 @@ public class RequestRecordServiceImpl extends MpBaseServiceImpl