소스 검색

定时多医院兼容

chengyao 4 년 전
부모
커밋
2542eb694b
3개의 변경된 파일28개의 추가작업 그리고 12개의 파일을 삭제
  1. 1 1
      doc/031.20210326v2.0.2/qc_initv2.0.2.sql
  2. 18 9
      src/main/java/com/diagbot/facade/ConsoleFacade.java
  3. 9 2
      src/main/java/com/diagbot/task/MedIndexTask.java

+ 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表示无创建人值',
   `creator` varchar(60) DEFAULT '0' COMMENT '创建人,0表示无创建人值',
   `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
   `modifier` varchar(60) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
   PRIMARY KEY (`id`),
   PRIMARY KEY (`id`),
-  UNIQUE KEY `index_time` (`start_date`,`end_date`)
+  UNIQUE KEY `index_id` (`id`)
 ) ENGINE=InnoDB AUTO_INCREMENT=1207 DEFAULT CHARSET=utf8;
 ) 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");
                 String behospitalCode = stringStringMap.get("behospitalCode");
                 //出院code
                 //出院code
                 outHospitalCode.add(behospitalCode);
                 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)) {
                         && task001.getIsUsed().equals(1)) {
                     log.info("执行动态定时任务: " + LocalDateTime.now().toLocalTime());
                     log.info("执行动态定时任务: " + LocalDateTime.now().toLocalTime());
                     IndexTimeVO IndexTimeVO = new IndexTimeVO();
                     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() {
         }, new Trigger() {