ny
23 小时以前 b6f169fe43a2b13f351aefc152374fc7f0bc8cb7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package jnpf.flowable.enums;
 
import lombok.Getter;
 
/**
 * 附件条件
 *
 * @author :JNPF开发平台组
 * @version: V3.1.0
 * @copyright 引迈信息技术有限公司
 * @date :2022/6/14 16:50
 */
@Getter
public enum ExtraRuleEnum {
    /**
     * 无条件
     */
    none(1, "无条件"),
    /**
     * 同一部门
     */
    organize(2, "同一部门"),
    /**
     * 同一岗位
     */
    position(3, "同一岗位"),
    /**
     * 发起人上级
     */
    manager(4, "发起人上级"),
    /**
     * 发起人下属
     */
    subordinate(5, "发起人下属"),
    /**
     * 同一公司
     */
    department(6, "同一公司"),
    /**
     * 同一角色
     */
    role(7, "同一角色"),
    /**
     * 同一分组
     */
    group(8, "同一分组");
 
    private final Integer code;
    private final String message;
 
    ExtraRuleEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
 
    /**
     * 根据状态code获取枚举名称
     *
     * @return
     */
    public static ExtraRuleEnum getByCode(Integer code) {
        for (ExtraRuleEnum status : ExtraRuleEnum.values()) {
            if (status.getCode().equals(code)) {
                return status;
            }
        }
        return ExtraRuleEnum.none;
    }
 
}