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 060c91f..0ef45a6 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 @@ -12,6 +12,282 @@ import com.fasterxml.jackson.annotation.JsonFormat; public class MesEnumUtil { /** + * mes设备作业任务明细-执行状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_EQU_TASK_DETAIL_ACTION_STATUS { + + PENDING(10, "待处理"), + COMPLETE(20, "已完成"), + CANCEL(30, "取消"); + + private int value; + private String description; + + MES_EQU_TASK_DETAIL_ACTION_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; + } + + } + + /** + * mes设备作业任务明细-整体结果 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_EQU_TASK_DETAIL_FINAL_RESULT { + + YES(10, "合格"), + NO(20, "不合格"); + + private int value; + private String description; + + MES_EQU_TASK_DETAIL_FINAL_RESULT(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; + } + + } + + /** + * mes设备作业任务明细-维修标识 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_EQU_TASK_DETAIL_REPAIR_FLAG { + + FALSE(10, "否"), + TRUE(20, "是"); + + private int value; + private String description; + + MES_EQU_TASK_DETAIL_REPAIR_FLAG(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; + } + + } + + /** + * mes设备作业状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_EQU_TASK_STATUS { + + CREATE(10, "创建"), + LANDED(20, "下达"), + OPEN(30, "开启"), + CLOSE(40, "关闭"), + CANCEL(50, "取消"); + + private int value; + private String description; + + MES_EQU_TASK_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; + } + + } + + /** + * mes设备作业任务来源 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_EQU_TASK_SOURCE { + + PLAN(10, "周期计划"), + CREATE(20, "手工创建"), + ANDON(30, "ANDON"); + + private int value; + private String description; + + MES_EQU_TASK_SOURCE(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; + } + + } + + /** + * mes设备作业通知标识 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_EQU_TASK_NOTIFY_FLAG { + + FALSE(10, "未通知"), + TRUE(20, "已通知"); + + private int value; + private String description; + + MES_EQU_TASK_NOTIFY_FLAG(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; + } + + } + + /** + * mes导入模块 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_INSERT_EXCEL { + + MES_PLAN_ORDER(10, "生产计划"), + MES_EQUIPMENT(20, "设备台账"), + MES_EQU_TASK_STANDARD(30, "设备作业要求"); + + private int value; + private String description; + + MES_INSERT_EXCEL(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_INSERT_EXCEL getByValue(int value) { + for (MES_INSERT_EXCEL 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; + } + + } + + /** * mes设备作业通知配置-通知类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -417,56 +693,7 @@ public class MesEnumUtil { * mes设备作业要求-作业类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum MES_INSERT_EXCEL { - - MES_PLAN_ORDER(10, "生产计划"), - MES_EQUIPMENT(20, "设备台账"), - MES_EQU_TASK_STANDARD(30, "设备作业要求"); - - private int value; - private String description; - - MES_INSERT_EXCEL(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_INSERT_EXCEL getByValue(int value) { - for (MES_INSERT_EXCEL 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; - } - - } - - /** - * mes设备作业要求-作业类型 - */ - @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum MES_EQU_TASK_STANDARD_TASK_TYPE { + public enum MES_EQU_TASK_TYPE { CHECK(10, "点检"), MAINTAIN(20, "保养"), @@ -475,7 +702,7 @@ public class MesEnumUtil { private int value; private String description; - MES_EQU_TASK_STANDARD_TASK_TYPE(int value, String description) { + MES_EQU_TASK_TYPE(int value, String description) { this.value = value; this.description = description; }