소스 검색

检查结果的子项从启动项改为入参项

欧阳劲驰 1 개월 전
부모
커밋
30854a4156

+ 7 - 1
src/main/java/com/shkpr/service/alambizplugin/apiparam/GisSurveyCheckParams.java

@@ -61,11 +61,17 @@ public class GisSurveyCheckParams {
     private Boolean checkStart = true;
 
     /**
-     * 启动的子项key
+     * 子项key
      */
     private List<String> subitemKeys;
 
     /**
+     * 启动的子项key
+     * <p>系统内部用</p>
+     */
+    private List<String> startSubitemKeys;
+
+    /**
      * 元素/属性的变化时间
      * <p>系统内部用</p>
      */

+ 5 - 3
src/main/java/com/shkpr/service/alambizplugin/bizservice/GisSurveySystemCheckBizService.java

@@ -117,11 +117,13 @@ public class GisSurveySystemCheckBizService {
         List<String> supportedKeys = systemCheckDefineService.findKeys();
         //对入参取交集
         params.getSubitemKeys().retainAll(supportedKeys);
+        //设置启动项
+        params.setStartSubitemKeys(params.getSubitemKeys());
 
         //判断结果是否存在
         if (fileResult != null && refreshTime != null) {
             //过滤启动key
-            List<String> startKeys = params.getSubitemKeys().stream().filter(key -> {
+            List<String> startKeys = params.getStartSubitemKeys().stream().filter(key -> {
                 //文件结果包含数据库时间
                 if (fileResult.getRefreshTimes() != null && fileResult.getRefreshTimes().containsKey(key)
                         //文件结果数据包含当前项
@@ -134,11 +136,11 @@ public class GisSurveySystemCheckBizService {
                 }
                 return true;
             }).collect(Collectors.toList());
-            params.setSubitemKeys(startKeys);
+            params.setStartSubitemKeys(startKeys);
         }
 
         //启动检查任务
-        if (Boolean.TRUE.equals(params.getCheckStart()) && CollectionUtils.isNotEmpty(params.getSubitemKeys())) {
+        if (Boolean.TRUE.equals(params.getCheckStart()) && CollectionUtils.isNotEmpty(params.getStartSubitemKeys())) {
             startTask(systemCheckId, params);
             //如需要返回上次结果,则直接返回结果
             if (Boolean.TRUE.equals(params.getReturnLastResult())) return fileResult;

+ 6 - 6
src/main/java/com/shkpr/service/alambizplugin/components/GisSurveySystemChecker.java

@@ -152,36 +152,36 @@ public class GisSurveySystemChecker {
 
             //孤立点检查
             if (points != null && lines != null) {
-                if (params.getSubitemKeys().contains(GisSurveySystemCheckKeys.ISOLATED_POINTS)) {
+                if (params.getStartSubitemKeys().contains(GisSurveySystemCheckKeys.ISOLATED_POINTS)) {
                     isolatedPointsFuture = isolatedPointsFinder.findIsolatedPoints(points, lines, systemCheckId);
                     subtask.put(GisSurveySystemCheckKeys.ISOLATED_POINTS, isolatedPointsFuture);
                 }
             }
             //无效线检查
             if (points != null && lines != null) {
-                if (params.getSubitemKeys().contains(GisSurveySystemCheckKeys.INVALID_LINES)) {
+                if (params.getStartSubitemKeys().contains(GisSurveySystemCheckKeys.INVALID_LINES)) {
                     invalidLinesFuture = invalidLinesFinder.finderInvalidLines(points, lines, systemCheckId);
                     subtask.put(GisSurveySystemCheckKeys.INVALID_LINES, invalidLinesFuture);
                 }
             }
             //重复点检查
             if (points != null) {
-                if (params.getSubitemKeys().contains(GisSurveySystemCheckKeys.DUPLICATE_POINTS)) {
+                if (params.getStartSubitemKeys().contains(GisSurveySystemCheckKeys.DUPLICATE_POINTS)) {
                     duplicatePointsFuture = duplicatePointsFinder.findDuplicatePoints(points, typeDefines, systemCheckId);
                     subtask.put(GisSurveySystemCheckKeys.DUPLICATE_POINTS, duplicatePointsFuture);
                 }
             }
             //孤立线\重叠线\高程差异常检查
             if (lines != null) {
-                if (params.getSubitemKeys().contains(GisSurveySystemCheckKeys.ISOLATED_LINES)) {
+                if (params.getStartSubitemKeys().contains(GisSurveySystemCheckKeys.ISOLATED_LINES)) {
                     isolatedLinesFuture = isolatedLinesFinder.findIsolatedLines(lines, systemCheckId);
                     subtask.put(GisSurveySystemCheckKeys.ISOLATED_LINES, isolatedLinesFuture);
                 }
-                if (params.getSubitemKeys().contains(GisSurveySystemCheckKeys.OVERLAP_LINES)) {
+                if (params.getStartSubitemKeys().contains(GisSurveySystemCheckKeys.OVERLAP_LINES)) {
                     overlapLinesFuture = overlapLinesFinder.findOverlapLines(lines, systemCheckId);
                     subtask.put(GisSurveySystemCheckKeys.OVERLAP_LINES, overlapLinesFuture);
                 }
-                if (params.getSubitemKeys().contains(GisSurveySystemCheckKeys.ELEVATION_DIFF)) {
+                if (params.getStartSubitemKeys().contains(GisSurveySystemCheckKeys.ELEVATION_DIFF)) {
                     elevationDiffFuture = elevationDiffFinder.findElevationDiff(lines, systemCheckId);
                     subtask.put(GisSurveySystemCheckKeys.ELEVATION_DIFF, elevationDiffFuture);
                 }

+ 1 - 1
src/main/java/com/shkpr/service/alambizplugin/dto/CommAsyncResult.java

@@ -31,7 +31,7 @@ public class CommAsyncResult<T> {
      */
     private String operator;
     /**
-     * 启动的子项key
+     * 子项key
      */
     private List<String> subitemKeys;
     /**