package com.zy.core.enums; public enum RgvStatusType { NONE(-1, "离线"), IDLE(0, "无任务"), WORKING(1, "取货行走"), SOS(2, "进站运行中"), WORKING1(3, "进站完成"), FETCHING(4, "有物待出站"), A5(5,"出站行走"), A6(6,"出站请求"), A7(7,"出站运行中"), A8(8,"出站完成"), ; public Integer id; public String desc; RgvStatusType(Integer id, String desc) { this.id = id; this.desc = desc; } public static RgvStatusType get(Short id) { if (null == id) { return null; } for (RgvStatusType type : RgvStatusType.values()) { if (type.id.equals(id.intValue())) { return type; } } return NONE; } public static RgvStatusType get(RgvStatusType type) { if (null == type) { return null; } for (RgvStatusType rgvStatusType : RgvStatusType.values()) { if (rgvStatusType == type) { return rgvStatusType; } } return null; } }