lighter 1 year ago
parent
commit
02907e0c77

+ 2 - 2
src/main/java/thyyxxk/webserver/controller/outpatient/triage/TriageController.java

@@ -90,8 +90,8 @@ public class TriageController {
 
     @GetMapping("/getAllPatients")
     public ResultVo<Map<String, Object>> getAllPatients(@RequestParam("searchContent") String searchContent,
-                                                           @RequestParam("currentPage") Integer currentPage,
-                                                           @RequestParam("pageSize") Integer pageSize) {
+                                                        @RequestParam("currentPage") Integer currentPage,
+                                                        @RequestParam("pageSize") Integer pageSize) {
         return service.getAllPatients(searchContent, currentPage, pageSize);
     }
 

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

@@ -150,6 +150,9 @@ public interface SiMzDao {
             "where pat_no=#{patientId} and times=#{times} and revoked=0")
     Integer modifyFundAmt(ModifyFundAmt amt);
 
+    @Select("select count(1) from t_si_presetlinfo where pat_no=#{patNo} and times=#{times}")
+    int selectPresettleCount(@Param("patNo") String patNo, @Param("times") int times);
+
     @Select("select staff_id from t_si_setlinfo where pat_no=#{patNo} and times=#{times} and revoked=0")
     String selectSetlStaff(@Param("patNo") String patNo, @Param("times") int times);
 }

+ 4 - 0
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiMzService.java

@@ -520,6 +520,10 @@ public class SiMzService {
     }
 
     public ResultVo<String> queryModifyPermission(MzPatientInfo info) {
+        int pre = dao.selectPresettleCount(info.getPatNo(), info.getTimes());
+        if (pre > 0) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "此患者的处方已上传医保,无法修改。");
+        }
         String setlStaff = dao.selectSetlStaff(info.getPatNo(), info.getTimes());
         if (StrUtil.isEmpty(setlStaff)) {
             return ResultVoUtil.success("OK");