1、修改 根据项目查询子节点列表接口
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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("getChildrenNodeList,nodeIdList:{},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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user