Jelajahi Sumber

定时多医院兼容

chengyao 4 tahun lalu
induk
melakukan
2542eb694b

+ 1 - 1
doc/031.20210326v2.0.2/qc_initv2.0.2.sql

@@ -291,7 +291,7 @@ CREATE TABLE `med_index_result` (
   `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
   `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
   PRIMARY KEY (`id`),
-  UNIQUE KEY `index_time` (`start_date`,`end_date`)
+  UNIQUE KEY `index_id` (`id`)
 ) ENGINE=InnoDB AUTO_INCREMENT=1207 DEFAULT CHARSET=utf8;
 
 

+ 18 - 9
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -631,17 +631,26 @@ public class ConsoleFacade {
                 String behospitalCode = stringStringMap.get("behospitalCode");
                 //出院code
                 outHospitalCode.add(behospitalCode);
-                if (Double.parseDouble(stringStringMap.get("operationFee")) > 0) {
-                    //手术code
-                    operationCode.add(behospitalCode);
+                String operationFee = stringStringMap.get("operationFee");
+                if (StringUtils.isNotEmpty(operationFee)) {
+                    if (Double.parseDouble(operationFee) > 0) {
+                        //手术code
+                        operationCode.add(behospitalCode);
+                    }
                 }
-                if (Double.parseDouble(stringStringMap.get("operationFee")) > 0 && Double.parseDouble(stringStringMap.get("pathologyFee")) > QualityContent.pathologyFee) {
-                    //病理code
-                    operationPathologyCode.add(behospitalCode);
+                String pathologyFee = stringStringMap.get("pathologyFee");
+                if (StringUtils.isNotEmpty(operationFee) && StringUtils.isNotEmpty(pathologyFee)) {
+                    if (Double.parseDouble(operationFee) > 0 && Double.parseDouble(pathologyFee) > QualityContent.pathologyFee) {
+                        //病理code
+                        operationPathologyCode.add(behospitalCode);
+                    }
                 }
-                if (Double.parseDouble(stringStringMap.get("antibiosisFee")) > 0) {
-                    //抗菌code
-                    antibiosisCode.add(behospitalCode);
+                String antibiosisFee = stringStringMap.get("antibiosisFee");
+                if (StringUtils.isNotEmpty(antibiosisFee)) {
+                    if (Double.parseDouble(stringStringMap.get("antibiosisFee")) > 0) {
+                        //抗菌code
+                        antibiosisCode.add(behospitalCode);
+                    }
                 }
             }
         }

+ 9 - 2
src/main/java/com/diagbot/task/MedIndexTask.java

@@ -53,8 +53,15 @@ public class MedIndexTask implements SchedulingConfigurer{
                         && task001.getIsUsed().equals(1)) {
                     log.info("执行动态定时任务: " + LocalDateTime.now().toLocalTime());
                     IndexTimeVO IndexTimeVO = new IndexTimeVO();
-                    IndexTimeVO.setHospitalId(task001.getParam());
-                    consoleFacade.saveMedicaIndicator(IndexTimeVO);
+                    String param = task001.getParam();
+                    String[] split = {param};
+                    if(param.contains(",")){
+                        split = param.split(",");
+                    }
+                    for (String str : split) {
+                        IndexTimeVO.setHospitalId(str);
+                        consoleFacade.saveMedicaIndicator(IndexTimeVO);
+                    }
                 }
             }
         }, new Trigger() {