parent
6cdcde692b
commit
9922e2fcf2
@ -0,0 +1,27 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.bpm.framework.activiti.core.behavior.script.impl;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.bpm.enums.definition.BpmTaskRuleScriptEnum;
|
||||||
|
import org.activiti.engine.impl.persistence.entity.TaskEntity;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分配给发起人的一级 Leader 审批的 Script 实现类
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class BpmTaskAssignLeaderX1Script extends BpmTaskAssignLeaderAbstractScript {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set<Long> calculateTaskCandidateUsers(TaskEntity task) {
|
||||||
|
return calculateTaskCandidateUsers(task, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmTaskRuleScriptEnum getEnum() {
|
||||||
|
return BpmTaskRuleScriptEnum.LEADER_X1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.bpm.framework.activiti.core.behavior.script.impl;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.bpm.enums.definition.BpmTaskRuleScriptEnum;
|
||||||
|
import org.activiti.engine.impl.persistence.entity.TaskEntity;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分配给发起人的二级 Leader 审批的 Script 实现类
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class BpmTaskAssignLeaderX2Script extends BpmTaskAssignLeaderAbstractScript {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set<Long> calculateTaskCandidateUsers(TaskEntity task) {
|
||||||
|
return calculateTaskCandidateUsers(task, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmTaskRuleScriptEnum getEnum() {
|
||||||
|
return BpmTaskRuleScriptEnum.LEADER_X2;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
package cn.iocoder.yudao.adminserver.modules.bpm.framework.activiti.core.behavior.script.impl;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.bpm.enums.definition.BpmTaskRuleScriptEnum;
|
||||||
|
import cn.iocoder.yudao.adminserver.modules.bpm.framework.activiti.core.behavior.script.BpmTaskAssignScript;
|
||||||
|
import cn.iocoder.yudao.framework.common.util.collection.SetUtils;
|
||||||
|
import org.activiti.engine.impl.persistence.entity.TaskEntity;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分配给发起人审批的 Script 实现类
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class BpmTaskAssignStartUserScript implements BpmTaskAssignScript {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set<Long> calculateTaskCandidateUsers(TaskEntity task) {
|
||||||
|
Long userId = Long.parseLong(task.getProcessInstance().getStartUserId());
|
||||||
|
return SetUtils.asSet(userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BpmTaskRuleScriptEnum getEnum() {
|
||||||
|
return BpmTaskRuleScriptEnum.START_USER;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue