From 3f88a390e4a7a53d8ab990231374a98647bda481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=80=9D=E6=B4=81?= Date: Mon, 22 Jun 2020 17:49:54 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=908983=20=E9=9C=80=E6=B1=82=E8=B0=83?= =?UTF-8?q?=E6=95=B4-=E6=B3=B0=E5=9B=BDMES=EF=BC=8C=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E4=B8=8B=E8=BE=BE=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/MesEnumUtil.java | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) 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 657a47e..c91e8b0 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 @@ -1144,6 +1144,16 @@ public class MesEnumUtil { return tmp; } + 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 Integer descriptionOfValue(String description) { Integer tmp = null; for (int i = 0; i < values().length; i++) { @@ -6372,4 +6382,39 @@ public class MesEnumUtil { return tmp; } } + + /** + * 条码生成模式 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum GENERATE_TYPE { + RELEASE_GENERATION(10, "下达生成"), + STATION_GENERATION(20, "工位生成"); + + private Integer value; + private String description; + + GENERATE_TYPE(Integer value, String description) { + this.value = value; + this.description = description; + } + + public Integer getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(Integer value) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value.equals(value)) { + tmp = values()[i].description; + } + } + return tmp; + } + } }