mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-15 03:25:06 +08:00
仿钉钉流程设计- code review 部分修改
This commit is contained in:
@ -7,15 +7,14 @@ import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
// TODO @jason:BpmUserTaskTimeoutHandlerTypeEnum 会不会更匹配哈
|
||||
/**
|
||||
* 用户任务超时处理执行动作枚举
|
||||
* 用户任务超时处理类型枚举
|
||||
*
|
||||
* @author jason
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BpmUserTaskTimeoutActionEnum implements IntArrayValuable {
|
||||
public enum BpmUserTaskTimeoutHandlerType implements IntArrayValuable {
|
||||
|
||||
REMINDER(1,"自动提醒"),
|
||||
APPROVE(2, "自动同意"),
|
||||
@ -24,10 +23,10 @@ public enum BpmUserTaskTimeoutActionEnum implements IntArrayValuable {
|
||||
private final Integer action;
|
||||
private final String name;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskTimeoutActionEnum::getAction).toArray();
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmUserTaskTimeoutHandlerType::getAction).toArray();
|
||||
|
||||
public static BpmUserTaskTimeoutActionEnum actionOf(Integer action) {
|
||||
return ArrayUtil.firstMatch(item -> item.getAction().equals(action), values());
|
||||
public static BpmUserTaskTimeoutHandlerType typeOf(Integer type) {
|
||||
return ArrayUtil.firstMatch(item -> item.getAction().equals(type), values());
|
||||
}
|
||||
|
||||
@Override
|
Reference in New Issue
Block a user