mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 18:28:43 +08:00 
			
		
		
		
	仿钉钉流程设计- 模型节点结构调整
This commit is contained in:
		| @@ -1,9 +1,12 @@ | ||||
| package cn.iocoder.yudao.module.bpm.enums.definition; | ||||
|  | ||||
| import cn.hutool.core.util.ArrayUtil; | ||||
| import cn.iocoder.yudao.framework.common.core.IntArrayValuable; | ||||
| import lombok.AllArgsConstructor; | ||||
| import lombok.Getter; | ||||
|  | ||||
| import java.util.Arrays; | ||||
|  | ||||
| /** | ||||
|  * BPM 多人审批方式的枚举 | ||||
|  * | ||||
| @@ -11,7 +14,7 @@ import lombok.Getter; | ||||
|  */ | ||||
| @Getter | ||||
| @AllArgsConstructor | ||||
| public enum BpmApproveMethodEnum { | ||||
| public enum BpmApproveMethodEnum implements IntArrayValuable { | ||||
|  | ||||
|     RANDOM_SELECT_ONE_APPROVE(1, "随机挑选一人审批"), | ||||
|     APPROVE_BY_RATIO(2, "多人会签(按通过比例)"), // 会签(按通过比例) | ||||
| @@ -22,13 +25,20 @@ public enum BpmApproveMethodEnum { | ||||
|      * 审批方式 | ||||
|      */ | ||||
|     private final Integer method; | ||||
|  | ||||
|     /** | ||||
|      * 名字 | ||||
|      */ | ||||
|     private final String name; | ||||
|  | ||||
|     public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmApproveMethodEnum::getMethod).toArray(); | ||||
|  | ||||
|     public static BpmApproveMethodEnum valueOf(Integer method) { | ||||
|         return ArrayUtil.firstMatch(item -> item.getMethod().equals(method), values()); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public int[] array() { | ||||
|         return ARRAYS; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1,9 +1,12 @@ | ||||
| package cn.iocoder.yudao.module.bpm.enums.definition; | ||||
|  | ||||
| import cn.hutool.core.util.ArrayUtil; | ||||
| import cn.iocoder.yudao.framework.common.core.IntArrayValuable; | ||||
| import lombok.AllArgsConstructor; | ||||
| import lombok.Getter; | ||||
|  | ||||
| import java.util.Arrays; | ||||
|  | ||||
| /** | ||||
|  * BPM 用户任务拒绝处理类型枚举 | ||||
|  * | ||||
| @@ -11,7 +14,7 @@ import lombok.Getter; | ||||
|  */ | ||||
| @Getter | ||||
| @AllArgsConstructor | ||||
| public enum BpmUserTaskRejectHandlerType { | ||||
| public enum BpmUserTaskRejectHandlerType implements IntArrayValuable { | ||||
|  | ||||
|     FINISH_PROCESS(1, "终止流程"), | ||||
|     RETURN_USER_TASK(2, "驳回到指定任务节点"); | ||||
| @@ -19,8 +22,14 @@ public enum BpmUserTaskRejectHandlerType { | ||||
|     private final Integer type; | ||||
|     private final String name; | ||||
|  | ||||
|     public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskRejectHandlerType::getType).toArray(); | ||||
|  | ||||
|     public static BpmUserTaskRejectHandlerType typeOf(Integer type) { | ||||
|         return ArrayUtil.firstMatch(item -> item.getType().equals(type), values()); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public int[] array() { | ||||
|         return ARRAYS; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1,9 +1,12 @@ | ||||
| package cn.iocoder.yudao.module.bpm.enums.definition; | ||||
|  | ||||
| import cn.hutool.core.util.ArrayUtil; | ||||
| import cn.iocoder.yudao.framework.common.core.IntArrayValuable; | ||||
| import lombok.AllArgsConstructor; | ||||
| import lombok.Getter; | ||||
|  | ||||
| import java.util.Arrays; | ||||
|  | ||||
| /** | ||||
|  * 用户任务超时处理执行动作枚举 | ||||
|  * | ||||
| @@ -11,7 +14,7 @@ import lombok.Getter; | ||||
|  */ | ||||
| @Getter | ||||
| @AllArgsConstructor | ||||
| public enum BpmUserTaskTimeoutActionEnum { | ||||
| public enum BpmUserTaskTimeoutActionEnum implements IntArrayValuable { | ||||
|  | ||||
|     AUTO_REMINDER(1,"自动提醒"), | ||||
|     AUTO_APPROVE(2, "自动同意"), | ||||
| @@ -20,7 +23,14 @@ public enum BpmUserTaskTimeoutActionEnum { | ||||
|     private final Integer action; | ||||
|     private final String name; | ||||
|  | ||||
|     public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskTimeoutActionEnum::getAction).toArray(); | ||||
|  | ||||
|     public static BpmUserTaskTimeoutActionEnum actionOf(Integer action) { | ||||
|         return ArrayUtil.firstMatch(item -> item.getAction().equals(action), values()); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public int[] array() { | ||||
|         return ARRAYS; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jason
					jason