|
|
@ -146,33 +146,32 @@ public class RequestRecordServiceImpl extends MpBaseServiceImpl<RequestRecordDao |
|
|
|
|
|
|
|
|
|
|
|
log.info("重调后得到的结果:{}",JSONObject.toJSONString(invokeResponse)); |
|
|
|
log.info("重调后得到的结果:{}",JSONObject.toJSONString(invokeResponse)); |
|
|
|
|
|
|
|
|
|
|
|
Map<String,String> map = JSONObject.parseObject(JSONObject.toJSONString(invokeResponse), Map.class); |
|
|
|
JSONObject rspJson = JSONObject.parseObject(JSONObject.toJSONString(invokeResponse), JSONObject.class); |
|
|
|
|
|
|
|
|
|
|
|
data.put("data", invokeResponse); |
|
|
|
data.put("data", invokeResponse); |
|
|
|
|
|
|
|
|
|
|
|
if (map.containsKey("SAPKEY")) { |
|
|
|
if (rspJson.containsKey("SAPKEY")) { |
|
|
|
if (!map.containsValue("处理成功")) { |
|
|
|
if (!rspJson.containsKey("处理成功")) { |
|
|
|
updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data), map.get("ZMESSAGE"), 0); |
|
|
|
updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data), rspJson.getString("ZMESSAGE"), 0); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (map.containsKey("code")) { |
|
|
|
if (rspJson.containsKey("code")) { |
|
|
|
updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data), map.get("message"), 0); |
|
|
|
updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data), rspJson.getString("message"), 0); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (map.containsKey("cyjg")) { |
|
|
|
if (rspJson.containsKey("cyjg")) { |
|
|
|
updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data), map.get("cyjgxx"), 0); |
|
|
|
updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data), rspJson.getString("cyjgxx"), 0); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
updateSuccessfulRecallRecord(dbRecord, 0, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data)); |
|
|
|
updateSuccessfulRecallRecord(dbRecord, 0, JSONObject.toJSONString(invokeResponse), JSONObject.toJSONString(data)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
} |
|
|
|
}catch (Exception e) { |
|
|
|
catch (Exception e) { |
|
|
|
|
|
|
|
log.info("重调出现异常,异常信息:{}",e); |
|
|
|
log.info("重调出现异常,异常信息:{}",e); |
|
|
|
updateFailedRecallRecord(dbRecord, 1, JSONObject.toJSONString(invokeResponse), |
|
|
|
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))); |
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -217,7 +216,6 @@ public class RequestRecordServiceImpl extends MpBaseServiceImpl<RequestRecordDao |
|
|
|
record.setRecallResponseDetail(JSONObject.toJSONString(recallMap)); |
|
|
|
record.setRecallResponseDetail(JSONObject.toJSONString(recallMap)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
JSONObject.parseObject(record.getRecallResponseDetail(),LinkedHashMap.class).put("第"+ record.getRetryTimes() + 1+"次重调结果", recallResponseDetail); |
|
|
|
JSONObject.parseObject(record.getRecallResponseDetail(),LinkedHashMap.class).put("第"+ record.getRetryTimes() + 1+"次重调结果", recallResponseDetail); |
|
|
|
JSONObject.parseObject(record.getActiveCallRecallResponse(),LinkedHashMap.class).put("第"+ record.getRetryTimes() + 1+"次主动调用重调返回结果", activeCallRecallResponse); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|