diff --git a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtEnumUtil.java b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtEnumUtil.java index 4933aa0..f124ce6 100644 --- a/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtEnumUtil.java +++ b/modules/i3plus-ext-mes-pcn-pojo/src/main/java/cn/estsh/i3plus/ext/mes/pcn/pojo/util/MesPcnExtEnumUtil.java @@ -3395,4 +3395,112 @@ public class MesPcnExtEnumUtil { return tmp; } } + + /** + * 管理码与工单条码关系状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MC_RECORD_SN_STATUS { + CREATE(10, "上线"), + OFFLINE(20, "下线"); + + private int value; + private String description; + + MC_RECORD_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; + } + + 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 MC_RECORD_SN_STATUS getByValue(int value) { + for (MC_RECORD_SN_STATUS produceSnStatus : values()) { + if (produceSnStatus.getValue() == value) { + return produceSnStatus; + } + } + return null; + } + } + + /** + * 管理码与工单条码关系质量状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MC_RECORD_SN_QC_STATUS { + TRUE(10, "合格"), + FALSE(20, "不合格"); + + private int value; + private String description; + + MC_RECORD_SN_QC_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; + } + + 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 MC_RECORD_SN_QC_STATUS getByValue(int value) { + for (MC_RECORD_SN_QC_STATUS produceSnStatus : values()) { + if (produceSnStatus.getValue() == value) { + return produceSnStatus; + } + } + return null; + } + } }