lighter 3 mesiacov pred
rodič
commit
22c90409b7

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/dictionary/ClinicRoomDictDao.java

@@ -23,7 +23,7 @@ public interface ClinicRoomDictDao {
             "where room_code=#{roomCode}")
     void updateRoomInfo(MzfzZdDeptRoom room);
 
-    @Select("select max(room_code)+1 from mzfz_zd_dept_room")
+    @Select("select isnull(max(room_code),0)+1 from mzfz_zd_dept_room")
     String getMaxRoomCode();
 
     @Insert("insert into mzfz_zd_dept_room (dept_code,room_code,room_name,room_no,status_flag) " +

+ 38 - 32
src/main/java/thyyxxk/webserver/service/inpatient/casefrontsheet/CaseFrontSheetMainService.java

@@ -65,38 +65,44 @@ public class CaseFrontSheetMainService {
 
     public ResultVo<Map<String, List<CodeName>>> getAllDictionary() {
         if (allDictionary.isEmpty()) {
-            allDictionary.put("getMarriageCode", createdDao.getMarriageCode());
-            allDictionary.put("getSexCode", createdDao.getSexCode());
-            allDictionary.put("getAdmissWay", createdDao.getAdmissWay());
-            allDictionary.put("getBloodType", createdDao.getBloodType());
-            allDictionary.put("getAnaesthesia", createdDao.getAnaesthesia());
-            allDictionary.put("getOperateScale", createdDao.getOperateScale());
-            allDictionary.put("getAdmissStatus", createdDao.getAdmissStatus());
-            allDictionary.put("getDisAdmissStatus", createdDao.getDisAdmissStatus());
-            allDictionary.put("getCutHealGrade", createdDao.getCutHealGrade());
-            allDictionary.put("getDisdiagStatus", createdDao.getDisdiagStatus());
-            allDictionary.put("getHbsag", createdDao.getHbsag());
-            allDictionary.put("getDiagConform", createdDao.getDiagConform());
-            allDictionary.put("getDisdiagType", createdDao.getDisdiagType());
-            allDictionary.put("getPatientStatus", createdDao.getPatientStatus());
-            allDictionary.put("getQualityLevel", createdDao.getQualityLevel());
-            allDictionary.put("getZyDismissWay", createdDao.getZyDismissWay());
-            allDictionary.put("getTumorLevelT", createdDao.getTumorLevelT());
-            allDictionary.put("getTumorLevelN", createdDao.getTumorLevelN());
-            allDictionary.put("getTumorLevelM", createdDao.getTumorLevelM());
-            allDictionary.put("getTumorLevel", createdDao.getTumorLevel());
-            allDictionary.put("getRelations", createdDao.getRelations());
-            List<CodeName> temp = new ArrayList<>();
-            temp.add(new CodeName());
-            temp.addAll(createdDao.getStatutoryEpidemic());
-            allDictionary.put("getStatutoryEpidemic", temp);
-            allDictionary.put("getClinicalPathwayManagement", createdDao.getClinicalPathwayManagement());
-            allDictionary.put("getDrgsManagement", createdDao.getDrgsManagement());
-            allDictionary.put("getCaseClassification", createdDao.getCaseClassification());
-            allDictionary.put("getOccupation", createdDao.getOccupation());
-            allDictionary.put("getCountry", createdDao.getCountry());
-            allDictionary.put("getNation", createdDao.getNation());
-            allDictionary.put("getPayMethod", createdDao.getPayMethod());
+            try {
+                allDictionary.put("getMarriageCode", createdDao.getMarriageCode());
+                allDictionary.put("getSexCode", createdDao.getSexCode());
+                allDictionary.put("getAdmissWay", createdDao.getAdmissWay());
+                allDictionary.put("getBloodType", createdDao.getBloodType());
+                allDictionary.put("getAnaesthesia", createdDao.getAnaesthesia());
+                allDictionary.put("getOperateScale", createdDao.getOperateScale());
+                allDictionary.put("getAdmissStatus", createdDao.getAdmissStatus());
+                allDictionary.put("getDisAdmissStatus", createdDao.getDisAdmissStatus());
+                allDictionary.put("getCutHealGrade", createdDao.getCutHealGrade());
+                allDictionary.put("getDisdiagStatus", createdDao.getDisdiagStatus());
+                allDictionary.put("getHbsag", createdDao.getHbsag());
+                allDictionary.put("getDiagConform", createdDao.getDiagConform());
+                allDictionary.put("getDisdiagType", createdDao.getDisdiagType());
+                allDictionary.put("getPatientStatus", createdDao.getPatientStatus());
+                allDictionary.put("getQualityLevel", createdDao.getQualityLevel());
+                allDictionary.put("getZyDismissWay", createdDao.getZyDismissWay());
+                allDictionary.put("getTumorLevelT", createdDao.getTumorLevelT());
+                allDictionary.put("getTumorLevelN", createdDao.getTumorLevelN());
+                allDictionary.put("getTumorLevelM", createdDao.getTumorLevelM());
+                allDictionary.put("getTumorLevel", createdDao.getTumorLevel());
+                allDictionary.put("getRelations", createdDao.getRelations());
+                List<CodeName> temp = new ArrayList<>();
+                temp.add(new CodeName());
+                temp.addAll(createdDao.getStatutoryEpidemic());
+                allDictionary.put("getStatutoryEpidemic", temp);
+                allDictionary.put("getClinicalPathwayManagement", createdDao.getClinicalPathwayManagement());
+                allDictionary.put("getDrgsManagement", createdDao.getDrgsManagement());
+                allDictionary.put("getCaseClassification", createdDao.getCaseClassification());
+                allDictionary.put("getOccupation", createdDao.getOccupation());
+                allDictionary.put("getCountry", createdDao.getCountry());
+                allDictionary.put("getNation", createdDao.getNation());
+                allDictionary.put("getPayMethod", createdDao.getPayMethod());
+            } catch (Exception e) {
+                log.error("病案字典提取出错", e);
+                allDictionary.clear();
+                return ResultVoUtil.fail(ExceptionEnum.INTERNAL_SERVER_ERROR, e.getCause().getMessage());
+            }
         }
         return ResultVoUtil.success(allDictionary);
     }