package cn.estsh.i3plus.pojo.base.enumutil;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @Description :
 * @Reference :
 * @Author : alwaysfrin
 * @CreateDate : 2018-10-23 15:53
 * @Modify:
 **/
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)
    public enum MES_EQU_TASK_STANDARD_TASK_TYPE {

        CHECK(10, "点检"),
        MAINTAIN(20, "保养"),
        REPAIR(30, "维修");

        private int value;
        private String description;

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

        public static Integer descriptionOfValue(String description) {
            Integer tmp = null;
            for (int i = 0; i < values().length; i++) {
                if (values()[i].description.equals(description)) {
                    tmp = values()[i].value;
                }
            }
            return tmp;
        }
    }

    /**
     * mes过程质量检测类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_QC_CHECK_TYPE {

        FIRST_CHECK(10, "首检"),
        ON_SITE_CHECK(20, "巡检"),
        END_CHECK(30, "尾检");

        private int value;
        private String description;

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

        public static Integer descriptionOfValue(String description) {
            Integer tmp = null;
            for (int i = 0; i < values().length; i++) {
                if (values()[i].description.equals(description)) {
                    tmp = values()[i].value;
                }
            }
            return tmp;
        }
    }

    /**
     * mes设备类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_EQUIPMENT_TYPE {

        PHYSICAL(10, "物理设备"),
        LOGIC(20, "逻辑设备");

        private int value;
        private String description;

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

        public static Integer descriptionOfValue(String description) {
            Integer tmp = null;
            for (int i = 0; i < values().length; i++) {
                if (values()[i].description.equals(description)) {
                    tmp = values()[i].value;
                }
            }
            return tmp;
        }
    }

    /**
     * mes设备连接类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_EQUIPMENT_CONNECT_TYPE {

        PLC(10, "PLC"),
        DB(20, "DB"),
        OTHER(30, "其他");

        private int value;
        private String description;

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

        public static Integer descriptionOfValue(String description) {
            Integer tmp = null;
            for (int i = 0; i < values().length; i++) {
                if (values()[i].description.equals(description)) {
                    tmp = values()[i].value;
                }
            }
            return tmp;
        }
    }

    /**
     * mes设备状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_EQUIPMENT_STATUS {

        INUSE(10, "在用"),
        SPARE(20, "备用"),
        FAULT(30, "故障"),
        SERVICE(40, "检修"),
        STOPUSING(50, "停用");

        private int value;
        private String description;

        MES_EQUIPMENT_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 Integer descriptionOfValue(String description) {
            Integer tmp = null;
            for (int i = 0; i < values().length; i++) {
                if (values()[i].description.equals(description)) {
                    tmp = values()[i].value;
                }
            }
            return tmp;
        }
    }

    /**
     * mes设备类别
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_EQUIPMENT_CATEGORY {

        A("A", "A"),
        B("B", "B"),
        C("C", "C"),
        D("D", "D");

        private String value;
        private String description;

        MES_EQUIPMENT_CATEGORY(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 (values()[i].value.equals(val)) {
                    tmp = values()[i].description;
                }
            }
            return tmp;
        }

        public static String descriptionOfValue(String description) {
            String tmp = null;
            for (int i = 0; i < values().length; i++) {
                if (values()[i].description.equals(description)) {
                    tmp = values()[i].value;
                }
            }
            return tmp;
        }
    }

    /**
     * mes按钮状态配置 判断符号
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_BUTTON_STATUS_JUDGE_FLAG {

        EQUAL("=", "等于"),
        NOT_EQUAL("!=", "不等于"),
        GREATER_THAN(">", "大于"),
        NOT_LESS_THAN(">=", "大于大于"),
        LESS_THAN("<", "小于"),
        NOT_GREATER_THAN("<=", "小于等于");

        private String value;
        private String description;

        MES_BUTTON_STATUS_JUDGE_FLAG(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 (values()[i].value.equals(val)) {
                    tmp = values()[i].description;
                }
            }
            return tmp;
        }
    }

    /**
     * mes按钮状态配置 逻辑符号
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_BUTTON_STATUS_LOGIC_FLAG {

        AND("&&", "逻辑与"),
        OR("||", "逻辑或");

        private String value;
        private String description;

        MES_BUTTON_STATUS_LOGIC_FLAG(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 (values()[i].value.equals(val)) {
                    tmp = values()[i].description;
                }
            }
            return tmp;
        }
    }

    /**
     * MesWorkOrder实体对应的approvalStatus值  审批状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_ORDER_APPROVAL_STATUS {

        WAIT_APPROVAL(10, "待审批"),
        COMPLETE_APPROVAL(20, "已审批"),
        REJECT_APPROVAL(30, "驳回");

        private int value;
        private String description;

        WORK_ORDER_APPROVAL_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 valueOfDescription2(int val) {
            String tmp = null;
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == val) {
                    tmp = values()[i].description.equals("已审批") ? "审批" : values()[i].description;
                }
            }
            return tmp;
        }
    }

    /**
     * mes-pcn定时任务状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_PCN_TASK_STATUS {

        OPEN(1, "开启"),
        CLOSE(2, "关闭");

        private int value;
        private String description;

        MES_PCN_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_STEP_TYPE {

        COMMON_STEP("10", "公用工步"),
        JIT_STEP("20", "JIT工步"),
        WORK_ORDER_STEP("30", "工单工步"),
        BACK_STEP("40", "后台工步");

        private String value;
        private String description;

        MES_STEP_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 (values()[i].value.equals(val)) {
                    tmp = values()[i].description;
                }
            }
            return tmp;
        }
    }

    /**
     * mes工作单元参数类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_WORK_CELL_PARAM_TYPE {

        NUMBER(10, "数值"),
        STRING(20, "字符串");

        private int value;
        private String description;

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

    /**
     * mes工作单元参数模式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_WORK_CELL_PARAM_MODEL {

        PUBLIC(10, "公用"),
        JIT(20, "JIT生产"),
        WORK_ORDER(30, "工单生产"),
        OTHER(99, "其他");

        private int value;
        private String description;

        MES_WORK_CELL_PARAM_MODEL(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 NUMBER_RULE_ISCYCLE {

        TRUE(1, "是"),
        FALSE(2, "否");

        private int value;
        private String description;

        NUMBER_RULE_ISCYCLE(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 BIND_RULE {

        COOPERATION_PART(0, "外协件"),
        SELF_CONTROL_PART(1, "自制件");

        private int value;
        private String description;

        BIND_RULE(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 PASS_FAIL {

        PASS(1, "合格"),
        FAIL(2, "不合格");

        private int value;
        private String description;

        PASS_FAIL(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;
        }
    }

    /**
     * MesMethod实体对应的methodType值
     * 10.
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum METHOD_TYPE {

        EXEC(10, "执行方法"),
        COMPLETE(20, "完成方法");

        private int value;
        private String description;

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

    /**
     * MesPlanOrder实体对应的status值   计划状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PLAN_ORDER_STATUS {

        CREATE(10, "CREATED", "创建"),
        DE_COMPOSE_ING(20, "DE_COMPOSE_ING", "分解中"),
        DE_COMPOSE_ED(30, "DE_COMPOSE_ED", "分解完成"),
        CLOSE(40, "CLOSE", "关闭");

        private int value;
        private String code;
        private String description;

        PLAN_ORDER_STATUS(int value, String code, String description) {
            this.value = value;
            this.code = code;
            this.description = description;
        }

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

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

    /**
     * MesWorkOrder实体对应的workOrderStatus值  工单状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_ORDER_STATUS {

        CREATE(10, "创建"),
        LANDED(20, "下达"),
        OPEN(30, "启动"),
        PAUSE(40, "暂停"),
        CANCEL(50, "取消"),
        CLOSE(60, "关闭"),
        COMPLETE(70, "完成");

        private int value;
        private String description;

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

    /**
     * MesWorkOrder实体对应的workOrderType值  工单类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_ORDER_TYPE {

        STANDARD_ORDER(10, "标准工单"),
        BTS_ORDER(20, "BTS工单"),
        ATTEMPT_ORDER(30, "试制工单");

        private int value;
        private String description;

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

    /**
     * MesPlanOrder实体对应的planType值  计划类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PLAN_ORDER_TYPE {

        STANDARD_ORDER(10, "标准");

        private int value;
        private String description;

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

        public static Integer descriptionOfValue(String description) {
            Integer tmp = null;
            for (int i = 0; i < values().length; i++) {
                if (values()[i].description.equals(description)) {
                    tmp = values()[i].value;
                }
            }
            return tmp;
        }
    }

    /**
     * MesPlanOrder实体对应的source值  计划来源
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PALN_ORDER_SOURCE {

        MES("MES", "来源于MES"),
        SAP("SAP", "来源于SAP");

        private String value;
        private String description;

        PALN_ORDER_SOURCE(String value, String description) {
            this.value = value;
            this.description = description;
        }

        public String 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.equals(val)) {
                    tmp = values()[i].description;
                }
            }
            return tmp;
        }
    }

    /**
     * MesWorkOrder实体对应的source值  计划来源
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_ORDER_SOURCE {

        MES("MES", "来源于MES"),
        AMES("AMES", "来源于AMES"),
        SAP("SAP", "来源于SAP"),
        CREATE("CREATE", "手工新增"),
        RESOLVE("RESOLVE", "计划分解");

        private String value;
        private String description;

        WORK_ORDER_SOURCE(String value, String description) {
            this.value = value;
            this.description = description;
        }

        public String 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.equals(val)) {
                    tmp = values()[i].description;
                }
            }
            return tmp;
        }
    }

    /**
     * MesQueueOrder实体对应的status值  队列主表状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum QUEUE_ORDER_STATUS {

        NORMAL(10, "正常"),
        ONLINE(20, "已上线"),
        OFFLINE(30, "已下线"),
        CLOSE(40, "已关闭"),
        ;

        private int value;
        private String description;

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

    /**
     * MesQueueOrderDetail实体对应的status值  队列详情状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum QUEUE_ORDER_DETAIL_STATUS {

        NORMAL(10, "正常"),
        CLOSE(20, "关闭");

        private int value;
        private String description;

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

    /**
     * MesProduceSn实体对应的snStatus值  条码表条码状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRODUCE_SN_STATUS {

        CREATE(10, "创建"),
        PROCESS(20, "加工"),
        OFFLINE(30, "下线"),
        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;
        }
    }

    /**
     * MesProduceSn实体对应的printStatus值  条码表条码打印状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRODUCE_SN_PRINT_STATUS {

        CREATE(10, "创建"),
        ONLINE(20, "上线打印"),
        OFFLINE(30, "下线打印");

        private int value;
        private String description;

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

    /**
     * MesProduceSn实体对应的qcStatus值  条码表条码质量状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRODUCE_SN_QC_STATUS {

        QUALIFIED(10, "合格"),
        DEFECTED(20, "不合格"),
        SCRAPED(30, "报废");

        private int value;
        private String description;

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

    /**
     * MesPartCategory实体对应的categoryType值  条码表条码质量状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PART_CATEGORY_TYPE {

        CATEGORY_ONE("Category1", "类型1"),
        CATEGORY_TWO("Category2", "类型2"),
        CATEGORY_THREE("Category3", "类型3");

        private String value;
        private String description;

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

    /**
     * 工位程序交互时的业务类型
     */
    @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;
        }
    }

    /**
     * 工位程序交互时的数据类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum STATION_DATA_TYPE {
        TABLE("table", "表格"),
        TEXT("text", "正常文本"),
        EXP_TEXT("exp_text", "异常文本"),
        FILE("file", "定制内容文件"),
        IMAGE("image", "图片"),
        BUTTON("button", "按钮");

        private String value;
        private String description;

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

    /**
     * 组织模型树形菜单level
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PROD_ORG_LEVEL {

        LEVEL_ONE(1, "一级目录"),
        LEVEL_TWO(2, "二级目录"),
        LEVEL_THREE(3, "三级目录"),
        LEVEL_FOUR(4, "四级目录");

        private int value;
        private String description;

        PROD_ORG_LEVEL(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 STEP_PARAM_TYPE {

        QUALIFIED(10, "number", "数字"),
        DEFECTED(20, "text", "字符串"),
        SCRAPED(30, "select", "可选值");

        private int value;
        private String code;
        private String description;

        STEP_PARAM_TYPE(int value, String code, String description) {
            this.value = value;
            this.code = code;
            this.description = description;
        }

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        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 COMMON_SN {
        QUEUE_SN("QUEUE_SN", "队列条码");

        private String code;
        private String description;
        int value;

        COMMON_SN(String code, String description) {
            this.code = code;
            this.description = description;
        }

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 动作类型枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ACTION_TYPE {

        SEATS(10, "座椅"),
        METAL(20, "金属件"),
        FOAMING(30, "发泡");

        private int value;
        private String description;

        ACTION_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 CONFIG_TYPE {

        FASTDFS_SAVE_PATH(10, "SAVE_PATH"),
        NGINX_IP(20, "NGINX_HOST"),
        MES_STATION_SOCKET(30, "mes_station_socket"),
        GATEWAY_IP(40, "GATEWAY_HOST"),
        UPDATE_SYNC_TIME(50, "UPDATE_SYNC_TIME"),
        PCN_PULL(60, "PCN_PULL"),
        PCN_PUSH(70, "PCN_PUSH"),
        FDFS_DOWNLOAD(80, "FDFS_DOWNLOAD");

        private int value;
        private String description;

        CONFIG_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 EVENT_TYPE {

        SEATS(10, "座椅"),
        METAL(20, "金属件"),
        FOAMING(30, "发泡");

        private int value;
        private String description;

        EVENT_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 COMPANY_TYPE {
        RULECODE("ruleCode", "规则编码"),
        PREFIX("prefix", "前缀"),
        PART_NO("partNo", "物料号"),
        CUST_PART_NO("custPartNo", "客户物料号"),
        CUST_CODE("custCode", "客户代码"),
        PROD_LOCATION("prodLocation", "产地"),
        YEAR("year", "年"),
        MOTH("month", "月"),
        DAY("day", "日"),
        HOUR("hour", "小时"),
        MINUTE("minute", "分钟"),
        SECOND("second", "秒"),
        SERIAL("serialNo", "序列号");

        private String value;
        private String description;

        COMPANY_TYPE(String value, String description) {
            this.value = value;
            this.description = description;
        }

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * WC_CHECK_TYPE 开线检查的模块
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WC_CHECK_TYPE {

        PERSON(10, "person", "人员"),
        EQUIPMENT(20, "equipment", "设备"),
        MATERIAL(30, "material", "物料"),
        ROUTE(40, "route", "工艺"),
        ONLINE_SIGNAL(50, "onlineSignal", "开线信号"),
        MAKE_UP_SIGNAL(60, "makeUpSignal", "补偿信号");

        private int value;
        private String code;
        private String description;

        WC_CHECK_TYPE(int value, String code, String description) {
            this.value = value;
            this.code = code;
            this.description = description;
        }

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

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

}
