|
@@ -11,6 +11,7 @@ import thyyxxk.webserver.constants.sidicts.*;
|
|
|
import thyyxxk.webserver.constants.YesOrNo;
|
|
|
import thyyxxk.webserver.dao.his.medicalinsurance.*;
|
|
|
import thyyxxk.webserver.entity.ResultVo;
|
|
|
+import thyyxxk.webserver.entity.medicalinsurance.SiLog;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.inpatient.*;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.query.SiPatInfo;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.setlinfo.SiSetldetail;
|
|
@@ -50,21 +51,25 @@ public class SiZyService {
|
|
|
private final SiSetlinfoDao setlinfodao;
|
|
|
private final SiSetldetailDao setldetldao;
|
|
|
private final SiChargeTempDao chrgtmpdao;
|
|
|
+ private final SiLogDao logDao;
|
|
|
private final ExecService exec;
|
|
|
private final DismissService dismissService;
|
|
|
+ private final SetlListUpldService setlListUpldService;
|
|
|
private final SiZySrvc zySrvc;
|
|
|
|
|
|
@Autowired
|
|
|
public SiZyService(SiZyDao dao, SiQueryDao qrydao, SiSetlinfoDao setlinfoDao,
|
|
|
- SiSetldetailDao setldetldao, SiChargeTempDao chrgtmpdao, ExecService exec,
|
|
|
- DismissService dismissService, SiZySrvc zySrvc) {
|
|
|
+ SiSetldetailDao setldetldao, SiChargeTempDao chrgtmpdao, SiLogDao logDao, ExecService exec,
|
|
|
+ DismissService dismissService, SetlListUpldService setlListUpldService, SiZySrvc zySrvc) {
|
|
|
this.dao = dao;
|
|
|
this.qrydao = qrydao;
|
|
|
this.setlinfodao = setlinfoDao;
|
|
|
this.setldetldao = setldetldao;
|
|
|
this.chrgtmpdao = chrgtmpdao;
|
|
|
+ this.logDao = logDao;
|
|
|
this.exec = exec;
|
|
|
this.dismissService = dismissService;
|
|
|
+ this.setlListUpldService = setlListUpldService;
|
|
|
this.zySrvc = zySrvc;
|
|
|
}
|
|
|
|
|
@@ -99,6 +104,7 @@ 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);
|
|
|
}
|
|
@@ -149,6 +155,7 @@ 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()));
|
|
|
return SiUtil.makeReturnWithoutOutput(result, "变更住院信息成功。");
|
|
|
}
|
|
|
|
|
@@ -165,6 +172,7 @@ 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);
|
|
|
}
|
|
@@ -199,6 +207,7 @@ 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);
|
|
|
}
|
|
@@ -243,6 +252,7 @@ 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);
|
|
|
}
|
|
@@ -299,6 +309,7 @@ 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);
|
|
|
}
|
|
@@ -325,6 +336,7 @@ 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);
|
|
|
}
|
|
@@ -363,6 +375,7 @@ 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);
|
|
@@ -372,6 +385,7 @@ public class SiZyService {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
|
|
|
}
|
|
|
if (result.getIntValue(RESULT_CODE) == 0) {
|
|
|
+ setlListUpldService.YiBaoZhiFuFangShi(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
|
|
|
JSONObject setlinfo = result.getJSONObject(OUTPUT).getJSONObject("setlinfo");
|
|
|
SiSetlinfo setlEntity = JSONObject.parseObject(setlinfo.toJSONString(), SiSetlinfo.class);
|
|
|
setlEntity.setPatNo(p.getInpatientNo());
|
|
@@ -436,6 +450,7 @@ 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);
|
|
|
}
|