lighter 2 роки тому
батько
коміт
977db12aac

+ 8 - 10
src/main/java/thyyxxk/webserver/controller/medicalinsurance/MarkMtFeesController.java

@@ -48,7 +48,7 @@ public class MarkMtFeesController {
         mz.setTimes(param.getTimes());
         mz.setStaffId(param.getStaffId());
         ResultVo<FundDetail> result = mzService.outpatientPreSettlement(mz);
-        return getStringObjectMap(param, result, "收费窗口获取门特报销", false);
+        return getStringObjectMap(param, result, "收费窗口获取门特报销");
     }
 
     /**
@@ -62,7 +62,10 @@ public class MarkMtFeesController {
         mz.setTimes(param.getTimes());
         mz.setStaffId(param.getStaffId());
         ResultVo<FundDetail> result = mzService.outpatientSettlement(mz);
-        return getStringObjectMap(param, result, "收费窗口门特结算", true);
+        if (result.getCode().equals(ExceptionEnum.SUCCESS.getCode())) {
+            mzService.updateMzSaved(param.getPatientId(), param.getTimes());
+        }
+        return getStringObjectMap(param, result, "收费窗口门特结算");
     }
 
     /**
@@ -77,12 +80,10 @@ public class MarkMtFeesController {
         mz.setStaffId(param.getStaffId());
         mz.setNeedRevokeRegistration(1);
         ResultVo<FundDetail> result = mzService.revokeOutpatientSettlement(mz);
-        return getStringObjectMap(param, result, "收费窗口撤销门特结算", true);
+        return getStringObjectMap(param, result, "收费窗口撤销门特结算");
     }
 
-    private Map<String, Object> getStringObjectMap(@RequestBody SiMzBusinessParams param,
-                                                   ResultVo<FundDetail> result,
-                                                   String logText, boolean settlement) {
+    private Map<String, Object> getStringObjectMap(SiMzBusinessParams param, ResultVo<FundDetail> result, String logText) {
         Map<String, Object> map = new HashMap<>();
         if (null == result) {
             map.put("code", -2);
@@ -109,9 +110,6 @@ public class MarkMtFeesController {
         map.put("code", 0);
         map.put("msg", "成功。");
         map.put("payInfo", payInfo);
-        if (settlement) {
-            mzService.updateMzSaved(param.getPatientId(), param.getTimes(), 1);
-        }
         log.info("{}:参数:{},结果:{}", logText, param, map);
         return map;
     }
@@ -127,7 +125,7 @@ public class MarkMtFeesController {
     public Map<String, Object> directRegistration(@RequestBody SiMzBusinessParams param) {
         log.info("门诊共济:{}", param);
         ResultVo<FundDetail> result = mzService.directRegistration(param);
-        return getStringObjectMap(param, result, "医生保存处方试算", false);
+        return getStringObjectMap(param, result, "医生保存处方试算");
     }
 
     @PassToken

+ 2 - 2
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiMzDao.java

@@ -113,8 +113,8 @@ public interface SiMzDao {
             "#{diseDorNo}, #{diseDorName}, #{diagTime}, #{valiFlag}, #{realOpter})")
     void insertNewMzDiag(SiMzDiag diag);
 
-    @Update("update t_si_setlinfo set mz_saved=#{val} where pat_no=#{patNo} and times=#{times}")
-    void updateMzSaved(@Param("patNo") String patNo, @Param("times") int times, @Param("val") int val);
+    @Update("update t_si_setlinfo set mz_saved=1 where pat_no=#{patNo} and times=#{times}")
+    void updateMzSaved(@Param("patNo") String patNo, @Param("times") int times);
 
     @Select("select count(1) from t_si_pat_info where pat_no=#{patNo} and times=#{times} ")
     int selectSiMzInfoCount(@Param("patNo") String patNo,

+ 2 - 3
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiMzService.java

@@ -301,11 +301,10 @@ public class SiMzService {
         return ResultVoUtil.success("门诊诊断保存成功。");
     }
 
-    public void updateMzSaved(String patientId, int times, int val) {
-        dao.updateMzSaved(patientId, times, val);
+    public void updateMzSaved(String patientId, int times) {
+        dao.updateMzSaved(patientId, times);
     }
 
-
     public ResultVo<List<SpcChrDiseAcct>> fetchSpcSlwinfo(String socialNo) {
         if (StringUtil.isBlank(socialNo)) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "患者身份证号不能为空,请补充!");