|
@@ -104,13 +104,14 @@ public class SiZyService {
|
|
|
input.getJSONObject("input").put("diseinfo", JSONArray.parse(diseRef));
|
|
|
JSONObject result = exec.executeTrade(input, SiFunction.ADMISSION_REGISTRATION);
|
|
|
log.info("【操作员:{}】,医保入院登记:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
|
|
|
- logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
|
|
|
if (null == result) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
}
|
|
|
- if (null == result.getInteger(RESULT_CODE)) {
|
|
|
+ Integer infcode = result.getInteger(RESULT_CODE);
|
|
|
+ if (null == infcode) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
|
|
|
}
|
|
|
+ logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
|
|
|
if (result.getIntValue(RESULT_CODE) == 0) {
|
|
|
JSONObject output = result.getJSONObject(OUTPUT);
|
|
|
String mdtrtId = output.getJSONObject("result").getString("mdtrt_id");
|
|
@@ -155,7 +156,8 @@ public class SiZyService {
|
|
|
input.getJSONObject("input").put("diseinfo", JSONArray.parse(diseRef));
|
|
|
JSONObject result = exec.executeTrade(input, SiFunction.MODIFY_ADMISSION_INFO);
|
|
|
log.info("【操作员:{}】,入院信息变更:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
|
|
|
- logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
|
|
|
+ Integer infcode = result.getInteger(RESULT_CODE);
|
|
|
+ logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
|
|
|
return SiUtil.makeReturnWithoutOutput(result, "变更住院信息成功。");
|
|
|
}
|
|
|
|
|
@@ -172,14 +174,15 @@ public class SiZyService {
|
|
|
input.getJSONObject("input").put("data", data);
|
|
|
JSONObject result = exec.executeTrade(input, SiFunction.REVOKE_ADMISSION);
|
|
|
log.info("【操作员:{}】,取消入院登记:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
|
|
|
- logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
|
|
|
if (null == result) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
}
|
|
|
- if (null == result.getInteger(RESULT_CODE)) {
|
|
|
+ Integer infcode = result.getInteger(RESULT_CODE);
|
|
|
+ logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
|
|
|
+ if (null == infcode) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
|
|
|
}
|
|
|
- if (result.getIntValue(RESULT_CODE) == 0) {
|
|
|
+ if (infcode == 0) {
|
|
|
qrydao.clearMdtrtIdForZy(siPatInfo.getPatNo(), siPatInfo.getTimes(), siPatInfo.getLedgerSn(), null);
|
|
|
dao.updateResponceType("01", null, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
|
|
|
return ResultVoUtil.success("取消入院登记成功。");
|
|
@@ -207,14 +210,15 @@ public class SiZyService {
|
|
|
input.getJSONObject("input").put("data", JSONObject.parseObject(ref));
|
|
|
JSONObject result = exec.executeTrade(input, SiFunction.HOSPITALIZATION_PRE_SETTLEMENT);
|
|
|
log.info("预结算:\n参数:{},\n结果:{}", input, result);
|
|
|
- logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
|
|
|
if (null == result) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
}
|
|
|
- if (null == result.getInteger(RESULT_CODE)) {
|
|
|
+ Integer infcode = result.getInteger(RESULT_CODE);
|
|
|
+ logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
|
|
|
+ if (null == infcode) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
|
|
|
}
|
|
|
- if (result.getIntValue(RESULT_CODE) == 0) {
|
|
|
+ if (infcode == 0) {
|
|
|
JSONObject setlinfo = result.getJSONObject(OUTPUT).getJSONObject("setlinfo");
|
|
|
String fundPay = setlinfo.getString("fund_pay_sumamt");
|
|
|
if (DecimalUtil.compare(fundPay, p.getTotalCharge()) == 1) {
|
|
@@ -252,14 +256,15 @@ public class SiZyService {
|
|
|
input.getJSONObject("input").put("data", data);
|
|
|
JSONObject result = exec.executeTrade(input, SiFunction.REVOKE_HOSPITALIZATION_FEE_DETAILS);
|
|
|
log.info("【操作员:{}】撤销已上传的费用:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
|
|
|
- logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
|
|
|
if (null == result) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
}
|
|
|
- if (null == result.getInteger(RESULT_CODE)) {
|
|
|
+ Integer infcode = result.getInteger(RESULT_CODE);
|
|
|
+ logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
|
|
|
+ if (null == infcode) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
|
|
|
}
|
|
|
- if (result.getIntValue(RESULT_CODE) == 0) {
|
|
|
+ if (infcode == 0) {
|
|
|
QueryWrapper<SiChargeTemp> wrapper = new QueryWrapper<>();
|
|
|
wrapper.eq("pat_no", p.getInpatientNo());
|
|
|
wrapper.eq("times", p.getAdmissTimes());
|
|
@@ -309,14 +314,15 @@ public class SiZyService {
|
|
|
input.getJSONObject("input").put("diseinfo", JSONArray.parse(diseRef));
|
|
|
JSONObject result = exec.executeTrade(input, SiFunction.DISCHARGE_PROCESSING);
|
|
|
log.info("【操作员:{}】,医保出院办理:\n参数:{},\n结果:{}", p.getStaffId(), input, result);
|
|
|
- logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
|
|
|
if (null == result) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
}
|
|
|
- if (null == result.getInteger(RESULT_CODE)) {
|
|
|
+ Integer infcode = result.getInteger(RESULT_CODE);
|
|
|
+ logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
|
|
|
+ if (null == infcode) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
|
|
|
}
|
|
|
- if (result.getIntValue(RESULT_CODE) == 0) {
|
|
|
+ if (infcode == 0) {
|
|
|
return inpatientSettlement(p);
|
|
|
}
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
|
|
@@ -336,14 +342,15 @@ public class SiZyService {
|
|
|
input.getJSONObject("input").put("data", data);
|
|
|
JSONObject result = exec.executeTrade(input, SiFunction.REVOKE_DISCHARGE);
|
|
|
log.info("【操作员:{}】取消医保出院办理:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
|
|
|
- logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
|
|
|
if (null == result) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
}
|
|
|
- if (null == result.getInteger(RESULT_CODE)) {
|
|
|
+ Integer infcode = result.getInteger(RESULT_CODE);
|
|
|
+ logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
|
|
|
+ if (null == infcode) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
|
|
|
}
|
|
|
- if (result.getIntValue(RESULT_CODE) == 0) {
|
|
|
+ if (infcode == 0) {
|
|
|
dao.deleteSetlInfo(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
|
|
|
dao.deleteSetlDetail(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
|
|
|
transbackTables(p);
|
|
@@ -375,16 +382,17 @@ public class SiZyService {
|
|
|
input.getJSONObject("input").put("data", JSONObject.parseObject(ref));
|
|
|
JSONObject result = exec.executeTrade(input, SiFunction.HOSPITALIZATION_SETTLEMENT);
|
|
|
log.info("【操作员:{}】,医保出院结算:\n参数:{},\n结果:{}", p.getStaffId(), input, result);
|
|
|
- logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
|
|
|
if (null == result) {
|
|
|
revokeDischarge(p);
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
}
|
|
|
- if (null == result.getInteger(RESULT_CODE)) {
|
|
|
+ Integer infcode = result.getInteger(RESULT_CODE);
|
|
|
+ logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
|
|
|
+ if (null == infcode) {
|
|
|
revokeDischarge(p);
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
|
|
|
}
|
|
|
- if (result.getIntValue(RESULT_CODE) == 0) {
|
|
|
+ if (infcode == 0) {
|
|
|
setlListUpldService.yiBaoZhiFuFangShi(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
|
|
|
JSONObject setlinfo = result.getJSONObject(OUTPUT).getJSONObject("setlinfo");
|
|
|
SiSetlinfo setlEntity = JSONObject.parseObject(setlinfo.toJSONString(), SiSetlinfo.class);
|
|
@@ -450,14 +458,15 @@ public class SiZyService {
|
|
|
input.getJSONObject("input").put("data", data);
|
|
|
JSONObject result = exec.executeTrade(input, SiFunction.REVOKE_HOSPITALIZATION_SETTLEMENT);
|
|
|
log.info("【操作员:{}】取消医保结算:\n参数:{},\n结果:{}", p.getStaffId(), input, result);
|
|
|
- logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
|
|
|
if (null == result) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|
|
|
}
|
|
|
- if (null == result.getInteger(RESULT_CODE)) {
|
|
|
+ Integer infcode = result.getInteger(RESULT_CODE);
|
|
|
+ logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
|
|
|
+ if (null == infcode) {
|
|
|
return revokeDischarge(p);
|
|
|
}
|
|
|
- if (result.getIntValue(RESULT_CODE) == 0) {
|
|
|
+ if (infcode == 0) {
|
|
|
dao.updateRvkSetlMsgid(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), input.getString("msgid"));
|
|
|
transbackTables(p);
|
|
|
}
|