feat:任务执行流程
This commit is contained in:
@@ -979,28 +979,22 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
if (sdmResponse.getData() != null) {
|
||||
List<FlowNodeDto> flowNodeDtoList = sdmResponse.getData();
|
||||
SimulationRun simulationRun = this.lambdaQuery().eq(SimulationRun::getUuid, req.getRunId()).one();
|
||||
if (simulationRun.getFlowInstanceId() != null) {
|
||||
SdmResponse<ProcessInstanceDetailResponse> response = flowableFeignClient.getProcessAndNodeDetailByInstanceId(simulationRun.getFlowInstanceId());
|
||||
if (response.getData() != null && CollectionUtils.isNotEmpty(response.getData().getNodes())) {
|
||||
for (FlowNodeDto flowNodeDto : flowNodeDtoList) {
|
||||
response.getData().getNodes().stream().filter(i -> StringUtils.equals(i.getId(), flowNodeDto.getNodeId())).findFirst().ifPresent(i -> {
|
||||
flowNodeDto.setNodeStatus(i.getStatus());
|
||||
});
|
||||
}
|
||||
SdmResponse<ProcessInstanceDetailResponse> response = flowableFeignClient.getProcessAndNodeDetailByInstanceId(simulationRun.getProcessDefinitionId(), simulationRun.getFlowInstanceId());
|
||||
if (response.getData() != null && CollectionUtils.isNotEmpty(response.getData().getNodes())) {
|
||||
for (FlowNodeDto flowNodeDto : flowNodeDtoList) {
|
||||
response.getData().getNodes().stream().filter(i -> StringUtils.equals(i.getId(), flowNodeDto.getNodeId())).findFirst().ifPresent(i -> {
|
||||
flowNodeDto.setNodeStatus(i.getStatus());
|
||||
flowNodeDto.setUserParams(i.getUserParam());
|
||||
});
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
if (simulationRun.getFlowInstanceId() == null) {
|
||||
flowNodeDtoList.forEach(node -> {
|
||||
node.setNodeStatus("pending");
|
||||
});
|
||||
}
|
||||
List<NodeStructureInfo> nodeStructureInfoList = flowableFeignClient.listNodesByProcessDefinitionId(simulationRun.getProcessDefinitionId()).getData();
|
||||
if (CollectionUtils.isNotEmpty(nodeStructureInfoList)) {
|
||||
for (FlowNodeDto flowNodeDto : flowNodeDtoList) {
|
||||
nodeStructureInfoList.stream().filter(i -> StringUtils.equals(i.getId(), flowNodeDto.getNodeId())).findFirst().ifPresent(i -> {
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
return SdmResponse.success(flowNodeDtoList);
|
||||
}
|
||||
return SdmResponse.success(new ArrayList<>());
|
||||
|
||||
Reference in New Issue
Block a user