枚举统一

yun-zuoyi
gragon.xu 6 years ago
parent 2987e34dc7
commit 8b3b37260e

@ -302,7 +302,7 @@ public class CommonEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum USER_STATUS {
// NORMAL(1, "fa fa-success cell-fa fa-check", "正常"),
// CREATE(1, "fa fa-success cell-fa fa-check", "正常"),
// FREEZE(2, "冻结", "冻结_FREEZE"),
// ABERRANT(3, "异常", "异常_ABERRANT"),
// RESIGNATION(4, "离职", "离职_RESIGNATION"),

@ -11,54 +11,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
**/
public class WmsEnumUtil {
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SPLIT_OR_MERGE_RULE {
WH(10, "WH", "仓库"), ZONE(20, "ZONE", "存储区"), PART(30, "PART", "物料");
private int value;
private String code;
private String description;
SPLIT_OR_MERGE_RULE(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;
}
}
/**
*
@ -127,57 +79,7 @@ public class WmsEnumUtil {
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ORDER_DETAILS_STATUS {
NORMAL(10, "N", "正常"),
RECEIPTED(20, "R", "已完成"),
ANCEL(30, "C", "行取消");
private int value;
private String code;
private String description;
ORDER_DETAILS_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;
}
}
/**
*
@ -232,14 +134,15 @@ public class WmsEnumUtil {
}
}
/**
*
* (ASN,PO,MOVE,QC)
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MASTER_ORDER_STATUS {
CREATE(10, "新建"),
RECEIPT(20, "处理中"),
RECEIPT_FINISH(30, "完成"),
RECEIPT(20, "收货中"),
RECEIPT_FINISH(30, "收货完成"),
CLOSED(40, "已关闭"),
CANCELLED(50, "已取消");
@ -281,21 +184,22 @@ public class WmsEnumUtil {
}
/**
*
* PO
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum RC_ORDER_STATUS {
CREATE(10, "新建"),
RECEIPT(20, "收货中"),
RECEIPT_FINISH(30, "收货完成"),
CLOSED(40, "已关闭"),
CANCELLED(50, "已取消");
public enum ORDER_DETAILS_STATUS {
CREATE(10, "N", "创建"),
RECEIPTED(20, "R", "已完成"),
CANCEL(30, "C", "行取消"),
PRINTED(40, "C", "已打印");
private int value;
private String code;
private String description;
RC_ORDER_STATUS(int value, String description) {
ORDER_DETAILS_STATUS(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
@ -307,50 +211,8 @@ public class WmsEnumUtil {
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;
}
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;
}
}
/**
* PO
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SN_DETAILS_STATUS {
CREATE(10, "新建"),
WAREHOUSING(30, "已打印"),
RECEIPT_FINISH(20, "已收货");
private int value;
private String description;
SN_DETAILS_STATUS(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
public String getCode() {
return code;
}
public static String valueOf(int val) {
@ -374,9 +236,8 @@ public class WmsEnumUtil {
}
}
/**
*
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PRODUCT_INSTOCK_STATUS {
@ -501,7 +362,7 @@ public class WmsEnumUtil {
}
/**
*
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum OUT_MOVEMENT_MOVE_TYPE {
@ -666,54 +527,10 @@ public class WmsEnumUtil {
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum OUT_MOVEMENT_MASTER_ORDER_TYPE {
ORDER_PULL_PART(1, "工单配料");
private int value;
private String description;
OUT_MOVEMENT_MASTER_ORDER_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;
}
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 OUT_MOVEMENT_MASTER_LINK_ORDER_TYPE {
public enum LINK_ORDER_TYPE {
ASN(10, "ASN", "ASN"),
PO(20, "PO", "PO"),
SO(30, "SO", "SO"),
@ -726,7 +543,7 @@ public class WmsEnumUtil {
private String code;
private String description;
OUT_MOVEMENT_MASTER_LINK_ORDER_TYPE(int value, String code, String description) {
LINK_ORDER_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
@ -764,7 +581,7 @@ public class WmsEnumUtil {
return tmp;
}
public static OUT_MOVEMENT_MASTER_LINK_ORDER_TYPE codeOf(String code) {
public static LINK_ORDER_TYPE codeOf(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
@ -843,45 +660,6 @@ public class WmsEnumUtil {
}
}
/**
* ASN 10=,20=,30=40=,50=
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ASN_STATUS {
CREATE(10, "新建"),
RECEIPT(20, "收货中"),
RECEIPT_FINISH(30, "收货完成"),
CLOSED(40, "已关闭"),
CANCELLED(50, "已取消");
private int value;
private String description;
ASN_STATUS(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;
}
}
/**
*
@ -889,14 +667,14 @@ public class WmsEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum STOCK_SN_STATUS {
CREATE(1, "创建"),
QUALITY_CONTROL(10, "质检中"),
PRE_INSTOCK(20, "待入库"),
INSTOCKED(30, "入库"),
PICKED(40, "配料"),
OUT_STOCK(50, "出库"),
FRAZE(60, "报废"),
COMMING(70, "在途");
CREATE(10,"创建"),
QUALITY_CONTROL(20, "质检中"),
PRE_INSTOCK(30, "待入库"),
INSTOCKED(40, "入库"),
PICKED(50, "配料"),
OUT_STOCK(60, "出库"),
FRAZE(70, "报废"),
COMMING(80, "在途");
private int value;
private String description;
@ -940,7 +718,7 @@ public class WmsEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum STOCK_SN_QC_STATUS {
NORMAL(10, "NORMAL", "合格"), ABNORMAL(20, "ABNORMAL", "不合格"), ISOLATED(30, "ISOLATED", "隔离");
NORMAL(10, "CREATE", "合格"), ABNORMAL(20, "ABNORMAL", "不合格"), ISOLATED(30, "ISOLATED", "隔离");
private int value;
private String code;
@ -983,6 +761,7 @@ public class WmsEnumUtil {
}
return tmp;
}
public static STOCK_SN_QC_STATUS codeOf(Integer value) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
@ -1113,7 +892,7 @@ public class WmsEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CS_ITEM_STATUS {
CREATE(1, "创建"), FINISH(10, "已处理");
CREATE(10, "创建"), FINISH(20, "已处理");
private int value;
private String description;
@ -1256,12 +1035,12 @@ public class WmsEnumUtil {
}
/**
*
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QC_ITEM_STATUS {
NORMAL(1, "正常"),
CANCELLATION(10, "行取消");
NORMAL(10, "创建"),
CANCELLATION(20, "行取消");
private int value;
private String description;
@ -1543,42 +1322,6 @@ public class WmsEnumUtil {
}
}
/**
* PO
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PO_SN_STATUS {
FOUND(10, "创建"),
PRINTED(20, "已打印"),
RECEIPTED(30, "已收货");
private int value;
private String description;
PO_SN_STATUS(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;
}
}
/**
*
@ -1961,17 +1704,17 @@ public class WmsEnumUtil {
private String description;
private String code;
DATA_STATUS(int value, String code, String description){
DATA_STATUS(int value, String code, String description) {
this.value = value;
this.description = description;
this.code = code;
}
public int getValue () {
public int getValue() {
return value;
}
public String getDescription () {
public String getDescription() {
return description;
}
@ -1979,7 +1722,7 @@ public class WmsEnumUtil {
return code;
}
public static String valueOf (int val){
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
@ -2003,17 +1746,17 @@ public class WmsEnumUtil {
private String code;
private String description;
PRINT_TEMPLATE(int value, String code, String description){
PRINT_TEMPLATE(int value, String code, String description) {
this.value = value;
this.description = description;
this.code = code;
}
public int getValue () {
public int getValue() {
return value;
}
public String getDescription () {
public String getDescription() {
return description;
}
@ -2021,7 +1764,7 @@ public class WmsEnumUtil {
return code;
}
public static String valueOf (int val){
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
@ -2043,17 +1786,17 @@ public class WmsEnumUtil {
private String code;
private String description;
VERSION(int value, String code, String description){
VERSION(int value, String code, String description) {
this.value = value;
this.description = description;
this.code = code;
}
public int getValue () {
public int getValue() {
return value;
}
public String getDescription () {
public String getDescription() {
return description;
}
@ -2061,7 +1804,7 @@ public class WmsEnumUtil {
return code;
}
public static String valueOf (int val){
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
@ -2077,16 +1820,16 @@ public class WmsEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PACKAGE_TYPE {
BOX(10 , "BOX", "BOX"),
CARTON(20 , "CARTON", "CARTON"),
PALLET(30 , "PALLET", "PALLET栈板"),
CONTAINER(40 , "PALLET", "PALLET集装箱");
BOX(10, "BOX", "BOX"),
CARTON(20, "CARTON", "CARTON"),
PALLET(30, "PALLET", "PALLET栈板"),
CONTAINER(40, "PALLET", "PALLET集装箱");
private String code;
private String description;
int value;
PACKAGE_TYPE(int value , String code, String description) {
PACKAGE_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;

@ -38,7 +38,7 @@ public class WmsASNMaster extends BaseBean {
@ApiParam("单据类型")
public String asnType;
@Column(name = "ASN_STATUS")
@Column(name = "MASTER_ORDER_STATUS")
@ApiParam(value = "状态", example = "0")
public Integer asnStatus;

@ -161,8 +161,8 @@ public class WmsHqlPack {
StringBuffer result = new StringBuffer();
//查询参数封装
HqlPack.getInPack(String.join(",", WmsEnumUtil.RC_ORDER_STATUS.CREATE.getValue() + "",
WmsEnumUtil.RC_ORDER_STATUS.RECEIPT.getValue() + ""),"poStatus",result);
HqlPack.getInPack(String.join(",", WmsEnumUtil.MASTER_ORDER_STATUS.CREATE.getValue() + "",
WmsEnumUtil.MASTER_ORDER_STATUS.RECEIPT.getValue() + ""),"poStatus",result);
HqlPack.getNumEqualPack(wmsPOMaster.getIsPart(),"isPart", result);
HqlPack.getStringEqualPack(wmsPOMaster.getOrderNo(), "orderNo", result);
HqlPack.getStringEqualPack(wmsPOMaster.getPoType(), "poType", result);

Loading…
Cancel
Save