|
@@ -347,6 +347,7 @@ public class SiMzFeeService {
|
|
setlEntity.setInsuplcAdmdvs(setlmt.getInsuplcAdmdvs());
|
|
setlEntity.setInsuplcAdmdvs(setlmt.getInsuplcAdmdvs());
|
|
setlEntity.setBegntime(mzDao.selectBegntime(p.getPatNo(), p.getTimes()));
|
|
setlEntity.setBegntime(mzDao.selectBegntime(p.getPatNo(), p.getTimes()));
|
|
setlEntity.setEndtime(setlEntity.getSetlTime());
|
|
setlEntity.setEndtime(setlEntity.getSetlTime());
|
|
|
|
+ setlEntity.setMzSaved(0);
|
|
setlinfoDao.insert(setlEntity);
|
|
setlinfoDao.insert(setlEntity);
|
|
setlinfoDao.updateSiZyInfoSetlId(p.getPatNo(), p.getTimes(), 0, setlEntity.getSetlId(),
|
|
setlinfoDao.updateSiZyInfoSetlId(p.getPatNo(), p.getTimes(), 0, setlEntity.getSetlId(),
|
|
setlEntity.getMedinsSetlId(), input.getString("msgid"));
|
|
setlEntity.getMedinsSetlId(), input.getString("msgid"));
|
|
@@ -401,4 +402,28 @@ public class SiMzFeeService {
|
|
}
|
|
}
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public void revokeOutpatientSettlementForTask(SiSetlinfo setlinfo) {
|
|
|
|
+ JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.REVOKE_OUTPATIENT_SETTLEMENT,
|
|
|
|
+ mzDao.selectAdmdvs(setlinfo.getPatNo(), setlinfo.getTimes(), setlinfo.getLedgerSn()), "99999");
|
|
|
|
+ JSONObject data = new JSONObject();
|
|
|
|
+ data.put("setl_id", setlinfo.getSetlId());
|
|
|
|
+ data.put("mdtrt_id", setlinfo.getMdtrtId());
|
|
|
|
+ data.put("psn_no", setlinfo.getPsnNo());
|
|
|
|
+ input.getJSONObject("input").put("data", data);
|
|
|
|
+ JSONObject result = exec.executeTrade(input, SiFunction.REVOKE_OUTPATIENT_SETTLEMENT);
|
|
|
|
+ Integer infcode = result.getInteger(RESULT_CODE);
|
|
|
|
+ logDao.insert(new SiLog(input, result, setlinfo.getPatNo(), setlinfo.getTimes(), infcode));
|
|
|
|
+ if (null != infcode && infcode == 0) {
|
|
|
|
+ mzDao.deleteSetlInfo(setlinfo.getPatNo(), setlinfo.getTimes());
|
|
|
|
+ mzDao.deleteSetlDetail(setlinfo.getPatNo(), setlinfo.getTimes());
|
|
|
|
+ mzDao.updateRvkSetlMsgid(setlinfo.getPatNo(), setlinfo.getTimes(), input.getString("msgid"));
|
|
|
|
+ MzPatientInfo mzPatientInfo = new MzPatientInfo();
|
|
|
|
+ mzPatientInfo.setPatNo(setlinfo.getPatNo());
|
|
|
|
+ mzPatientInfo.setTimes(setlinfo.getTimes());
|
|
|
|
+ mzPatientInfo.setStaffId("99999");
|
|
|
|
+ revokeOutpatientFeeDetails(mzPatientInfo);
|
|
|
|
+ revokeOutpatientRegistration(mzPatientInfo);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|