update - 优化代码, 移除无用的逻辑

This commit is contained in:
wangli 2024-03-28 15:41:18 +08:00
parent 2aafb1500b
commit 6816c14ba8

View File

@ -4,6 +4,7 @@ import cn.axzo.workflow.common.model.request.bpmn.task.BpmnTaskDelegateAssigner;
import cn.axzo.workflow.core.listener.BpmnTaskEventListener;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.ListUtils;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
import org.flowable.task.service.delegate.DelegateTask;
@ -47,7 +48,8 @@ public class SnapshotBpmnTaskTaskEvent_100_Listener implements BpmnTaskEventList
INTERNAL_ACTIVITY_RELATION_ASSIGNEE_LIST_INFO_SNAPSHOT + delegateTask.getTaskDefinitionKey(),
List.class);
// identityId_identityType
assignerList.stream().filter(i -> Objects.equals(delegateTask.getAssignee(), i.buildAssigneeId()))
ListUtils.emptyIfNull(assignerList).stream().filter(i -> Objects.equals(delegateTask.getAssignee(),
i.buildAssigneeId()))
.findFirst()
.ifPresent(i -> {
// 保存每个 taskId 的审批人