skyouc
2024-12-21 c635d78b479510ebe2556a420948effcd30a0731
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
package com.zy.asrs.wms.asrs.entity.enums;
 
/**
 * 库位高度类型
 */
public enum LocTypeHeightType {
 
    LOW(1, "low", "低库位"),
    MIDDLE(2, "middle", "中库位"),
    HEIGHT(3, "height", "高库位"),
    ;
 
 
    public Integer id;
    public String flag;
    public String desc;
 
    LocTypeHeightType(Integer id, String flag, String desc) {
        this.id = id;
        this.flag = flag;
        this.desc = desc;
    }
 
    public static LocTypeHeightType get(Integer id) {
        for (LocTypeHeightType value : LocTypeHeightType.values()) {
            if (value.id.equals(id)) {
                return value;
            }
        }
        return null;
    }
 
    public static LocTypeHeightType get(String flag) {
        for (LocTypeHeightType value : LocTypeHeightType.values()) {
            if (value.flag.equals(flag)) {
                return value;
            }
        }
        return null;
    }
 
}