Commit 4a23872598ab31bf3fcf510dd3fbacabde4fba81

Authored by YunaiV
1 parent b629e0a6

【代码优化】工作流:优化 form 分配人的逻辑

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 3 import cn.hutool.core.convert.Convert;
4 4 import cn.hutool.core.lang.Assert;
5 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 7 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
7 8 import org.flowable.bpmn.model.BpmnModel;
8 9 import org.flowable.engine.delegate.DelegateExecution;
... ... @@ -17,10 +18,11 @@ import java.util.Set;
17 18 * @author jason
18 19 */
19 20 @Component
20   -public class BpmTaskCandidateDeptLeaderOnFormStrategy extends AbstractBpmTaskCandidateDeptLeaderStrategy {
  21 +public class BpmTaskCandidateFormSDeptLeaderStrategy extends AbstractBpmTaskCandidateDeptLeaderStrategy {
  22 +
21 23 @Override
22 24 public BpmTaskCandidateStrategyEnum getStrategy() {
23   - return BpmTaskCandidateStrategyEnum.DEPT_LEADER_ON_FORM;
  25 + return BpmTaskCandidateStrategyEnum.FORM_DEPT_LEADER;
24 26 }
25 27  
26 28 @Override
... ... @@ -50,4 +52,5 @@ public class BpmTaskCandidateDeptLeaderOnFormStrategy extends AbstractBpmTaskCan
50 52 int level = Integer.parseInt(params[1]);
51 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 3 import cn.hutool.core.convert.Convert;
4 4 import cn.hutool.core.lang.Assert;
5 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 7 import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmTaskCandidateStrategyEnum;
7 8 import org.flowable.bpmn.model.BpmnModel;
8 9 import org.flowable.engine.delegate.DelegateExecution;
... ... @@ -17,11 +18,11 @@ import java.util.Set;
17 18 * @author jason
18 19 */
19 20 @Component
20   -public class BpmTaskCandidateUserFieldOnFormStrategy implements BpmTaskCandidateStrategy {
  21 +public class BpmTaskCandidateFormUserStrategy implements BpmTaskCandidateStrategy {
21 22  
22 23 @Override
23 24 public BpmTaskCandidateStrategyEnum getStrategy() {
24   - return BpmTaskCandidateStrategyEnum.USER_FIELD_ON_FORM;
  25 + return BpmTaskCandidateStrategyEnum.FORM_USER;
25 26 }
26 27  
27 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 29 START_USER_DEPT_LEADER(37, "发起人部门负责人"),
30 30 START_USER_DEPT_LEADER_MULTI(38, "发起人连续多级部门的负责人"),
31 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 34 EXPRESSION(60, "流程表达式"), // 表达式 ExpressionManager
35 35 ASSIGN_EMPTY(1, "审批人为空"),
36 36 ;
... ...