|
@@ -887,10 +887,18 @@ public class SiQueryService {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
}
|
|
|
if (null == result.getInteger("code")) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
|
|
|
+ String message = result.getString("message");
|
|
|
+ if (null == message) {
|
|
|
+ message = result.getString(ERROR_MESSAGE);
|
|
|
+ }
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + message);
|
|
|
}
|
|
|
if (result.getIntValue("code") != 0) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心出错:" + result.getString("message"));
|
|
|
+ String message = result.getString("message");
|
|
|
+ if (null == message) {
|
|
|
+ message = result.getString(ERROR_MESSAGE);
|
|
|
+ }
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心出错:" + message);
|
|
|
}
|
|
|
JSONArray array = result.getJSONArray("data");
|
|
|
BigDecimal selfPaySum = new BigDecimal(0);
|
|
@@ -1215,7 +1223,11 @@ public class SiQueryService {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "没有查询到费用明细。");
|
|
|
}
|
|
|
for (int i = 0; i < output.size(); i++) {
|
|
|
- list.add(JSONObject.parseObject(output.getJSONObject(i).toJSONString(), SiSetlFeeDetl.class));
|
|
|
+ SiSetlFeeDetl fee = JSONObject.parseObject(output.getJSONObject(i).toJSONString(), SiSetlFeeDetl.class);
|
|
|
+ if (StringUtil.isBlank(fee.getSetlId())) {
|
|
|
+ fee.setSetlId(setlId);
|
|
|
+ }
|
|
|
+ list.add(fee);
|
|
|
if (list.size() == 30) {
|
|
|
dao.insertSetlFeeDetlBatch(list);
|
|
|
list.clear();
|