Mes生产计划枚举类

yun-zuoyi
crish 6 years ago
parent d9a523473d
commit e161894239

@ -161,4 +161,112 @@ public class MesEnumUtil {
return tmp;
}
}
/**
* MesPlanOrderplanType
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PALN_ORDER_TYPE{
ATTEMPT_ORDER(10,"标准");
private int value;
private String description;
PALN_ORDER_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;
}
}
/**
* MesPlanOrdersource
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PALN_ORDER_SOURCE{
MES("MES","来源于MES"),
SAP("SAP","来源于SAP");
private String value;
private String description;
PALN_ORDER_SOURCE(String value, String description) {
this.value = value;
this.description = description;
}
public String 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.equals(val) ) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesPlanOrdersource
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_ORDER_SOURCE{
MES("MES","来源于MES"),
AMES("AMES","来源于AMES"),
SAP("SAP","来源于SAP");
private String value;
private String description;
WORK_ORDER_SOURCE(String value, String description) {
this.value = value;
this.description = description;
}
public String 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.equals(val) ) {
tmp = values()[i].description;
}
}
return tmp;
}
}
}

Loading…
Cancel
Save