feat(REQ-4418) - 处理上节点审批人的逻辑

This commit is contained in:
wangli 2025-08-25 17:58:14 +08:00
parent 75fccfd704
commit 7e08c6a233
3 changed files with 9 additions and 9 deletions

View File

@ -41,6 +41,7 @@ import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_SPECIFY_NE
import static cn.axzo.workflow.common.constant.BpmnConstants.SIGNATURE_COLLECTION; import static cn.axzo.workflow.common.constant.BpmnConstants.SIGNATURE_COLLECTION;
import static cn.axzo.workflow.common.constant.BpmnConstants.TASK_COMPLETE_OPERATION_TYPE; import static cn.axzo.workflow.common.constant.BpmnConstants.TASK_COMPLETE_OPERATION_TYPE;
import static cn.axzo.workflow.common.enums.BpmnProcessInstanceResultEnum.APPROVED; import static cn.axzo.workflow.common.enums.BpmnProcessInstanceResultEnum.APPROVED;
import static cn.axzo.workflow.common.enums.BpmnProcessInstanceResultEnum.PROCESSING;
import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.addComment; import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.addComment;
import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.batchAddAttachment; import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.batchAddAttachment;
import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.validTask; import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.validTask;
@ -168,11 +169,15 @@ public class CustomApproveTaskCmd extends AbstractCommand<Void> implements Seria
private void resetApproverNode(String processInstanceId) { private void resetApproverNode(String processInstanceId) {
ExtAxProcessLogService logService = SpringContextUtils.getBean(ExtAxProcessLogService.class); ExtAxProcessLogService logService = SpringContextUtils.getBean(ExtAxProcessLogService.class);
ExtAxProcessLog processLog = logService.findByProcessIdAndTaskIdWithDeleted(processInstanceId, taskId); ExtAxProcessLog logQuery = new ExtAxProcessLog();
if (CollectionUtils.isEmpty(processLog.getAssigneeFull())) { logQuery.setProcessInstanceId(processInstanceId);
logQuery.setTaskId(taskId);
logQuery.setStatus(PROCESSING.getStatus());
List<ExtAxProcessLog> logs = logService.genericQuery(logQuery);
if (CollectionUtils.isEmpty(logs)) {
return; return;
} }
approver.setNodeId(processLog.getAssigneeFull().get(0).getNodeId()); approver.setNodeId(logs.get(0).getAssigneeFull().get(0).getNodeId());
} }
private void recordSignature(TaskEntity task, RuntimeService runtimeService) { private void recordSignature(TaskEntity task, RuntimeService runtimeService) {

View File

@ -8,11 +8,9 @@ import cn.axzo.workflow.common.model.request.form.FormPermissionMetaInfo;
import cn.axzo.workflow.core.conf.handler.ButtonConfTypeHandler; import cn.axzo.workflow.core.conf.handler.ButtonConfTypeHandler;
import cn.axzo.workflow.core.conf.handler.ListAssigneeTypeHandler; import cn.axzo.workflow.core.conf.handler.ListAssigneeTypeHandler;
import cn.axzo.workflow.core.conf.handler.ListFormFieldPermissionTypeHandler; import cn.axzo.workflow.core.conf.handler.ListFormFieldPermissionTypeHandler;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler; import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.ToString; import lombok.ToString;
@ -77,7 +75,7 @@ public class ExtAxProcessLog extends BaseEntity<ExtAxProcessLog> {
/** /**
* 审批人对象信息 * 审批人对象信息
*/ */
@TableField(typeHandler = ListAssigneeTypeHandler.class) @TableField(value = "assignee_full", typeHandler = ListAssigneeTypeHandler.class)
private List<BpmnTaskDelegateAssigner> assigneeFull; private List<BpmnTaskDelegateAssigner> assigneeFull;
/** /**
* 审批人标识 * 审批人标识

View File

@ -108,9 +108,6 @@ public class BasedIdentityV2TaskAssigneeSelector extends AbstractBpmnTaskAssigne
if (Objects.isNull(lastOperationApprover)) { if (Objects.isNull(lastOperationApprover)) {
return Collections.emptyList(); return Collections.emptyList();
} }
if (lastOperationApprover.comparePersonIdToOther(initiator)) {
return Collections.emptyList();
}
v2ReqBuilder.scope(FlowTaskAssignerScopeDTO.builder() v2ReqBuilder.scope(FlowTaskAssignerScopeDTO.builder()
.nodeId(lastOperationApprover.parseNodeId()) .nodeId(lastOperationApprover.parseNodeId())
.upLevel(getApproverSpecifyRangeOrgLimit(flowElement).orElse(SignApproverOrgLimitEnum.UNKNOWN).getCode()) .upLevel(getApproverSpecifyRangeOrgLimit(flowElement).orElse(SignApproverOrgLimitEnum.UNKNOWN).getCode())