diff --git a/common/src/main/java/com/sdm/common/entity/req/capability/FlowNodeDto.java b/common/src/main/java/com/sdm/common/entity/req/capability/FlowNodeDto.java index f9b81e78..437d3eeb 100644 --- a/common/src/main/java/com/sdm/common/entity/req/capability/FlowNodeDto.java +++ b/common/src/main/java/com/sdm/common/entity/req/capability/FlowNodeDto.java @@ -6,6 +6,7 @@ import lombok.Data; import java.time.LocalDateTime; import java.util.List; +import java.util.Map; @Data public class FlowNodeDto { @@ -37,6 +38,9 @@ public class FlowNodeDto { @Schema(description = "节点状态:finished/active/pending") private String nodeStatus; + @Schema(description = "用户输入参数") + private Map userParams; + @Schema(description = "创建人") private Long creator; diff --git a/project/src/main/java/com/sdm/project/service/impl/SimulationRunServiceImpl.java b/project/src/main/java/com/sdm/project/service/impl/SimulationRunServiceImpl.java index 57337ec3..5c727ca1 100644 --- a/project/src/main/java/com/sdm/project/service/impl/SimulationRunServiceImpl.java +++ b/project/src/main/java/com/sdm/project/service/impl/SimulationRunServiceImpl.java @@ -979,28 +979,22 @@ public class SimulationRunServiceImpl extends ServiceImpl flowNodeDtoList = sdmResponse.getData(); SimulationRun simulationRun = this.lambdaQuery().eq(SimulationRun::getUuid, req.getRunId()).one(); - if (simulationRun.getFlowInstanceId() != null) { - SdmResponse 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 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 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<>());