【新增枚举】

yun-zuoyi
zcg 5 years ago
parent 8b9d8fd16d
commit b28c092ade

@ -83,6 +83,72 @@ public class MesEnumUtil {
} }
/** /**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CHECK_PROD_SEQ_FLAG {
PRODUCTION_MATERIAS(10, "NO_SORT_CHECK", "无排序校验"),
CUSTOMER_SHPING(20, "QUEUE_BAR_CODE", "按产品队列条码校验排序"),
OUTWARD_SHIPMENT(30, "PRODUCT_MATERIAL_NUMBER", "按产品物料号校验排序"),
ALLOCATION(40, "SAME_MATERIAL_RACK", "按队列同料架单产品校验排序");
private int value;
private String code;
private String description;
CHECK_PROD_SEQ_FLAG(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
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;
}
public static String codeOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
return valueOf(val);
}
}
/**
* JIS * JIS
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -4110,6 +4176,7 @@ public class MesEnumUtil {
public enum QUEUE_JIT_ACTUAL_SPECIAL_FLAG { public enum QUEUE_JIT_ACTUAL_SPECIAL_FLAG {
NORMAL(10, "正常"), NORMAL(10, "正常"),
EMPTYING(20, "放空"); EMPTYING(20, "放空");
private int value; private int value;
private String description; private String description;
@ -4251,7 +4318,6 @@ public class MesEnumUtil {
MM(10, "MM"), MM(10, "MM"),
MS(20, "MS"); MS(20, "MS");
private int value; private int value;
private String description; private String description;
@ -4281,17 +4347,18 @@ public class MesEnumUtil {
/** /**
* * mes
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_CELL_MONITOR_TYPE { public enum QUEUE_ORDER_IS_LOCK {
MONITOR(10, "监听组件"),
SHOW(20, "展示组件"); TRUE(1, "是"),
FALSE(2, "否");
private int value; private int value;
private String description; private String description;
WORK_CELL_MONITOR_TYPE(int value, String description) { QUEUE_ORDER_IS_LOCK(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -4303,20 +4370,31 @@ public class MesEnumUtil {
public String getDescription() { public String getDescription() {
return description; return description;
} }
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
} }
/** /**
* * BOM
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_MODULE_TRIGGER_TYPE { public enum PART_TYPE_THREE_STATION_BOM {
BY_SN(10, "根据条码加载工步"),
BY_PART(20, "根据零件号加载工步"); MM(10, "MM"),
NLX(20, "NLX");
private int value; private int value;
private String description; private String description;
WORK_MODULE_TRIGGER_TYPE(int value, String description) { PART_TYPE_THREE_STATION_BOM(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -4328,17 +4406,31 @@ public class MesEnumUtil {
public String getDescription() { public String getDescription() {
return description; return description;
} }
public static String valueOfDescription(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) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_MODULE_PARAM_TYPE { public enum WORK_CELL_MONITOR_TYPE {
NUMBER(10, "数值"), MONITOR(10, "监听组件"),
STRING(20, "字符串"); SHOW(20, "展示组件");
private int value; private int value;
private String description; private String description;
WORK_MODULE_PARAM_TYPE(int value, String description) { WORK_CELL_MONITOR_TYPE(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -4353,22 +4445,18 @@ public class MesEnumUtil {
} }
/** /**
* *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CHECK_PROD_SEQ_FLAG { public enum WORK_MODULE_TRIGGER_TYPE {
PRODUCTION_MATERIAS(10, "NO_SORT_CHECK", "无排序校验"), BY_SN(10, "根据条码加载工步"),
CUSTOMER_SHPING(20, "QUEUE_BAR_CODE", "按产品队列条码校验排序"), BY_PART(20, "根据零件号加载工步");
OUTWARD_SHIPMENT(30, "PRODUCT_MATERIAL_NUMBER", "按产品物料号校验排序"),
ALLOCATION(40, "SAME_MATERIAL_RACK", "按队列同料架单产品校验排序");
private int value; private int value;
private String code;
private String description; private String description;
CHECK_PROD_SEQ_FLAG(int value, String code, String description) { WORK_MODULE_TRIGGER_TYPE(int value, String description) {
this.value = value; this.value = value;
this.code = code;
this.description = description; this.description = description;
} }
@ -4379,43 +4467,27 @@ public class MesEnumUtil {
public String getDescription() { public String getDescription() {
return description; return description;
} }
public String getCode() {
return code;
} }
public static String valueOf(int val) { @JsonFormat(shape = JsonFormat.Shape.OBJECT)
String tmp = null; public enum WORK_MODULE_PARAM_TYPE {
for (int i = 0; i < values().length; i++) { NUMBER(10, "数值"),
if (values()[i].value == val) { STRING(20, "字符串");
tmp = values()[i].description;
}
}
return tmp;
}
public static String codeOf(int val) { private int value;
String tmp = null; private String description;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static int descOf(String desc) { WORK_MODULE_PARAM_TYPE(int value, String description) {
int tmp = 1; this.value = value;
for (int i = 0; i < values().length; i++) { this.description = description;
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
} }
return tmp;
public int getValue() {
return value;
} }
public static String valueOfDescription(int val) { public String getDescription() {
return valueOf(val); return description;
} }
} }
} }

Loading…
Cancel
Save