Merge remote-tracking branch 'origin/test' into test

yun-zuoyi
qianhs 5 years ago
commit 2139c83bf3

@ -4378,4 +4378,49 @@ public class MesPcnEnumUtil {
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum OPTION_TYPE {
OPTION(10, "选配件"),
BOM_DISASSEMBLY(20, "BOM拆解");
private int value;
private String description;
OPTION_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return 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;
}
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;
}
}
}

Loading…
Cancel
Save