1、修改 根据项目查询子节点列表接口

This commit is contained in:
2025-11-26 09:18:21 +08:00
parent d59157cc91
commit f89f412dea
4 changed files with 9 additions and 12 deletions

View File

@@ -114,7 +114,7 @@ public class SimulationNodeController implements ISimulationNodeFeignClient {
*/
@GetMapping("/getChildrenNodeList")
@Operation(summary = "根据项目查询子节点列表", description = "根据项目查询子节点列表")
public SdmResponse getChildrenNodeList(@RequestParam(value = "nodeId", required = true) Long nodeId, @RequestParam(value = "nodeType", required = true) String nodeType) {
public SdmResponse getChildrenNodeList(@RequestParam(value = "nodeId", required = true) String nodeId, @RequestParam(value = "nodeType", required = true) String nodeType) {
return nodeService.getChildrenNodeList(Collections.singletonList(nodeId), nodeType);
}

View File

@@ -32,7 +32,7 @@ public interface INodeService extends IService<SimulationNode> {
SdmResponse getProjectMemberList(GetProjectListReq req);
SdmResponse getChildrenNodeList(List<Long> projectNodeIdList, String nodeType);
SdmResponse getChildrenNodeList(List<String> projectNodeIdList, String nodeType);
SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getAllNodeByBodeType(String nodeType, Long nodeId);

View File

@@ -653,18 +653,17 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
}
@Override
public SdmResponse getChildrenNodeList(List<Long> nodeIdList, String nodeType) {
public SdmResponse getChildrenNodeList(List<String> nodeIdList, String nodeType) {
log.info("getChildrenNodeListnodeIdList{}nodeType{}", nodeIdList, nodeType);
List<ProjectNodePo> projectNodePoList = mapper.getNodeByIdList(nodeIdList);
List<ProjectNodePo> projectNodePoList = mapper.queryNodeListByParentNodeId(nodeIdList);
if (CollectionUtils.isEmpty(projectNodePoList)) {
return SdmResponse.success(new ArrayList<>());
}
List<String> idList = projectNodePoList.stream().map(ProjectNodePo::getUuid).toList();
List<ProjectNodePo> childrenProjectNodePoList = mapper.queryNodeListByParentNodeId(idList);
if (!nodeType.equals(childrenProjectNodePoList.get(0).getNodeType())) {
return getChildrenNodeList(childrenProjectNodePoList.stream().map(ProjectNodePo::getId).toList(), nodeType);
log.info("getChildrenNodeList为:{}",projectNodePoList);
if (!nodeType.equals(projectNodePoList.get(0).getNodeType())) {
return getChildrenNodeList(projectNodePoList.stream().map(ProjectNodePo::getUuid).toList(), nodeType);
}
return SdmResponse.success(childrenProjectNodePoList);
return SdmResponse.success(projectNodePoList);
}
/**

View File

@@ -779,8 +779,6 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
} else {
log.info(commands + "执行脚本完成!");
}
try {
// 获取临时路径中脚本生成的报告
FileInputStream fileInputStream = new FileInputStream(TEMP_REPORT_PATH + randomId + File.separator + "report.docx");
@@ -803,7 +801,7 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
}
// 删除临时路径
log.info("删除临时路径:{},中。。。。。。",randomId);
// deleteFolder(new File(TEMP_REPORT_PATH + randomId));
deleteFolder(new File(TEMP_REPORT_PATH + randomId));
}
// 性能指标集合
List<SimulationPerformance> performanceList = req.getPerformanceList();