mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-12-27 18:46:00 +08:00
fix 修复排他网关执行后,驳回选到未执行的网关
This commit is contained in:
@@ -535,8 +535,20 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
|||||||
}
|
}
|
||||||
//获取可驳回的前置节点
|
//获取可驳回的前置节点
|
||||||
List<Node> nodes = nodeService.previousNodeList(task.getDefinitionId(), nowNodeCode);
|
List<Node> nodes = nodeService.previousNodeList(task.getDefinitionId(), nowNodeCode);
|
||||||
if (CollUtil.isNotEmpty(nodes)) {
|
List<HisTask> taskList = hisTaskService.getByInsId(task.getInstanceId());
|
||||||
return StreamUtils.filter(nodes, e -> NodeType.BETWEEN.getKey().equals(e.getNodeType()));
|
|
||||||
|
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;
|
return nodes;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user