From e8336c85d757aa428569cd50b77d61c85c348ee3 Mon Sep 17 00:00:00 2001 From: WYnneaoapc Date: Mon, 21 Oct 2019 16:25:37 +0800 Subject: [PATCH] =?UTF-8?q?idea=20=E5=BC=82=E5=B8=B8=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/MesEnumUtil.java | 5 +- .../i3plus/pojo/base/enumutil/MesPcnEnumUtil.java | 204 ++++++++++++++++++++- 2 files changed, 198 insertions(+), 11 deletions(-) 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 2014c70..46ad0c9 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 @@ -1147,7 +1147,8 @@ public class MesEnumUtil { STANDARD_ORDER(10, "标准工单"), BTS_ORDER(20, "BTS工单"), - ATTEMPT_ORDER(30, "试制工单"); + ATTEMPT_ORDER(30, "试制工单"), + BH_ORDER(40, "B&H工单");; private int value; private String description; @@ -1380,6 +1381,7 @@ public class MesEnumUtil { CREATE(10, "创建"), PROCESS(20, "加工"), OFFLINE(30, "下线"), + PACKAGE_SCAN(35, "打包扫描"), INSTOCKED(40, "入库"), SHIPING(50, "发运"), CLOSE(90, "关闭"), @@ -1535,6 +1537,7 @@ public class MesEnumUtil { CUSTOM_COMPONENT("customComponent", "定制内容"), TASK_COMPLETE("taskComplete", "整个扫描完成"), STEP_RAN_STATUS("stepRanStatus", "工步列表执行前"), + RUNNING_INFO("runningInfo", "执行信息"), RENEW_REQUEST_PARAMS("renewRequestParams", "回传刷新StationResultBean"); 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 19ca8a0..34ce4d8 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 @@ -351,20 +351,20 @@ public class MesPcnEnumUtil { @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum WORK_CENTER_RUNNING_STATUS { - RUNNING(1, "start", "开线"), - STOPPED(2, "stop", "停线"); + RUNNING("Y", "start", "开线"), + STOPPED("N", "stop", "停线"); - private int value; + private String value; private String code; private String description; - WORK_CENTER_RUNNING_STATUS(int value, String code, String description) { + WORK_CENTER_RUNNING_STATUS(String value, String code, String description) { this.value = value; this.code = code; this.description = description; } - public int getValue() { + public String getValue() { return value; } @@ -376,20 +376,20 @@ public class MesPcnEnumUtil { return description; } - public static String valueOfDescription(int val) { + public static String valueOfDescription(String val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (values()[i].value == val) { + if (values()[i].value.equals(val)) { tmp = values()[i].description; } } return tmp; } - public static String valueOfCode(int val) { + public static String valueOfCode(String val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (values()[i].value == val) { + if (values()[i].value.equals(val)) { tmp = values()[i].code; } } @@ -855,7 +855,8 @@ public class MesPcnEnumUtil { STANDARD_ORDER(10, "标准工单"), BTS_ORDER(20, "BTS工单"), - ATTEMPT_ORDER(30, "试制工单"); + ATTEMPT_ORDER(30, "试制工单"), + BH_ORDER(40, "B&H工单"); private int value; private String description; @@ -1405,4 +1406,187 @@ public class MesPcnEnumUtil { } + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PRODUCE_SN_STATUS { + + CREATE(10, "创建"), + PROCESS(20, "加工"), + OFFLINE(30, "下线"), + PACKAGE_SCAN(35, "打包扫描"), + INSTOCKED(40, "入库"), + SHIPING(50, "发运"), + CLOSE(90, "关闭"), + ; + + private int value; + private String description; + + PRODUCE_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 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; + } + } + + + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PACKAGE_IS_SEALED { + + UNSEALED(1, "未封箱"), + SEALED(2, "已封箱"); + + private int value; + private String description; + + PACKAGE_IS_SEALED(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; + } + } + + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PACKAGE_OP_TYPE { + + PACK(10, "打包"), + UNPACK(20, "拆包"); + + private int value; + private String description; + + PACKAGE_OP_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; + } + } + + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PACKAGE_PRINT_STATUS { + + UNPRINTED(10, "未打印"), + PRINTED(20, "打印"); + + private int value; + private String description; + + PACKAGE_PRINT_STATUS(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; + } + } + + /** + * 工位程序交互时的业务类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum STATION_BUSI_TYPE { + MESSAGE("message", "返回信息"), + STEP_LIST("stepList", "工步列表"), + STEP_CONTENT("stepContent", "工步内容"), + MODULE_CONTENT("moduleContent", "组件内容"), + CUSTOM_COMPONENT("customComponent", "定制内容"), + TASK_COMPLETE("taskComplete", "整个扫描完成"), + STEP_RAN_STATUS("stepRanStatus", "工步列表执行前"), + RUNNING_INFO("runningInfo", "执行信息"), + RENEW_REQUEST_PARAMS("renewRequestParams", "回传刷新StationResultBean"); + + + private String value; + private String description; + + STATION_BUSI_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 (val.equals(values()[i].value)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + }