jiazx0107@163.com
2023-05-17 620eab6cca2bc9ef9ea6d3067a0a5ba1deadbd1c
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
package com.ld.igds.constant;
 
/**
 * 仓库类型
 * @author jiazx
 *
 */
public enum DepotType {
    TYPE_01("01", "高大平房仓"),
    TYPE_02("02", "浅圆仓"),
    TYPE_03("03", "储油罐"),
    TYPE_04("04", "立筒仓"),
    TYPE_99("99", "其他");
 
    private String code;
    private String msg;
 
    DepotType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
 
    public String getCode() {
        return code;
    }
 
    public String getMsg() {
        return msg;
    }
 
    public static String getMsg(String code) {
        if(null == code) return null;
        
        if(DepotType.TYPE_01.getCode().equals(code)) return DepotType.TYPE_01.getMsg();
        
        if(DepotType.TYPE_02.getCode().equals(code)) return DepotType.TYPE_02.getMsg();
        
        if(DepotType.TYPE_03.getCode().equals(code)) return DepotType.TYPE_03.getMsg();
        
        if(DepotType.TYPE_04.getCode().equals(code)) return DepotType.TYPE_04.getMsg();
        
        return code;
    }
 
}