枚举修改

yun-zuoyi
amy 7 years ago
parent 3c32f511a7
commit 88429e342e

@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
**/ **/
public class WmsEnumUtil { public class WmsEnumUtil {
/** /**
* PO *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum IS_FREE { public enum IS_FREE {
@ -20,7 +20,7 @@ public class WmsEnumUtil {
private int value; private int value;
private String description; private String description;
private IS_FREE(int value, String description) { IS_FREE(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -45,18 +45,19 @@ public class WmsEnumUtil {
} }
/** /**
* PO *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ORDER_DETAILS_STATUS { public enum ORDER_DETAILS_STATUS {
NORMAL(10, "N", "正常"), NORMAL(10, "N", "正常"),
ANCEL(20, "C", "行取消"); ANCEL(20, "C", "行取消"),
RECEIPTED(30, "R", "已收货");
private int value; private int value;
private String code; private String code;
private String description; private String description;
private ORDER_DETAILS_STATUS(int value, String code, String description) { ORDER_DETAILS_STATUS(int value, String code, String description) {
this.value = value; this.value = value;
this.code = code; this.code = code;
this.description = description; this.description = description;
@ -96,10 +97,10 @@ public class WmsEnumUtil {
} }
/** /**
* PO *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PO_ORDER_SRC { public enum ORDER_SRC {
MNU(1, "MNU", "手工"), MNU(1, "MNU", "手工"),
ERP(2, "ERP", "ERP接口"); ERP(2, "ERP", "ERP接口");
@ -107,7 +108,7 @@ public class WmsEnumUtil {
private String code; private String code;
private String description; private String description;
private PO_ORDER_SRC(int value, String code, String description) { ORDER_SRC(int value, String code, String description) {
this.value = value; this.value = value;
this.code = code; this.code = code;
this.description = description; this.description = description;
@ -146,10 +147,10 @@ public class WmsEnumUtil {
} }
} }
/** /**
* PO *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PO_ORDER_TYPE { public enum ORDER_TYPE {
REG(1, "REG", "原物料采购"), REG(1, "REG", "原物料采购"),
SUB(10, "SUB", "委外采购"), SUB(10, "SUB", "委外采购"),
TAR(20, "TAR", "多角贸易采购"), TAR(20, "TAR", "多角贸易采购"),
@ -159,7 +160,7 @@ public class WmsEnumUtil {
private String code; private String code;
private String description; private String description;
private PO_ORDER_TYPE(int value, String code, String description) { ORDER_TYPE(int value, String code, String description) {
this.value = value; this.value = value;
this.code = code; this.code = code;
this.description = description; this.description = description;
@ -199,11 +200,11 @@ public class WmsEnumUtil {
} }
/** /**
* PO *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ORDER_STATUS { public enum ORDER_STATUS {
CREATE(0, "新建"), CREATE(1, "新建"),
RECEIPT(10, "收货中"), RECEIPT(10, "收货中"),
RECEIPT_FINISH(20, "收货完成"), RECEIPT_FINISH(20, "收货完成"),
WAREHOUSING(30, "入库中"), WAREHOUSING(30, "入库中"),
@ -214,7 +215,7 @@ public class WmsEnumUtil {
private int value; private int value;
private String description; private String description;
private ORDER_STATUS(int value, String description) { ORDER_STATUS(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -258,7 +259,7 @@ public class WmsEnumUtil {
private int value; private int value;
private String description; private String description;
private TRANS_STATUS(int value, String description) { TRANS_STATUS(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
@ -297,9 +298,6 @@ public class WmsEnumUtil {
private String name; private String name;
private String description; private String description;
QUEUE_NAME() {
}
QUEUE_NAME(int value, String name, String description) { QUEUE_NAME(int value, String name, String description) {
this.value = value; this.value = value;
this.name = name; this.name = name;
@ -348,124 +346,4 @@ public class WmsEnumUtil {
return tmp; return tmp;
} }
} }
/**
* ASN
*/
public enum ASN_ORDER_TYPE{
REG("REG","原物料采购"),SUB("SUB","委外采购"),TAR("TAR","多角贸易采购"),TAP("TAP","多角代采购");
private String value;
private String description;
ASN_ORDER_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* ASN
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ASN_MASTER_ORDER_STATUS {
NORMAL(1, "N", "正常"),
CANCEL(2, "C", "行取消"),
RECEIPTED(3, "R", "已收货");
private int value;
private String code;
private String description;
private ASN_MASTER_ORDER_STATUS(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 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;
}
}
/**
*
*/
public enum IS_DELETED {
DELETED(1, "已删除"), INDELETED(2, "未删除");
private int value;
private String description;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
IS_DELETED(int value, String description) {
this.value = value;
this.description = 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;
}
}
} }

@ -41,7 +41,7 @@ public class WmsASNMaster extends BaseBean {
public String asnType; public String asnType;
/** /**
* :0=,10=,20=, * :1=,10=,20=,
* 30=,40=,90=,91= * 30=,40=,90=,91=
*/ */
@Column(name="ASN_STATUS") @Column(name="ASN_STATUS")

Loading…
Cancel
Save