From 12ea405ba2f58d5cd1f3038579365d3003485fcc Mon Sep 17 00:00:00 2001 From: wangli <274027703@qq.com> Date: Wed, 10 Jan 2024 19:15:46 +0800 Subject: [PATCH] =?UTF-8?q?update=20-=20=E5=A4=84=E7=90=86=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=B7=B2=E7=BB=93=E6=9D=9F=E5=90=8E=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflow/core/engine/cmd/CustomApproveTaskCmd.java | 5 +---- .../workflow/core/engine/cmd/CustomCommentTaskCmd.java | 6 +----- .../core/engine/cmd/CustomCountersignUserTaskCmd.java | 7 ++----- .../core/engine/cmd/CustomTransferUserTaskCmd.java | 5 +---- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomApproveTaskCmd.java b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomApproveTaskCmd.java index e9833cc95..6eab3c41a 100644 --- a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomApproveTaskCmd.java +++ b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomApproveTaskCmd.java @@ -11,7 +11,6 @@ import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl; import org.flowable.engine.impl.util.CommandContextUtil; import org.flowable.task.api.Task; import org.flowable.task.service.impl.persistence.entity.TaskEntity; -import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import java.io.Serializable; @@ -65,9 +64,7 @@ public class CustomApproveTaskCmd implements Command, Serializable { Authentication.setAuthenticatedUserId(null); } - if (!CollectionUtils.isEmpty(attachmentList)) { - batchAddAttachment(commandContext, task.getProcessInstanceId(), taskId, attachmentList, approver); - } + batchAddAttachment(commandContext, task.getProcessInstanceId(), taskId, attachmentList, approver); Authentication.setAuthenticatedUserId(approver.buildAssigneeId()); addComment(commandContext, task, COMMENT_TYPE_OPERATION_DESC, "已通过"); diff --git a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomCommentTaskCmd.java b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomCommentTaskCmd.java index 8d17b4ca3..e4580f09e 100644 --- a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomCommentTaskCmd.java +++ b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomCommentTaskCmd.java @@ -33,7 +33,6 @@ import static cn.axzo.workflow.common.constant.BpmnConstants.COMMENT_TYPE_COMMEN import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_TASK_RELATION_ASSIGNEE_INFO; import static cn.axzo.workflow.common.enums.BpmnFlowNodeType.NODE_COMMENT; import static cn.axzo.workflow.common.enums.BpmnProcessInstanceResultEnum.COMMENTED; -import static cn.axzo.workflow.common.enums.BpmnProcessInstanceResultEnum.PROCESSING; import static org.flowable.task.api.Task.DEFAULT_PRIORITY; /** @@ -103,10 +102,7 @@ public class CustomCommentTaskCmd implements Command, Serializable { Authentication.setAuthenticatedUserId(null); // 处理附件 - CustomTaskHelper.batchAddAttachment(commandContext, - Objects.equals(PROCESSING.getStatus(), processInstance.getBusinessStatus()) ? processInstanceId : null, - task.getId(), attachmentList, - operator); + CustomTaskHelper.batchAddAttachment(commandContext, processInstanceId, task.getId(), attachmentList, operator); CustomTaskHelper.createExtTaskInst(extAxHiTaskInstService, processInstanceId, task.getId(), task.getTaskDefinitionKey(), operator, COMMENTED.getStatus()); diff --git a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomCountersignUserTaskCmd.java b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomCountersignUserTaskCmd.java index a6c33b247..f4caae73c 100644 --- a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomCountersignUserTaskCmd.java +++ b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomCountersignUserTaskCmd.java @@ -15,7 +15,6 @@ import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl; import org.flowable.engine.impl.util.CommandContextUtil; import org.flowable.task.api.Task; import org.flowable.task.service.impl.persistence.entity.TaskEntity; -import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import java.io.Serializable; @@ -77,10 +76,8 @@ public class CustomCountersignUserTaskCmd implements Command, Serializable resolveOriginTask(taskService, task); - if (!CollectionUtils.isEmpty(attachmentList)) { - batchAddAttachment(commandContext, task.getProcessInstanceId(), task.getId(), attachmentList, - originTaskAssignee); - } + batchAddAttachment(commandContext, task.getProcessInstanceId(), task.getId(), attachmentList, + originTaskAssignee); switch (countersignType) { case FORWARD_COUNTERSIGN: diff --git a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomTransferUserTaskCmd.java b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomTransferUserTaskCmd.java index b7661231f..426ac15f3 100644 --- a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomTransferUserTaskCmd.java +++ b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomTransferUserTaskCmd.java @@ -13,7 +13,6 @@ import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl; import org.flowable.engine.impl.util.CommandContextUtil; import org.flowable.task.api.Task; import org.flowable.task.service.impl.persistence.entity.TaskEntity; -import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import java.io.Serializable; @@ -74,10 +73,8 @@ public class CustomTransferUserTaskCmd implements Command, Serializable { resolveOriginTask(commandContext, taskService, task); - if (!CollectionUtils.isEmpty(attachmentList)) { - batchAddAttachment(commandContext, task.getProcessInstanceId(), task.getId(), attachmentList, + batchAddAttachment(commandContext, task.getProcessInstanceId(), task.getId(), attachmentList, originTaskAssignee); - } addMultiTask(commandContext, (TaskEntity) task, targetTaskAssignee); ((TaskEntity) task).setTransientVariable(TASK_COMPLETE_OPERATION_TYPE + task.getId(), TRANSFER.getStatus());