This commit is contained in:
2025-12-16 09:11:13 +08:00
23 changed files with 22554 additions and 138 deletions

22163
project/repomix-output.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -144,14 +144,14 @@ public class SimulationNodeController implements ISimulationNodeFeignClient {
/**
* 根据项目ID和节点类型获取所有节点信息
*
* @param uuid 项目ID
* @param uuids 项目ID
* @param nextNodeType 下一级节点类型
* @return SdmResponse<List<AllNodeByProjectIdAndTypeResp>> 节点信息
*/
@GetMapping("/getAllNodeByProjectIdAndType")
@Operation(summary = "根据项目ID和节点类型获取所有节点信息", description = "根据项目ID和节点类型获取所有节点信息")
public SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getAllNodeByProjectIdAndType(@RequestParam(value = "chooseNodeId") String uuid, @RequestParam(value = "nextNodeType") String nextNodeType) {
return nodeService.getAllNodeByProjectIdAndType(uuid, nextNodeType);
public SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getAllNodeByProjectIdAndType(@RequestParam(value = "chooseNodeIds") List<String> uuids, @RequestParam(value = "nextNodeType") String nextNodeType) {
return nodeService.getAllNodeByProjectIdAndType(uuids, nextNodeType);
}
/**
@@ -159,8 +159,8 @@ public class SimulationNodeController implements ISimulationNodeFeignClient {
*/
@GetMapping("/getNodeTaskList")
@Operation(summary = "获取节点下的task列表", description = "获取节点下的task列表")
public SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getNodeTaskList(@RequestParam(value = "uuid") String uuid) {
return nodeService.getNodeTaskList(uuid);
public SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getNodeTaskList(@RequestParam(value = "uuids") List<String> uuids) {
return nodeService.getNodeTaskList(uuids);
}
/**
@@ -168,8 +168,8 @@ public class SimulationNodeController implements ISimulationNodeFeignClient {
*/
@GetMapping("/getNodeTaskRunList")
@Operation(summary = "获取task下的run", description = "获取task下的run")
public SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getTaskRunList(@RequestParam(value = "uuid") String uuid) {
return nodeService.getTaskRunList(uuid);
public SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getTaskRunList(@RequestParam(value = "uuids") List<String> uuids) {
return nodeService.getTaskRunList(uuids);
}

View File

@@ -12,11 +12,9 @@ import com.sdm.common.entity.resp.project.SimulationNodeResp;
import com.sdm.project.model.entity.SimulationNode;
import com.sdm.project.model.req.*;
import com.sdm.project.model.req.YA.SyncCidProjectReq;
import com.sdm.project.model.resp.YA.BosimSaveNodeInfoRsp;
import com.sdm.project.model.resp.YA.BosimSaveProjectTaskRsp;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@@ -39,11 +37,11 @@ public interface INodeService extends IService<SimulationNode> {
SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getAllNodeByBodeType(String nodeType, Long nodeId);
SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getAllNodeByProjectIdAndType(String uuid, String nextNodeType);
SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getAllNodeByProjectIdAndType(List<String> uuids, String nextNodeType);
SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getNodeTaskList(String uuid);
SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getNodeTaskList(List<String> uuids);
SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getTaskRunList(String uuid);
SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getTaskRunList(List<String> uuids);
SdmResponse getUserGroupProjectStatistics(Long userGroupId, Long userId);

View File

@@ -819,7 +819,7 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
}
@Override
public SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getAllNodeByProjectIdAndType(String uuid, String nextNodeType) {
public SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getAllNodeByProjectIdAndType(List<String> uuids, String nextNodeType) {
SdmResponse<List<DataDictionary>> tagMapList = sysConfigFeignClient.getDictionaryData(TagConstant.DICTIONARY_TAG_KEY);
if (!tagMapList.isSuccess() || ObjectUtils.isEmpty(tagMapList.getData())) {
log.error("字典信息查询失败");
@@ -828,7 +828,7 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
// project-->tag1 phase-->tag2
Map<String, String> TagMap = tagMapList.getData().stream().collect(Collectors.toMap(DataDictionary::getDictValue, DataDictionary::getDictName));
Optional<SimulationNode> simulationNodeOptional = this.lambdaQuery().eq(SimulationNode::getUuid, uuid).oneOpt();
Optional<SimulationNode> simulationNodeOptional = this.lambdaQuery().in(SimulationNode::getUuid, uuids).list().stream().findFirst();
if (!simulationNodeOptional.isPresent()) {
return SdmResponse.failed("未找到节点");
}
@@ -838,16 +838,16 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
String currentNodeTag = TagMap.get(currentNodeType);
List<SimulationNode> simulationNodeList = this.lambdaQuery()
.eq(TagConstant.TAG1.equals(currentNodeTag), SimulationNode::getTag1, uuid)
.eq(TagConstant.TAG2.equals(currentNodeTag), SimulationNode::getTag2, uuid)
.eq(TagConstant.TAG3.equals(currentNodeTag), SimulationNode::getTag3, uuid)
.eq(TagConstant.TAG4.equals(currentNodeTag), SimulationNode::getTag4, uuid)
.eq(TagConstant.TAG5.equals(currentNodeTag), SimulationNode::getTag5, uuid)
.eq(TagConstant.TAG6.equals(currentNodeTag), SimulationNode::getTag6, uuid)
.eq(TagConstant.TAG7.equals(currentNodeTag), SimulationNode::getTag7, uuid)
.eq(TagConstant.TAG8.equals(currentNodeTag), SimulationNode::getTag8, uuid)
.eq(TagConstant.TAG9.equals(currentNodeTag), SimulationNode::getTag9, uuid)
.eq(TagConstant.TAG10.equals(currentNodeTag), SimulationNode::getTag10, uuid)
.in(TagConstant.TAG1.equals(currentNodeTag), SimulationNode::getTag1, uuids)
.in(TagConstant.TAG2.equals(currentNodeTag), SimulationNode::getTag2, uuids)
.in(TagConstant.TAG3.equals(currentNodeTag), SimulationNode::getTag3, uuids)
.in(TagConstant.TAG4.equals(currentNodeTag), SimulationNode::getTag4, uuids)
.in(TagConstant.TAG5.equals(currentNodeTag), SimulationNode::getTag5, uuids)
.in(TagConstant.TAG6.equals(currentNodeTag), SimulationNode::getTag6, uuids)
.in(TagConstant.TAG7.equals(currentNodeTag), SimulationNode::getTag7, uuids)
.in(TagConstant.TAG8.equals(currentNodeTag), SimulationNode::getTag8, uuids)
.in(TagConstant.TAG9.equals(currentNodeTag), SimulationNode::getTag9, uuids)
.in(TagConstant.TAG10.equals(currentNodeTag), SimulationNode::getTag10, uuids)
.eq(SimulationNode::getNodeType, nextNodeType)
.list();
@@ -866,11 +866,11 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
}
@Override
public SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getNodeTaskList(String uuid) {
if(ObjectUtils.isEmpty(uuid)){
public SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getNodeTaskList(List<String> uuids) {
if(CollectionUtils.isEmpty(uuids)){
return SdmResponse.success();
}
List<SimulationTask> simulationTasks = simulationTaskService.lambdaQuery().eq(SimulationTask::getNodeId, uuid).list();
List<SimulationTask> simulationTasks = simulationTaskService.lambdaQuery().in(SimulationTask::getNodeId, uuids).list();
if(CollectionUtils.isEmpty(simulationTasks)){
return SdmResponse.success();
}
@@ -888,11 +888,11 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
}
@Override
public SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getTaskRunList(String uuid) {
if(ObjectUtils.isEmpty(uuid)){
public SdmResponse<List<AllNodeByProjectIdAndTypeResp>> getTaskRunList(List<String> uuids) {
if(ObjectUtils.isEmpty(uuids)){
return SdmResponse.success();
}
List<SimulationRun> simulationRunList = simulationRunService.lambdaQuery().eq(SimulationRun::getTaskId, uuid).list();
List<SimulationRun> simulationRunList = simulationRunService.lambdaQuery().eq(SimulationRun::getTaskId, uuids).list();
if(CollectionUtils.isEmpty(simulationRunList)){
return SdmResponse.success();
}