联调系统配置接口

yun-zuoyi
Silliter 6 years ago
parent fc15efe67c
commit b2c5494983

@ -2187,4 +2187,104 @@ public class WmsEnumUtil {
return null;
}
}
/**
*
* 1.SYSTEM
* 2.BUSI
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WMS_CONFIG_TYPE{
SYSTEM(10,"系统参数","系统参数"),
BUSI(20, "业务参数", "业务参数");
private int value;
private String name;
private String description;
WMS_CONFIG_TYPE(int value, String name, String description) {
this.value = value;
this.name = name;
this.description = description;
}
public int getValue() {
return value;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].name;
}
}
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;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].name.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WMS_CONFIG_VALUE_TYPE {
CHECKLIST(10, "可选列表"),
NUMBER(20, "数字"),
STRING(30, "字符串");
private int value;
private String description;
WMS_CONFIG_VALUE_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;
}
}
}

Loading…
Cancel
Save