mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-16 12:05:07 +08:00
【功能新增】工作流:审批类型,区分人工审批、自动通过、自动拒绝
This commit is contained in:
@ -14,7 +14,7 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmApproveMethodEnum implements IntArrayValuable {
|
||||
public enum BpmUserTaskApproveMethodEnum implements IntArrayValuable {
|
||||
|
||||
RANDOM(1, "随机挑选一人审批"),
|
||||
RATIO(2, "多人会签(按通过比例)"), // 会签(按通过比例)
|
||||
@ -31,9 +31,9 @@ public enum BpmApproveMethodEnum implements IntArrayValuable {
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmApproveMethodEnum::getMethod).toArray();
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskApproveMethodEnum::getMethod).toArray();
|
||||
|
||||
public static BpmApproveMethodEnum valueOf(Integer method) {
|
||||
public static BpmUserTaskApproveMethodEnum valueOf(Integer method) {
|
||||
return ArrayUtil.firstMatch(item -> item.getMethod().equals(method), values());
|
||||
}
|
||||
|
@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.definition;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 用户任务的审批类型枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmUserTaskApproveTypeEnum implements IntArrayValuable {
|
||||
|
||||
USER(1), // 人工审批
|
||||
AUTO_APPROVE(2), // 自动通过
|
||||
AUTO_REJECT(3); // 自动拒绝
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskApproveTypeEnum::getType).toArray();
|
||||
|
||||
private final Integer type;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
@ -4,6 +4,8 @@ import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* BPM 用户任务的审批人为空时,处理类型枚举
|
||||
*
|
||||
@ -19,11 +21,13 @@ public enum BpmUserTaskAssignEmptyHandlerTypeEnum implements IntArrayValuable {
|
||||
ASSIGN_ADMIN(4), // 转交给流程管理员
|
||||
;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskAssignEmptyHandlerTypeEnum::getType).toArray();
|
||||
|
||||
private final Integer type;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return new int[0];
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* BPM 用户任务的审批人与发起人相同时,处理类型枚举
|
||||
*
|
||||
@ -17,11 +19,13 @@ public enum BpmUserTaskAssignStartUserHandlerTypeEnum implements IntArrayValuabl
|
||||
SKIP(2), // 自动跳过【参考飞书】:1)如果当前节点还有其他审批人,则交由其他审批人进行审批;2)如果当前节点没有其他审批人,则该节点自动通过
|
||||
TRANSFER_DEPT_LEADER(3); // 转交给部门负责人审批【参考飞书】:若部门负责人为空,则自动通过
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskAssignStartUserHandlerTypeEnum::getType).toArray();
|
||||
|
||||
private final Integer type;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return new int[0];
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -30,6 +30,8 @@ public enum BpmReasonEnum {
|
||||
ASSIGN_START_USER_TRANSFER_DEPT_LEADER("审批人与提交人为同一人时,转交给部门负责人审批"),
|
||||
ASSIGN_EMPTY_APPROVE("审批人为空,自动通过"),
|
||||
ASSIGN_EMPTY_REJECT("审批人为空,自动不通过"),
|
||||
APPROVE_TYPE_AUTO_APPROVE("非人工审核,自动通过"),
|
||||
APPROVE_TYPE_AUTO_REJECT("非人工审核,自动不通过"),
|
||||
;
|
||||
|
||||
private final String reason;
|
||||
|
Reference in New Issue
Block a user