mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-12-26 07:26:43 +08:00
fix 修复排他网关执行后,驳回选到未执行的网关
This commit is contained in:
parent
2ef0ca8d58
commit
0e4a01bdf4
@ -537,8 +537,20 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
||||
}
|
||||
//获取可驳回的前置节点
|
||||
List<Node> nodes = nodeService.previousNodeList(task.getDefinitionId(), nowNodeCode);
|
||||
if (CollUtil.isNotEmpty(nodes)) {
|
||||
return StreamUtils.filter(nodes, e -> NodeType.BETWEEN.getKey().equals(e.getNodeType()));
|
||||
List<HisTask> taskList = hisTaskService.getByInsId(task.getInstanceId());
|
||||
|
||||
Map<String, Node> nodeMap = StreamUtils.toIdentityMap(nodes, Node::getNodeCode);
|
||||
List<Node> backNodeList = new ArrayList<>();
|
||||
for (HisTask hisTask : taskList) {
|
||||
Node nodeValue = nodeMap.get(hisTask.getNodeCode());
|
||||
if (nodeValue != null) {
|
||||
backNodeList.add(nodeValue);
|
||||
}
|
||||
}
|
||||
if (CollUtil.isNotEmpty(backNodeList)) {
|
||||
List<Node> prefixOrSuffixNodes = StreamUtils.filter(backNodeList, e -> NodeType.BETWEEN.getKey().equals(e.getNodeType()));
|
||||
Collections.reverse(prefixOrSuffixNodes);
|
||||
return prefixOrSuffixNodes;
|
||||
}
|
||||
return nodes;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user