李宇
2022-03-10 7da4353b03a540e1de6f3b848a9613f84517db69
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
package com.nanometer.smartlab.entity.enumtype;
 
import java.util.HashMap;
 
public enum ApplyStatus {
    REFUSE(0, "拒绝"),
    Price_CONFIRM(11, "价格确认"),
    PENDING_APPROVAL(1, "待审批"),
    APPROVED(2, "已审批"),
    PENDING_PURCHASE(3, "待采购"),
    STORAGE(4, "已入库"),
    CANCEL(5, "取消"),
    SUPPLIER_CONFIRM(6,"已确认"),
    SUPPLIER_CANCEL(7,"已取消"),
    FINISHED(8,"已完成"),
    UNCOMPLETED(9,"未完成"),
 
 
    EXPIRED(10,"过期"),;
    private int key;
 
    private String text;
 
    private ApplyStatus(int key, String text) {
        this.key = key;
        this.text = text;
    }
 
    public int getKey() {
        return key;
    }
 
    public String getText() {
        return text;
    }
 
    private static HashMap<Integer,ApplyStatus> map = new HashMap<Integer,ApplyStatus>();
    static {
        for(ApplyStatus d : ApplyStatus.values()){
            map.put(d.key, d);
        }
    }
 
    public static ApplyStatus parse(Integer index) {
        if(map.containsKey(index)){
            return map.get(index);
        }
        return null;
    }
 
 
}