fix(flow): 代办任务根据流程名称查询失效

This commit is contained in:
冷冷 committed 2024-08-16 15:28:19 +08:00
1 parent d723fac0e2
commit d6fd5ad960
1 file changed
+2 -2
@@ -239,11 +239,11 @@ public class EngineFlowController {
TaskQuery taskQuery = taskService.createTaskQuery().taskAssignee(assign).orderByTaskCreateTime().desc();
if (StrUtil.isNotBlank(taskQueryParamDto.getProcessName())) {
List<ProcessInstance> processInstanceList = runtimeService.createProcessInstanceQuery()
.processInstanceNameLikeIgnoreCase(taskQueryParamDto.getProcessName())
.processDefinitionName(taskQueryParamDto.getProcessName())
.list();
if (CollUtil.isNotEmpty(processInstanceList)) {
taskQuery.processInstanceIdIn(processInstanceList.stream()
.map(ProcessInstance::getProcessDefinitionId)
.map(ProcessInstance::getProcessInstanceId)
.collect(Collectors.toList()));
}
}