【新增枚举】

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

Loading…
Cancel
Save