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
package com.vincent.rsf.server.system.enums;
 
 
public enum LocStsType {
 
    //空板
    LOC_STS_TYPE_D("D", "空板"),
    //在库
    LOC_STS_TYPE_F("F", "在库"),
    //空库
    LOC_STS_TYPE_O("O", "空库"),
    //禁用
    LOC_STS_TYPE_X("X", "禁用"),
    //入库预约
    LOC_STS_TYPE_S("S", "入库预约"),
    //出库预约
    LOC_STS_TYPE_R("R", "出库预约"),
    ;
 
    private String type;
 
    private String desc;
 
    LocStsType(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }
 
//    public long val() {
//        LocStsService service = SpringUtils.getBean(LocStsService.class);
//        LocSts locSts = service.getOne(new LambdaQueryWrapper<LocSts>().eq(LocSts::getLocSts, this.toString()));
//        if (locSts == null) {
//            throw new CoolException("LocStsType Error!");
//        }
//        return locSts.getId();
//    }
 
    public static LocStsType get(String el) {
        for (LocStsType value : LocStsType.values()) {
            if (el.equals(value.toString())) {
                return value;
            }
        }
        return null;
    }
 
 
}