lighter 1 年間 前
コミット
59dd695ef7

+ 7 - 1
src/main/java/thyyxxk/simzfeeoprnsystm/service/SiMzFeeService.java

@@ -106,6 +106,7 @@ public class SiMzFeeService {
         Integer infcode = result.getInteger(RESULT_CODE);
         logDao.insert(new SiLog(input, result, p.getPatNo(), p.getTimes(), infcode, regstrtn.getPsnNo()));
         if (infcode == 0) {
+            setlinfoDao.deletePreSettleInfo(p.getPatNo(), p.getTimes());
             JSONObject output = result.getJSONObject(OUTPUT).getJSONObject("data");
             p.setMdtrtId(output.getString("mdtrt_id"));
             p.setVisitDate(regstrtn.getBegntime());
@@ -148,7 +149,7 @@ public class SiMzFeeService {
         logDao.insert(new SiLog(input, result, request.getPatNo(), request.getTimes(), infcode, request.getPsnNo()));
         if (infcode == 0) {
             mzDao.clearMdtrtIdForMz(request.getPatNo(), request.getTimes(), null);
-
+            setlinfoDao.deletePreSettleInfo(request.getPatNo(), request.getTimes());
             return ResultVoUtil.success("取消门诊挂号成功。");
         }
         return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
@@ -290,6 +291,7 @@ public class SiMzFeeService {
             siPatInfo.setPreselfpayAmt(preselfpayAmt);
             siPatInfo.setInscpScpAmt(inscpScpAmt);
             mzDao.updateSortOfAmt(siPatInfo);
+            setlinfoDao.deletePreSettleInfo(p.getPatNo(), p.getTimes());
             return ResultVoUtil.success(siPatInfo);
         }
         return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
@@ -316,6 +318,7 @@ public class SiMzFeeService {
         logDao.insert(new SiLog(input, result, p.getPatNo(), p.getTimes(), infcode, siPatInfo.getPsnNo()));
         if (infcode == 0) {
             mzDao.afterRevokeFees(p.getPatNo(), p.getTimes());
+            setlinfoDao.deletePreSettleInfo(p.getPatNo(), p.getTimes());
             return ResultVoUtil.success("门诊费用明细信息撤销成功。");
         }
         return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, result.getString(ERROR_MESSAGE));
@@ -428,6 +431,9 @@ public class SiMzFeeService {
             return setlfund;
         }
         Setlmt setlmt = mzDao.selectSetlmt(p.getPatNo(), p.getTimes());
+        if (null == setlmt) {
+            return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "没有此患者的医保就诊信息。");
+        }
         JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.OUTPATIENT_SETTLEMENT,
                 setlmt.getInsuplcAdmdvs(), p.getStaffId());
         ReadCardBizType readCardBizType = ReadCardBizType.get(p.getReadCardBizType());