VDA 生产快速入库

yun-zuoyi
曾贞一 6 years ago
parent 4e303413ff
commit fb86682652

@ -3448,4 +3448,115 @@ public class WmsEnumUtil {
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PART_ASSOCIATE_TYPE {
LINE(10, "LINE", "产线"),
CUSTOMER(20, "CUSTOMER", "客户"),
VENDOR(30, "VENDOR", "供应商");
private int value;
private String code;
private String description;
PART_ASSOCIATE_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
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 String valueOfDescription(int val) {
return valueOf(val);
}
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;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SN_OPERATE_TYPE {
REPORT(10, "REPORT", "生产报工"),
BOXING_ERROR_PROOFING(20, "BOXING_ERROR_PROOFING", "装箱防错");
private int value;
private String code;
private String description;
SN_OPERATE_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
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 String valueOfDescription(int val) {
return valueOf(val);
}
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