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

yun-zuoyi
crish 6 years ago
commit b2efdd2496

@ -694,13 +694,15 @@ public class WmsEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum IS_GENERAL_TASK { public enum IS_GENERAL_TASK {
CREATE(10, "创建"), INIT(20, "初始化"), IS_GENERAL(30, "已生成"), NO_GENERAL(40, "不生成"); CREATE(10, "CREATE", "创建"), INIT(20, "INIT", "初始化"), IS_GENERAL(30, "IS_GENERAL", "已生成"), NO_GENERAL(40, "NO_GENERAL", "不生成");
private int value; private int value;
private String code;
private String description; private String description;
IS_GENERAL_TASK(int value, String description) { IS_GENERAL_TASK(int value, String code, String description) {
this.value = value; this.value = value;
this.code = code;
this.description = description; this.description = description;
} }
@ -712,6 +714,10 @@ public class WmsEnumUtil {
return description; return description;
} }
public String getCode() {
return code;
}
public static String valueOf(int val) { public static String valueOf(int val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
@ -721,6 +727,16 @@ public class WmsEnumUtil {
} }
return tmp; 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;
}
} }
@ -1760,8 +1776,8 @@ public class WmsEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_STATUS { public enum DATA_STATUS {
YES(1, "", "fa fa-success cell-fa fa-check"), YES(1, "TRUE", "fa fa-success cell-fa fa-check"),
NO(2, "", "fa fa-disabled cell-fa fa-times-circle"); NO(2, "FALSE", "fa fa-disabled cell-fa fa-times-circle");
private int value; private int value;
private String description; private String description;

Loading…
Cancel
Save