Browse Source

feat:fta:获取当前分析关联的所有父子分析的节点,用于属性表格功能

张元铭 4 months ago
parent
commit
f59f3689b7

+ 13 - 0
nationrel-module-fta-biz/src/main/java/com/nationrel/modules/fta/controller/FtaAnalysisDataController.java

@@ -131,6 +131,19 @@ public class FtaAnalysisDataController {
         return ServerResponse.createBySuccess(diagramDataService.getMirrorTransferAnalysisId(analysisId));
     }
 
+    @Operation(summary = "获取当前分析关联的所有父子分析的节点,用于属性表格功能")
+    @GetMapping("/getAllNode/{analysisId}")
+    @Parameters(value = {
+            @Parameter(name = "Authorization", description = "验证信息", in = ParameterIn.HEADER)
+    })
+    public ServerResponse<List<FtaNode>> getAllNode(HttpServletRequest request, @PathVariable(value = "analysisId") String analysisId) {
+        HeaderUserInfo userInfo = GlobalExceptionHandler.parseUserInfo();
+        if (StringUtils.isBlank(analysisId)) {
+            return ServerResponse.createByErrorMessage(FtaParamDataExceptionEnum.getLanguageMessageByKey(FtaParamDataExceptionEnum.所传数据不合法, userInfo.getLanguageKey()));
+        }
+        return ServerResponse.createBySuccess(diagramDataService.getAllNode(analysisId));
+    }
+
     @Operation(summary = "获取事件编码")
     @GetMapping("/getEventCode/{analysisId}")
     @Parameters(value = {

+ 10 - 0
nationrel-module-fta-biz/src/main/java/com/nationrel/modules/fta/service/FtaDiagramDataService.java

@@ -1433,6 +1433,16 @@ public class FtaDiagramDataService {
         return mirrorTransferGates;
     }
 
+    /**
+     * 获取当前分析关联的所有父子分析的节点,用于属性表格功能
+     *
+     * @return
+     */
+    public List<FtaNode> getAllNode(String analysisId) {
+        List<String> allAnalysisId = getAllAnalysisId(analysisId);
+        return nodeMapper.selectList(new LambdaQueryWrapper<FtaNode>().in(FtaNode::getAnalysisId, allAnalysisId));
+    }
+
     /**
      * 复制分析到指定的父分析id下
      *