From 8b3b37260e4ef0b8912a13a3be827f92ae163c52 Mon Sep 17 00:00:00 2001 From: "gragon.xu" Date: Thu, 28 Mar 2019 11:26:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/CommonEnumUtil.java | 2 +- .../i3plus/pojo/base/enumutil/WmsEnumUtil.java | 361 +++------------------ .../estsh/i3plus/pojo/wms/bean/WmsASNMaster.java | 2 +- .../estsh/i3plus/pojo/wms/sqlpack/WmsHqlPack.java | 4 +- 4 files changed, 56 insertions(+), 313 deletions(-) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java index ed2f951..1204615 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java @@ -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"), diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java index 9ac8347..f8504da 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java @@ -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; diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsASNMaster.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsASNMaster.java index c61f2c7..d1aee88 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsASNMaster.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsASNMaster.java @@ -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; diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/sqlpack/WmsHqlPack.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/sqlpack/WmsHqlPack.java index c3996f2..6067af2 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/sqlpack/WmsHqlPack.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/sqlpack/WmsHqlPack.java @@ -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);