package com.zy.core.enums;
|
|
public enum DualCrnForkPosType {
|
|
NONE(-1, "不在定位"), // 货叉原位
|
HOME(0, "货叉原位"), // 货叉原位
|
LEFT(1, "货叉在左侧"), // 货叉在左侧
|
RIGHT(2, "货叉在右侧"), // 货叉在右侧
|
_LEFT(3, "货叉在左侧远"), // 货叉在右侧远
|
_RIGHT(4, "货叉在右侧远"), // 货叉在右侧远
|
;
|
|
public Integer id;
|
public String desc;
|
DualCrnForkPosType(Integer id, String desc) {
|
this.id = id;
|
this.desc = desc;
|
}
|
|
public static DualCrnForkPosType get(Integer id) {
|
if (null == id) {
|
return null;
|
}
|
for (DualCrnForkPosType type : DualCrnForkPosType.values()) {
|
if (type.id.equals(id)) {
|
return type;
|
}
|
}
|
return null;
|
}
|
|
public static DualCrnForkPosType get(DualCrnForkPosType type) {
|
if (null == type) {
|
return null;
|
}
|
for (DualCrnForkPosType crnForkPosType : DualCrnForkPosType.values()) {
|
if (crnForkPosType == type) {
|
return crnForkPosType;
|
}
|
}
|
return null;
|
}
|
}
|