From c1476f83c00b11ecbd39f8bab97e97c5954cb99c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=BF=83=E6=B4=81?= Date: Tue, 12 Nov 2019 15:26:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=85=B3=E9=97=AD=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/WmsEnumUtil.java | 125 ++++++++++----------- 1 file changed, 62 insertions(+), 63 deletions(-) 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 75fc5ec..ed592e6 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 @@ -896,7 +896,8 @@ public class WmsEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum TASK_INFO_STATUS { - CREATE(10, "创建"), FINISH(20, "处理中"), FAIL(30, "已处理"); + CREATE(10, "创建"), FINISH(20, "处理中"), FAIL(30, "已处理") + , CLOSE(40, "已关闭"); private int value; private String description; @@ -929,24 +930,27 @@ public class WmsEnumUtil { } } + + /** - * 单据是否生成任务状态 + * 业务表:库存条码状态 + * 1=创建,10=质检中,20=待入库,30=入库,40=配料,50=出库,60=报废,70=在途 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum IS_GENERAL_TASK { - CREATE(10, "CREATE", "创建"), - INIT(20, "INIT", "初始化"), - IS_GENERAL(30, "IS_GENERAL", "已生成"), - NO_GENERAL(40, "NO_GENERAL", "不生成"), - CANCEL(50, "CANCEL", "撤销"); + public enum STOCK_SN_STATUS { + CREATE(10, "创建"), + QUALITY_CONTROL(20, "质检中"), + PRE_INSTOCK(30, "待入库"), + INSTOCKED(40, "入库"), + PICKED(50, "配料"), + OUT_STOCK(60, "出库"), + COMMING(80, "在途"); private int value; - private String code; private String description; - IS_GENERAL_TASK(int value, String code, String description) { + STOCK_SN_STATUS(int value, String description) { this.value = value; - this.code = code; this.description = description; } @@ -958,10 +962,6 @@ public class WmsEnumUtil { return description; } - public String getCode() { - return code; - } - public static String valueOf(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { @@ -972,6 +972,10 @@ public class WmsEnumUtil { 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++) { @@ -981,32 +985,25 @@ public class WmsEnumUtil { } return tmp; } - - public static String valueOfDescription(int val) { - return valueOf(val); - } } - - /** - * 业务表:库存条码状态 - * 1=创建,10=质检中,20=待入库,30=入库,40=配料,50=出库,60=报废,70=在途 + * 单据是否生成任务状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum STOCK_SN_STATUS { - CREATE(10, "创建"), - QUALITY_CONTROL(20, "质检中"), - PRE_INSTOCK(30, "待入库"), - INSTOCKED(40, "入库"), - PICKED(50, "配料"), - OUT_STOCK(60, "出库"), - COMMING(80, "在途"); + public enum IS_GENERAL_TASK { + CREATE(10, "CREATE", "创建"), + INIT(20, "INIT", "初始化"), + IS_GENERAL(30, "IS_GENERAL", "已生成"), + NO_GENERAL(40, "NO_GENERAL", "不生成"), + CANCEL(50, "CANCEL", "撤销"); private int value; + private String code; private String description; - STOCK_SN_STATUS(int value, String description) { + IS_GENERAL_TASK(int value, String code, String description) { this.value = value; + this.code = code; this.description = description; } @@ -1018,6 +1015,10 @@ public class WmsEnumUtil { return description; } + public String getCode() { + return code; + } + public static String valueOf(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { @@ -1028,10 +1029,6 @@ public class WmsEnumUtil { 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++) { @@ -1041,8 +1038,11 @@ public class WmsEnumUtil { } return tmp; } - } + public static String valueOfDescription(int val) { + return valueOf(val); + } + } /** * 业务表:库存条码质检状态 */ @@ -1354,20 +1354,22 @@ public class WmsEnumUtil { } + /** - * 质检业务类型 + * 质检业务状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum QC_INFO_TYPE { - FEED(10, "进料检验"), - ONLINE(20, "在线检验"), - EMDPRODUCT(30, "成品检验"), - SHIPMENTS(40, "出货检验"); + public enum QC_INFO_STATUS { + CREATE(10, "新建"), + FINISH(20, "处理中"), + FAIL(30, "已完成"), + CLOSE(40, "已关闭"), + CANCEL(50, "已取消"); private int value; private String description; - QC_INFO_TYPE(int value, String description) { + QC_INFO_STATUS(int value, String description) { this.value = value; this.description = description; } @@ -1389,27 +1391,20 @@ public class WmsEnumUtil { } return tmp; } - - public static String valueOfDescription(int val) { - return valueOf(val); - } } /** - * 质检业务状态 + * 质检明细状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum QC_INFO_STATUS { - CREATE(10, "新建"), - FINISH(20, "处理中"), - FAIL(30, "已完成"), - CLOSE(40, "已关闭"), - CANCEL(50, "已取消"); + public enum QC_ITEM_STATUS { + NORMAL(10, "正常"), + CANCELLATION(20, "已处理"); private int value; private String description; - QC_INFO_STATUS(int value, String description) { + QC_ITEM_STATUS(int value, String description) { this.value = value; this.description = description; } @@ -1432,19 +1427,20 @@ public class WmsEnumUtil { return tmp; } } - /** - * 质检明细状态 + * 质检业务类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum QC_ITEM_STATUS { - NORMAL(10, "正常"), - CANCELLATION(20, "已处理"); + public enum QC_INFO_TYPE { + FEED(10, "进料检验"), + ONLINE(20, "在线检验"), + EMDPRODUCT(30, "成品检验"), + SHIPMENTS(40, "出货检验"); private int value; private String description; - QC_ITEM_STATUS(int value, String description) { + QC_INFO_TYPE(int value, String description) { this.value = value; this.description = description; } @@ -1466,8 +1462,11 @@ public class WmsEnumUtil { } return tmp; } - } + public static String valueOfDescription(int val) { + return valueOf(val); + } + } /** * 作业记录参数状态 */ From 75701682d2dc73672f97a3aabe942f8221b828a1 Mon Sep 17 00:00:00 2001 From: "puxiao.liao" Date: Tue, 12 Nov 2019 17:03:36 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E3=80=90EU-=E7=94=9F=E4=BA=A7=E6=8A=A5?= =?UTF-8?q?=E5=B7=A5=E6=92=A4=E9=94=80=E3=80=91=E3=80=90353=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E6=8A=A5=E5=B7=A5=E6=92=A4=E9=94=80-4.1=09=E5=A4=84?= =?UTF-8?q?=E7=90=86=E6=8A=A5=E5=B7=A5=E6=92=A4=E9=94=80=E6=9D=A1=E7=A0=81?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E3=80=91=E3=80=901191=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E6=8A=A5=E5=B7=A5=E6=92=A4=E9=94=80-4.1=09=E5=A4=84=E7=90=86?= =?UTF-8?q?=E6=8A=A5=E5=B7=A5=E6=92=A4=E9=94=80=E6=9D=A1=E7=A0=81=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 bddc752..4284c43 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 @@ -3747,7 +3747,8 @@ public class WmsEnumUtil { @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum SN_OPERATE_TYPE { REPORT(10, "REPORT", "生产报工"), - BOXING_ERROR_PROOFING(20, "BOXING_ERROR_PROOFING", "装箱防错"); + BOXING_ERROR_PROOFING(20, "BOXING_ERROR_PROOFING", "装箱防错"), + REPORT_CANCEL(30, "REPORT_CANCEL", "报工撤销"); private int value; private String code; From 3eeaff50b3c4c590b1f0379d8dfa59934ee7e64c Mon Sep 17 00:00:00 2001 From: jokelone Date: Tue, 12 Nov 2019 17:50:41 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E3=80=90bug=EF=BC=9A5957=E5=B7=A5=E5=8E=82?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/MesEnumUtil.java | 1 - .../i3plus/pojo/base/enumutil/MesPcnEnumUtil.java | 87 ++++++++++++++++++++++ 2 files changed, 87 insertions(+), 1 deletion(-) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java index 9fd5314..60a7aab 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java @@ -26,7 +26,6 @@ public class MesEnumUtil { MES_PCN_SYNC_CFG("MesPcnSyncCfg", "MES_PCN_SYNC_CFG", "同步配置"), MES_BUTTON_STATUS("MesButtonStatus", "MES_BUTTON_STATUS", "按钮状态配置表"), MES_WORK_CELL_PARAM("MesWorkCellParam", "MES_WORK_CELL_PARAM", "工作单元参数"), - MES_STATUS_CFG("MesStatusCfg", "MES_STATUS_CFG", "状态配置"), MES_EVENT("MesEvent", "MES_EVENT", "事件清单"), MES_METHOD("MesMethod", "MES_METHOD", "方法清单"), MES_ACTION("MesAction", "MES_ACTION", "动作"), diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java index 8f58397..527f46b 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java @@ -13,6 +13,93 @@ import org.apache.commons.lang3.StringUtils; public class MesPcnEnumUtil { /** + * 条码类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_PRODUCE_SN_TYPE { + + NORMAL(10, "正常件"), + FIRST_INSPECTION(20, "首检件"); + + private int value; + private String description; + + MES_PRODUCE_SN_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * pcn 操作类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_OPERATE_TYPE { + + WORKSTATION_SCAN(10, "工位扫描"), + QUALITY_JUDGEMENT(20, "质量判定"), + MATERIAL_DISMANTLING(30, "物料拆解"), + REWORK(40, "返修作业"), + WORKSTATION_MONITORING(50, "工位监控"); + + private int value; + private String description; + + MES_OPERATE_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + // 根据value返回枚举类型,主要在switch中使用 + public static MES_OPERATE_TYPE getByValue(int value) { + for (MES_OPERATE_TYPE mesInsertExcel : values()) { + if (mesInsertExcel.getValue() == value) { + return mesInsertExcel; + } + } + return null; + } + + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + } + + /** * MesProductEncodeCfg 匹配类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT)