Commit 4a23872598ab31bf3fcf510dd3fbacabde4fba81
1 parent
b629e0a6
【代码优化】工作流:优化 form 分配人的逻辑
Showing
3 changed files
with
12 additions
and
8 deletions
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/dept/BpmTaskCandidateDeptLeaderOnFormStrategy.java renamed to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/form/BpmTaskCandidateFormSDeptLeaderStrategy.java
| 1 | -package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.dept; | 1 | +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.form; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.convert.Convert; | 3 | import cn.hutool.core.convert.Convert; |
| 4 | import cn.hutool.core.lang.Assert; | 4 | import cn.hutool.core.lang.Assert; |
| 5 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; | 5 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; |
| 6 | +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.dept.AbstractBpmTaskCandidateDeptLeaderStrategy; | ||
| 6 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; | 7 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; |
| 7 | import org.flowable.bpmn.model.BpmnModel; | 8 | import org.flowable.bpmn.model.BpmnModel; |
| 8 | import org.flowable.engine.delegate.DelegateExecution; | 9 | import org.flowable.engine.delegate.DelegateExecution; |
| @@ -17,10 +18,11 @@ import java.util.Set; | @@ -17,10 +18,11 @@ import java.util.Set; | ||
| 17 | * @author jason | 18 | * @author jason |
| 18 | */ | 19 | */ |
| 19 | @Component | 20 | @Component |
| 20 | -public class BpmTaskCandidateDeptLeaderOnFormStrategy extends AbstractBpmTaskCandidateDeptLeaderStrategy { | 21 | +public class BpmTaskCandidateFormSDeptLeaderStrategy extends AbstractBpmTaskCandidateDeptLeaderStrategy { |
| 22 | + | ||
| 21 | @Override | 23 | @Override |
| 22 | public BpmTaskCandidateStrategyEnum getStrategy() { | 24 | public BpmTaskCandidateStrategyEnum getStrategy() { |
| 23 | - return BpmTaskCandidateStrategyEnum.DEPT_LEADER_ON_FORM; | 25 | + return BpmTaskCandidateStrategyEnum.FORM_DEPT_LEADER; |
| 24 | } | 26 | } |
| 25 | 27 | ||
| 26 | @Override | 28 | @Override |
| @@ -50,4 +52,5 @@ public class BpmTaskCandidateDeptLeaderOnFormStrategy extends AbstractBpmTaskCan | @@ -50,4 +52,5 @@ public class BpmTaskCandidateDeptLeaderOnFormStrategy extends AbstractBpmTaskCan | ||
| 50 | int level = Integer.parseInt(params[1]); | 52 | int level = Integer.parseInt(params[1]); |
| 51 | return super.getMultiLevelDeptLeaderIds(Convert.toList(Long.class, result), level); | 53 | return super.getMultiLevelDeptLeaderIds(Convert.toList(Long.class, result), level); |
| 52 | } | 54 | } |
| 55 | + | ||
| 53 | } | 56 | } |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/user/BpmTaskCandidateUserFieldOnFormStrategy.java renamed to yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/candidate/strategy/form/BpmTaskCandidateFormUserStrategy.java
| 1 | -package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.user; | 1 | +package cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.form; |
| 2 | 2 | ||
| 3 | import cn.hutool.core.convert.Convert; | 3 | import cn.hutool.core.convert.Convert; |
| 4 | import cn.hutool.core.lang.Assert; | 4 | import cn.hutool.core.lang.Assert; |
| 5 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; | 5 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.BpmTaskCandidateStrategy; |
| 6 | +import cn.iocoder.yudao.module.bpm.framework.flowable.core.candidate.strategy.user.BpmTaskCandidateUserStrategy; | ||
| 6 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; | 7 | import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum; |
| 7 | import org.flowable.bpmn.model.BpmnModel; | 8 | import org.flowable.bpmn.model.BpmnModel; |
| 8 | import org.flowable.engine.delegate.DelegateExecution; | 9 | import org.flowable.engine.delegate.DelegateExecution; |
| @@ -17,11 +18,11 @@ import java.util.Set; | @@ -17,11 +18,11 @@ import java.util.Set; | ||
| 17 | * @author jason | 18 | * @author jason |
| 18 | */ | 19 | */ |
| 19 | @Component | 20 | @Component |
| 20 | -public class BpmTaskCandidateUserFieldOnFormStrategy implements BpmTaskCandidateStrategy { | 21 | +public class BpmTaskCandidateFormUserStrategy implements BpmTaskCandidateStrategy { |
| 21 | 22 | ||
| 22 | @Override | 23 | @Override |
| 23 | public BpmTaskCandidateStrategyEnum getStrategy() { | 24 | public BpmTaskCandidateStrategyEnum getStrategy() { |
| 24 | - return BpmTaskCandidateStrategyEnum.USER_FIELD_ON_FORM; | 25 | + return BpmTaskCandidateStrategyEnum.FORM_USER; |
| 25 | } | 26 | } |
| 26 | 27 | ||
| 27 | @Override | 28 | @Override |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/core/enums/BpmTaskCandidateStrategyEnum.java
| @@ -29,8 +29,8 @@ public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { | @@ -29,8 +29,8 @@ public enum BpmTaskCandidateStrategyEnum implements IntArrayValuable { | ||
| 29 | START_USER_DEPT_LEADER(37, "发起人部门负责人"), | 29 | START_USER_DEPT_LEADER(37, "发起人部门负责人"), |
| 30 | START_USER_DEPT_LEADER_MULTI(38, "发起人连续多级部门的负责人"), | 30 | START_USER_DEPT_LEADER_MULTI(38, "发起人连续多级部门的负责人"), |
| 31 | USER_GROUP(40, "用户组"), | 31 | USER_GROUP(40, "用户组"), |
| 32 | - USER_FIELD_ON_FORM(50, "表单内用户字段"), | ||
| 33 | - DEPT_LEADER_ON_FORM(51, "表单内部分负责人"), | 32 | + FORM_USER(50, "表单内用户字段"), |
| 33 | + FORM_DEPT_LEADER(51, "表单内部门负责人"), | ||
| 34 | EXPRESSION(60, "流程表达式"), // 表达式 ExpressionManager | 34 | EXPRESSION(60, "流程表达式"), // 表达式 ExpressionManager |
| 35 | ASSIGN_EMPTY(1, "审批人为空"), | 35 | ASSIGN_EMPTY(1, "审批人为空"), |
| 36 | ; | 36 | ; |