|
|
@ -1,5 +1,7 @@
|
|
|
|
package cn.estsh.i3plus.pojo.base.enumutil;
|
|
|
|
package cn.estsh.i3plus.pojo.base.enumutil;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @author Wynne.Lu
|
|
|
|
* @author Wynne.Lu
|
|
|
|
* @date 2020/2/12 17:41
|
|
|
|
* @date 2020/2/12 17:41
|
|
|
@ -7,4 +9,335 @@ package cn.estsh.i3plus.pojo.base.enumutil;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
public class PtlEnumUtil {
|
|
|
|
public class PtlEnumUtil {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 标签类型
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
|
|
|
public enum PTL_TAG_TYPE {
|
|
|
|
|
|
|
|
LOCATION_TAG(10, "库位标签"),
|
|
|
|
|
|
|
|
COMPLATE_TAG(20, "完成器标签"),
|
|
|
|
|
|
|
|
TAG_MONITOR(30, "标签显示器"),
|
|
|
|
|
|
|
|
TAG_SCAN_INTERFACE(40, "标签扫描接口");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
|
|
|
return value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
|
|
|
return description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private PTL_TAG_TYPE(int value, String description) {
|
|
|
|
|
|
|
|
this.value = value;
|
|
|
|
|
|
|
|
this.description = description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String valueOf(int val) {
|
|
|
|
|
|
|
|
String tmp = null;
|
|
|
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
|
|
|
if (values()[i].value == val) {
|
|
|
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return tmp;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 亮灯状态
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
|
|
|
public enum PTL_LIGHT_STATUS {
|
|
|
|
|
|
|
|
LIGHT_OFF(10, "灭灯"),
|
|
|
|
|
|
|
|
COMPLATE_ON(20, "亮点");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
|
|
|
return value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
|
|
|
return description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private PTL_LIGHT_STATUS(int value, String description) {
|
|
|
|
|
|
|
|
this.value = value;
|
|
|
|
|
|
|
|
this.description = description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String valueOf(int val) {
|
|
|
|
|
|
|
|
String tmp = null;
|
|
|
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
|
|
|
if (values()[i].value == val) {
|
|
|
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return tmp;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 标签状态
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
|
|
|
public enum PTL_TAG_STATUS {
|
|
|
|
|
|
|
|
NORMAL(10, "正常"),
|
|
|
|
|
|
|
|
UNAVAILABLE(20, "不可用");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
|
|
|
return value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
|
|
|
return description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private PTL_TAG_STATUS(int value, String description) {
|
|
|
|
|
|
|
|
this.value = value;
|
|
|
|
|
|
|
|
this.description = description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String valueOf(int val) {
|
|
|
|
|
|
|
|
String tmp = null;
|
|
|
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
|
|
|
if (values()[i].value == val) {
|
|
|
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return tmp;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 亮灯方式
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
|
|
|
public enum PTL_LIGHT_MODE {
|
|
|
|
|
|
|
|
LIGHT(10, "常亮"),
|
|
|
|
|
|
|
|
TWINKLE(20, "闪烁");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
|
|
|
return value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
|
|
|
return description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private PTL_LIGHT_MODE(int value, String description) {
|
|
|
|
|
|
|
|
this.value = value;
|
|
|
|
|
|
|
|
this.description = description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String valueOf(int val) {
|
|
|
|
|
|
|
|
String tmp = null;
|
|
|
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
|
|
|
if (values()[i].value == val) {
|
|
|
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return tmp;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 亮灯颜色
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
|
|
|
public enum PTL_LIGHT_COLOR {
|
|
|
|
|
|
|
|
WHITE(10, "白色"),
|
|
|
|
|
|
|
|
RED(20, "红色"),
|
|
|
|
|
|
|
|
GREEN(30, "绿色"),
|
|
|
|
|
|
|
|
BLUE(40, "蓝色"),
|
|
|
|
|
|
|
|
YELLOW(50, "黄色");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
|
|
|
return value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
|
|
|
return description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private PTL_LIGHT_COLOR(int value, String description) {
|
|
|
|
|
|
|
|
this.value = value;
|
|
|
|
|
|
|
|
this.description = description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String valueOf(int val) {
|
|
|
|
|
|
|
|
String tmp = null;
|
|
|
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
|
|
|
if (values()[i].value == val) {
|
|
|
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return tmp;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 是否蜂鸣
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
|
|
|
public enum PTL_IS_BUZZING {
|
|
|
|
|
|
|
|
YES(1, "是"),
|
|
|
|
|
|
|
|
NO(2, "否");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
|
|
|
return value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
|
|
|
return description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private PTL_IS_BUZZING(int value, String description) {
|
|
|
|
|
|
|
|
this.value = value;
|
|
|
|
|
|
|
|
this.description = description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String valueOf(int val) {
|
|
|
|
|
|
|
|
String tmp = null;
|
|
|
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
|
|
|
if (values()[i].value == val) {
|
|
|
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return tmp;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 控制器类型
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
|
|
|
public enum PTL_CONTROL_TYPE {
|
|
|
|
|
|
|
|
ATOP(10, "上尚"),
|
|
|
|
|
|
|
|
AIOI(20, "爱欧");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
|
|
|
return value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
|
|
|
return description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private PTL_CONTROL_TYPE(int value, String description) {
|
|
|
|
|
|
|
|
this.value = value;
|
|
|
|
|
|
|
|
this.description = description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String valueOf(int val) {
|
|
|
|
|
|
|
|
String tmp = null;
|
|
|
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
|
|
|
if (values()[i].value == val) {
|
|
|
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return tmp;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 控制器状态
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
|
|
|
public enum PTL_CONTROL_STATUS {
|
|
|
|
|
|
|
|
CONNECT(10, "连接"),
|
|
|
|
|
|
|
|
BREAK(20, "断开");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
|
|
|
return value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
|
|
|
return description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private PTL_CONTROL_STATUS(int value, String description) {
|
|
|
|
|
|
|
|
this.value = value;
|
|
|
|
|
|
|
|
this.description = description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String valueOf(int val) {
|
|
|
|
|
|
|
|
String tmp = null;
|
|
|
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
|
|
|
if (values()[i].value == val) {
|
|
|
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return tmp;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 物料类型
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
|
|
|
public enum PTL_PART_TYPE {
|
|
|
|
|
|
|
|
RAW_MATERIAL("10", "原材料"),
|
|
|
|
|
|
|
|
PARTIALLY_PREPARED_PRODUCTS("20", "半成品"),
|
|
|
|
|
|
|
|
FINISHED_PRODUCT("30", "成品");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String value;
|
|
|
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PTL_PART_TYPE(String value, String description) {
|
|
|
|
|
|
|
|
this.value = value;
|
|
|
|
|
|
|
|
this.description = description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getValue() {
|
|
|
|
|
|
|
|
return value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
|
|
|
return description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String valueOfDescription(String val) {
|
|
|
|
|
|
|
|
String tmp = null;
|
|
|
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
|
|
|
if (values()[i].value.equals(val)) {
|
|
|
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return tmp;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String descriptionOfValue(String val) {
|
|
|
|
|
|
|
|
String tmp = null;
|
|
|
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
|
|
|
if (values()[i].description.equals(val)) {
|
|
|
|
|
|
|
|
tmp = values()[i].value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return tmp;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|