package com.zy.core.enums; public enum RgvTaskStatusType { NONE(0),//无 X_MOVE(1),//行走 FETCH(2),//取货 PUT(3),//放货 FETCH_PUT(4);//取放货 public Integer id; RgvTaskStatusType(Integer id) { this.id = id; } public static RgvTaskStatusType get(Short id) { if (null == id){ return null; } for(RgvTaskStatusType type : RgvTaskStatusType.values()){ if(type.id.equals(id.intValue())){ return type; } } return null; } public static RgvTaskStatusType get(RgvTaskStatusType type) { if (null == type){ return null; } for(RgvTaskStatusType rgvTaskStatusType : RgvTaskStatusType.values()){ if(rgvTaskStatusType == type){ return rgvTaskStatusType; } } return null; } }