。。。

This commit is contained in:
wangliwen 2022-08-02 13:44:53 +08:00
parent 6a12463098
commit d21c3b7099
1 changed files with 2 additions and 2 deletions

View File

@ -663,7 +663,7 @@ public class ActTaskService extends BaseServiceImpl {
if (isMultiInstanceByInstanceId(instanceId, userId)) {
throw new RenException(ErrorCode.END_PROCESS_PARALLEL_ERROR);
}
Task task = taskService.createTaskQuery().processInstanceId(instanceId).taskAssignee(userId).list().stream().sorted(
Task task = taskService.createTaskQuery().processInstanceId(instanceId).taskAssignee(userId).active().list().stream().sorted(
Comparator.comparing(x -> {
Task index = (Task) x;
return index.getCreateTime();
@ -674,7 +674,7 @@ public class ActTaskService extends BaseServiceImpl {
return;
}
List<Task> tasks = taskService.createTaskQuery().processInstanceId(task.getProcessInstanceId()).taskAssignee(userId)
.taskDefinitionKey(task.getTaskDefinitionKey()).list();
.taskDefinitionKey(task.getTaskDefinitionKey()).active().list();
if (tasks.size() > 1) {
throw new RenException(ErrorCode.END_PROCESS_HANDLEING_ERROR);
}