Browse Source

添加非空决断

lighter 1 year ago
parent
commit
d7a1d7ab4d

+ 8 - 6
src/main/java/thyyxxk/webserver/service/inpatient/casefrontsheet/CaseFrontSheetMainService.java

@@ -379,12 +379,14 @@ public class CaseFrontSheetMainService {
             List<Map<String, String>> epidemics = dao.selectStatutoryEpidemic(patNo, times);
             if (ListUtil.notBlank(epidemics)) {
                 Map<String, String> epidemic = epidemics.get(0);
-                if (StringUtil.notBlank(epidemic.get("a"))) {
-                    sheet.setStatutoryEpidemic("1");
-                } else if (StringUtil.notBlank(epidemic.get("b"))) {
-                    sheet.setStatutoryEpidemic("2");
-                } else if (StringUtil.notBlank(epidemic.get("c"))) {
-                    sheet.setStatutoryEpidemic("3");
+                if (null != epidemic) {
+                    if (StringUtil.notBlank(epidemic.get("a"))) {
+                        sheet.setStatutoryEpidemic("1");
+                    } else if (StringUtil.notBlank(epidemic.get("b"))) {
+                        sheet.setStatutoryEpidemic("2");
+                    } else if (StringUtil.notBlank(epidemic.get("c"))) {
+                        sheet.setStatutoryEpidemic("3");
+                    }
                 }
             }
         }