REQ-2924-修复查询退回节点重复问题

This commit is contained in:
yangqicheng 2024-09-14 15:10:18 +08:00
parent e221cb1d6b
commit adcb49c806

View File

@ -366,6 +366,12 @@ public class BpmnProcessTaskServiceImpl implements BpmnProcessTaskService {
throw new WorkflowEngineException(PROCESS_INSTANCE_NOT_EXISTS); throw new WorkflowEngineException(PROCESS_INSTANCE_NOT_EXISTS);
} }
List<BpmnHistoricTaskInstanceVO> tasks = this.getHistoricTaskListByProcessInstanceId(processInstanceId, null); List<BpmnHistoricTaskInstanceVO> tasks = this.getHistoricTaskListByProcessInstanceId(processInstanceId, null);
tasks = tasks.stream()
.filter(t -> t.getNodeType() == NODE_STARTER || t.getNodeType() == NODE_TASK || t.getNodeType() == NODE_BUSINESS)
.collect(Collectors.toList());
if (CollectionUtils.isEmpty(tasks)) {
return Collections.emptyList();
}
tasks.sort(Comparator.comparing(BpmnHistoricTaskInstanceVO::getCreateTime)); tasks.sort(Comparator.comparing(BpmnHistoricTaskInstanceVO::getCreateTime));
LinkedList<Pair<String, List<BpmnHistoricTaskInstanceVO>>> executedList = new LinkedList<>(); LinkedList<Pair<String, List<BpmnHistoricTaskInstanceVO>>> executedList = new LinkedList<>();
for (BpmnHistoricTaskInstanceVO vo : tasks) { for (BpmnHistoricTaskInstanceVO vo : tasks) {