Commit c34c218bb56e1f5dc0d037224fd55867520a0eed
1 parent
fe186da1
fix:【bpm】只能退回到已经处理过的节点(排除审批未经过的节点)。相关 issue:https://github.com/YunaiV/ruoyi-vue-pro/issues/982
Showing
1 changed file
with
5 additions
and
0 deletions
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
| @@ -376,6 +376,11 @@ public class BpmTaskServiceImpl implements BpmTaskService { | @@ -376,6 +376,11 @@ public class BpmTaskServiceImpl implements BpmTaskService { | ||
| 376 | } | 376 | } |
| 377 | // 2.2 过滤:只有串行可到达的节点,才可以退回。类似非串行、子流程无法退回 | 377 | // 2.2 过滤:只有串行可到达的节点,才可以退回。类似非串行、子流程无法退回 |
| 378 | previousUserList.removeIf(userTask -> !BpmnModelUtils.isSequentialReachable(source, userTask, null)); | 378 | previousUserList.removeIf(userTask -> !BpmnModelUtils.isSequentialReachable(source, userTask, null)); |
| 379 | + | ||
| 380 | + // 2.3 过滤:只能退回到已经处理过的节点(排除审批未经过的节点)。相关 issue:https://github.com/YunaiV/ruoyi-vue-pro/issues/982 | ||
| 381 | + List<HistoricTaskInstance> finishedTasks = getFinishedTaskListByProcessInstanceIdWithoutCancel(task.getProcessInstanceId()); | ||
| 382 | + Set<String> finishedTaskDefinitionKeys = convertSet(finishedTasks, HistoricTaskInstance::getTaskDefinitionKey); | ||
| 383 | + previousUserList.removeIf(userTask -> !finishedTaskDefinitionKeys.contains(userTask.getId())); | ||
| 379 | return previousUserList; | 384 | return previousUserList; |
| 380 | } | 385 | } |
| 381 | 386 |