库位校验枚举添加

yun-zuoyi
刘敏 6 years ago
parent f75630b64d
commit 6e2cf70951

@ -2962,4 +2962,63 @@ public class WmsEnumUtil {
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SRC_DEST_LOCATE {
SRC(10, "SRC", "源库位"),
DEST(20, "DEST", "目标库位");
private int value;
private String code;
private String description;
SRC_DEST_LOCATE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public static SRC_DEST_LOCATE codeOf(int value) {
for (int i = 0; i < values().length; i++) {
if (values()[i].value==(value)) {
return values()[i];
}
}
return null;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
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 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;
}
}
}
Loading…
Cancel
Save