package com.zy.common.model.enums; public enum NavigationMapType { NONE(-1, "无过滤"), DFX(1, "过滤库位状态DFX"), NORMAL(2, "过滤库位状态X"), ; public Integer id; public String desc; NavigationMapType(Integer id, String desc) { this.id = id; this.desc = desc; } public static NavigationMapType get(Short id) { if (null == id) { return null; } for (NavigationMapType type : NavigationMapType.values()) { if (type.id.equals(id.intValue())) { return type; } } return null; } public static NavigationMapType get(NavigationMapType type) { if (null == type) { return null; } for (NavigationMapType type1 : NavigationMapType.values()) { if (type1 == type) { return type1; } } return null; } }