Junjie
18 小时以前 c97c04770c17c36c554963bf8bb8d8fafc6a8d43
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
package com.zy.core.enums;
 
import com.core.common.Cools;
 
public enum CyclePlanLocStatus {
 
    PENDING(0, "待执行"),
    MOVING(1, "执行中"),
    DONE(2, "已完成"),
    SKIPPED(-1, "跳过"),
    ;
 
    CyclePlanLocStatus(int id, String desc) {
        this.id = id;
        this.desc = desc;
    }
 
    public int id;
    public String desc;
 
    public static CyclePlanLocStatus get(int id) {
        if (Cools.isEmpty(id)) {
            return null;
        }
        for (CyclePlanLocStatus value : CyclePlanLocStatus.values()) {
            if (value.id == id) {
                return value;
            }
        }
        return null;
    }
 
}