mes-pcn枚举

yun-zuoyi
jokelone 6 years ago
parent f15574fc9f
commit a79769d229

@ -12,6 +12,53 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil {
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_QC_CHECK_TYPE {
FIRST_CHECK(10, "首检"),
ON_SITE_CHECK(20, "巡检"),
END_CHECK(30, "尾检");
private int value;
private String description;
MES_QC_CHECK_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
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;
}
public static Integer descriptionOfValue(String description) {
Integer tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(description)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)

@ -817,7 +817,8 @@ public class MesPcnEnumUtil {
OPEN(30, "启动"),
PAUSE(40, "暂停"),
CANCEL(50, "取消"),
CLOSE(60, "关闭");
CLOSE(60, "关闭"),
COMPLETE(70, "完成");
private int value;
private String description;
@ -1163,6 +1164,80 @@ public class MesPcnEnumUtil {
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum COMPANY_TYPE {
RULECODE("ruleCode", "规则编码"),
PREFIX("prefix", "前缀"),
PART_NO("partNo", "物料号"),
CUST_PART_NO("custPartNo", "客户物料号"),
CUST_CODE("custCode", "客户代码"),
PROD_LOCATION("prodLocation", "产地"),
YEAR("year", "年"),
MOTH("month", "月"),
DAY("day", "日"),
HOUR("hour", "小时"),
MINUTE("minute", "分钟"),
SECOND("second", "秒"),
SERIAL("serialNo", "序列号");
private String value;
private String description;
COMPANY_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_STEP_TYPE {
AUTO_RUN(10, "自动执行"),
SCAN_RUN(20, "扫描执行");
private Integer value;
private String description;
MES_STEP_TYPE(Integer value, String description) {
this.value = value;
this.description = description;
}
public Integer 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;
}
}
/**
* MesRoute
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)

Loading…
Cancel
Save