فهرست منبع

Merge remote-tracking branch 'origin/dev/nurseRule20220329' into test

zhaops 2 سال پیش
والد
کامیت
f10d4be599
2فایلهای تغییر یافته به همراه58 افزوده شده و 2 حذف شده
  1. 57 1
      cdssman-service/src/main/java/com/diagbot/facade/ResultStaticKnowledgeNeoFacade.java
  2. 1 1
      common/pom.xml

+ 57 - 1
cdssman-service/src/main/java/com/diagbot/facade/ResultStaticKnowledgeNeoFacade.java

@@ -115,6 +115,14 @@ public class ResultStaticKnowledgeNeoFacade extends ResultStaticKnowledgeService
             }
         }
 
+        if (ListUtil.isEmpty(lisConfigList)) {
+            //终止运行
+            runningInfoVO.setStatus(0);
+            runningInfoFacade.updateStatus(runningInfoVO);
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "文件不能为空");
+        }
+
+
         Integer totleNum = 0;
         if (ListUtil.isNotEmpty(lisConfigList)) {
             totleNum = lisConfigList.size();
@@ -302,6 +310,14 @@ public class ResultStaticKnowledgeNeoFacade extends ResultStaticKnowledgeService
             }
         }
 
+        if (ListUtil.isEmpty(pacsConfigList)) {
+            //终止运行
+            runningInfoVO.setStatus(0);
+            runningInfoFacade.updateStatus(runningInfoVO);
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "文件不能为空");
+        }
+
+
         Integer totleNum = 0;
         if (ListUtil.isNotEmpty(pacsConfigList)) {
             totleNum = pacsConfigList.size();
@@ -456,6 +472,14 @@ public class ResultStaticKnowledgeNeoFacade extends ResultStaticKnowledgeService
             }
         }
 
+        if (ListUtil.isEmpty(drugConfigList)) {
+            //终止运行
+            runningInfoVO.setStatus(0);
+            runningInfoFacade.updateStatus(runningInfoVO);
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "文件不能为空");
+        }
+
+
         Integer totleNum = 0;
         if (ListUtil.isNotEmpty(drugConfigList)) {
             totleNum = drugConfigList.size();
@@ -614,6 +638,14 @@ public class ResultStaticKnowledgeNeoFacade extends ResultStaticKnowledgeService
         }
         System.out.println("读取excel文件结束时间:" + DateUtil.now());
 
+        if (ListUtil.isEmpty(diseaseConfigList)) {
+            //终止运行
+            runningInfoVO.setStatus(0);
+            runningInfoFacade.updateStatus(runningInfoVO);
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "文件不能为空");
+        }
+
+
         Integer totleNum = 0;
         if (ListUtil.isNotEmpty(diseaseConfigList)) {
             totleNum = diseaseConfigList.size();
@@ -778,6 +810,13 @@ public class ResultStaticKnowledgeNeoFacade extends ResultStaticKnowledgeService
             }
         }
 
+        if (ListUtil.isEmpty(operationConfigList)) {
+            //终止运行
+            runningInfoVO.setStatus(0);
+            runningInfoFacade.updateStatus(runningInfoVO);
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "文件不能为空");
+        }
+
         Integer totleNum = 0;
         if (ListUtil.isNotEmpty(operationConfigList)) {
             totleNum = operationConfigList.size();
@@ -932,6 +971,13 @@ public class ResultStaticKnowledgeNeoFacade extends ResultStaticKnowledgeService
             }
         }
 
+        if (ListUtil.isEmpty(scaleConfigList)) {
+            //终止运行
+            runningInfoVO.setStatus(0);
+            runningInfoFacade.updateStatus(runningInfoVO);
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "文件不能为空");
+        }
+
         Integer totleNum = 0;
         if (ListUtil.isNotEmpty(scaleConfigList)) {
             totleNum = scaleConfigList.size();
@@ -1086,6 +1132,13 @@ public class ResultStaticKnowledgeNeoFacade extends ResultStaticKnowledgeService
             }
         }
 
+        if (ListUtil.isEmpty(nurseConfigList)) {
+            //终止运行
+            runningInfoVO.setStatus(0);
+            runningInfoFacade.updateStatus(runningInfoVO);
+            throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "文件不能为空");
+        }
+
         Integer totleNum = 0;
         if (ListUtil.isNotEmpty(nurseConfigList)) {
             totleNum = nurseConfigList.size();
@@ -1211,6 +1264,9 @@ public class ResultStaticKnowledgeNeoFacade extends ResultStaticKnowledgeService
      */
     @Transactional
     public Boolean saveResult(List<ResultStaticKnowledge> list, StaticKnowledgeTestVO testVO, Integer totleNum) {
+        if (ListUtil.isEmpty(list)) {
+            return true;
+        }
         Date now = new Date();
         Integer unMappingNum = list.stream().filter(i -> i.getHasStandName() != null && i.getHasStandName().equals(0)).collect(Collectors.toList()).size();
         Integer withoutKnowledgeNum = list.stream().filter(i -> i.getHasStaticKnowledge() != null && i.getHasStaticKnowledge().equals(0)).collect(Collectors.toList()).size();
@@ -1311,4 +1367,4 @@ public class ResultStaticKnowledgeNeoFacade extends ResultStaticKnowledgeService
     }
 
     //endregion --------------------------导出------------------------------
-}
+}

+ 1 - 1
common/pom.xml

@@ -81,7 +81,7 @@
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>fastjson</artifactId>
-            <version>1.2.62</version>
+            <version>1.2.83</version>
             <scope>compile</scope>
         </dependency>