package com.zy.core.enums; /* * 2024/6/21 * */ public enum JarTaskModeType { INIT(1, "左门开"), // 初始 OUT_RIGHT(2, "左门关"), // 右出库 OUT_LEFT(3, "右门开"), // 左出库 IN_RIGHT(4, "右门关"), // 右入库 ; public Integer id; public String desc; JarTaskModeType(Integer id, String desc) { this.id = id; this.desc = desc; } public static JarTaskModeType get(Short id) { if (null == id) { return null; } for (JarTaskModeType type : JarTaskModeType.values()) { if (type.id.equals(id.intValue())) { return type; } } return null; } public static JarTaskModeType get(JarTaskModeType type) { if (null == type) { return null; } for (JarTaskModeType crnTaskModeType : JarTaskModeType.values()) { if (crnTaskModeType == type) { return crnTaskModeType; } } return null; } }