新建枚举

yun-zuoyi
柯裕 7 years ago
parent bd282d875f
commit 4ebe75e66c

@ -346,4 +346,38 @@ public class WmsEnumUtil {
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PRODUCT_INSTOCK_STATUS {
CREATE(10, "创建"), FINISH(20, "已处理"),FAIL(30,"处理出错");
private int value;
private String description;
PRODUCT_INSTOCK_STATUS(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;
}
}
}

Loading…
Cancel
Save