package com.zy.core.enums;
|
/*
|
* 2024/6/21
|
* */
|
public enum JarTaskModeType {
|
|
IN_OPEN_DOOR(1, "进料开门"), // 进料开门
|
IN_CLOSE_DOOR(2, "进料关门"), // 进料关门
|
OUT_OPEN_DOOR(3, "出料开门"), // 出料开门
|
OUT_CLOSE_DOOR(4, "出料关门"), // 出料关门
|
OPEN_THE_DOOR(5, "开门"), // 开门
|
CLOSE_THE_DOOR(6, "关门"), // 关门
|
IN_DOOR_COMPLETE(7, "进料完成"), // 进料完成
|
OUT_DOOR_COMPLETE(8, "出料完成"), // 出料完成
|
OPEN_THE_DOOR_COMPLETE(9, "开门完成"), // 开门完成
|
CLOSE_THE_DOOR_COMPLETE(10, "关门完成"), // 关门完成
|
;
|
|
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;
|
}
|
|
}
|