Просмотр исходного кода

Merge branch 'dev/20210326_2.0.2' into innerDevelop

chengyao 4 лет назад
Родитель
Сommit
03a6cfb946

+ 3 - 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;
 
 
@@ -314,4 +314,6 @@ CREATE TABLE `med_index_relevance` (
 
 -- 注意 param参数为医院id,多家医院需执行对应医院id
 INSERT INTO `sys_task_cron` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `cron_code`, `cron`, `param`, `is_used`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', 'TASK_INDEX', '0 0 3 * * ?', '4', '1', '获取当前时间前一天的病案指标');
+ UPDATE `sys_task_cron` SET  `param`='1,2,3,4,5,7,8' WHERE (`cron_code`='TASK_INDEX');
+
 

+ 19 - 10
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -631,19 +631,28 @@ 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");
+                String pathologyFee = stringStringMap.get("pathologyFee");
+                String antibiosisFee = stringStringMap.get("antibiosisFee");
+                if(StringUtil.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);
+                if(StringUtil.isNotEmpty(operationFee)) {
+                    if (Double.parseDouble(operationFee) > 0 && Double.parseDouble(pathologyFee) > QualityContent.pathologyFee) {
+                        //病理code
+                        operationPathologyCode.add(behospitalCode);
+                    }
                 }
-                if (Double.parseDouble(stringStringMap.get("antibiosisFee")) > 0) {
+                    if(StringUtil.isNotEmpty(operationFee)) {
+                if (Double.parseDouble(antibiosisFee) > 0) {
                     //抗菌code
                     antibiosisCode.add(behospitalCode);
                 }
             }
+            }
         }
                 if(ListUtil.isNotEmpty(adviceVerify)){
                     for (String code : adviceVerify) {
@@ -1125,8 +1134,8 @@ public class ConsoleFacade {
             }else {
                 mapCode.put("antibiosis",null);
             }
-            if(antibiosisBehospitalCode!=null && antibiosisBehospitalCode.size()>0){
-                mapCode.put("chemotherapyMalignantTumors",antibiosisBehospitalCode);
+            if(chemotherapyMalignantTumorsBehospitalCode!=null && chemotherapyMalignantTumorsBehospitalCode.size()>0){
+                mapCode.put("chemotherapyMalignantTumors",chemotherapyMalignantTumorsBehospitalCode);
             }else {
                 mapCode.put("chemotherapyMalignantTumors",null);
             }
@@ -3231,7 +3240,7 @@ public class ConsoleFacade {
         System.out.println("lis项目存在用血住院病历号 = " + (xx2-xx1));
         //advice体现lis项目存在用血的住院病历号
         doctorAdviceList.parallelStream()
-                .filter(obj -> beCode.contains(obj.getBehospitalCode()) && obj.getDoctorAdviceType()
+                .filter(obj -> beCode.contains(obj.getBehospitalCode()) && StringUtils.isNotEmpty(obj.getDoctorAdviceType()) && obj.getDoctorAdviceType()
                         .equals(QualityContent.STAT_ORDER) && blood_list.contains(obj.getDaItemName()) &&
                         (StringUtils.isEmpty(obj.getDaStatus()) || (StringUtils.isNotEmpty(obj.getDaStatus()) && ! obj.getDaStatus()
                         .equals(QualityContent.CANCELLATION_ORDER))))

+ 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() {