skyouc
2024-12-21 c635d78b479510ebe2556a420948effcd30a0731
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/enums/LocTypeHeightType.java
@@ -1,42 +1,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;
    }
}
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;
    }
}