Browse Source

优化法定传染病填充

lighter 2 năm trước cách đây
mục cha
commit
1998810dda

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/casefrontsheet/CaseFrontSheetDao.java

@@ -657,7 +657,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
     // 法定传染病
     @Select("SELECT rtrim(contagion) as a,rtrim(contagion2) as b,rtrim(contagion3) as c " +
             "FROM crb_main_card where patient_id=#{patNo} and times=#{times}")
-    Map<String, String> selectStatutoryEpidemic(String patNo, int times);
+    List<Map<String, String>> selectStatutoryEpidemic(String patNo, int times);
 
     // 抗生素使用次数
     @Select("select count(1) from zy_detail_charge a left join yp_zd_dict b on (code=charge_code_mx " +

+ 3 - 2
src/main/java/thyyxxk/webserver/service/casefrontsheet/CaseFrontSheetMainService.java

@@ -330,8 +330,9 @@ public class CaseFrontSheetMainService {
             sheet.setBacilliculture(bacillicultureCount > 0 ? "1" : "2");
         }
         if (StringUtil.isBlank(sheet.getStatutoryEpidemic())) {
-            Map<String, String> epidemic = dao.selectStatutoryEpidemic(patNo, times);
-            if (null != epidemic) {
+            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"))) {