刘光辉
15 小时以前 34981c30a78e8bbd7791131059a9210f9928b62c
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
71
72
package jnpf.flowable.enums;
 
import lombok.Getter;
 
@Getter
public enum EventEnum {
    /**
     * 无
     */
    NONE(0, "无"),
    /**
     * 发起
     */
    INIT(1, "发起"),
    /**
     * 结束
     */
    END(2, "结束"),
    /**
     * 发起撤回
     */
    FLOW_RECALL(3, "发起撤回"),
    /**
     * 同意
     */
    APPROVE(4, "同意"),
    /**
     * 拒绝
     */
    REJECT(5, "拒绝"),
    /**
     * 节点撤回
     */
    RECALL(6, "节点撤回"),
    /**
     * 超时
     */
    OVERTIME(7, "超时"),
    /**
     * 提醒
     */
    NOTICE(8, "提醒"),
    /**
     * 退回
     */
    BACK(9, "退回"),
 
 
    ;
 
    private final Integer status;
    private final String message;
 
    EventEnum(int status, String message) {
        this.status = status;
        this.message = message;
    }
 
    /**
     * 根据状态status获取枚举名称
     *
     * @return
     */
    public static EventEnum getEventStatus(Integer status) {
        for (EventEnum eventEnum : EventEnum.values()) {
            if (eventEnum.getStatus().equals(status)) {
                return eventEnum;
            }
        }
        return EventEnum.NONE;
    }
}