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; + } + } }