package com.zy.core.enums; public enum SteLocaType { NONE(0, "未知"), POINT20(20, "A面平移车"), POINT21(21, "硫化罐A端"), POINT22(22, "硫化罐B端"), POINT23(23, "B面平移车"), POINT24(24, "水槽A端"), POINT25(25, "水槽B端"), POINT26(26, "B端输送线"), // NONE999(999, "未知"), // A(1, "A点"), // B(2, "B点"), // A_WAITING(3, "A待机点"), // B_WAITING(4, "B待机点"), ; public Integer id; public String desc; SteLocaType(Integer id, String desc) { this.id = id; this.desc = desc; } public static SteLocaType get(Short id) { if (null == id) { return NONE; } for (SteLocaType type : SteLocaType.values()) { if (type.id.equals(id.intValue())) { return type; } } return NONE; } public static SteLocaType get(SteLocaType type) { if (null == type) { return NONE; } for (SteLocaType crnStatusType : SteLocaType.values()) { if (crnStatusType == type) { return crnStatusType; } } return NONE; } }