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

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.StringUtils;

/**
 * @Description :
 * @Reference :
 * @Author : alwaysfrin
 * @CreateDate : 2018-10-23 15:53
 * @Modify:
 **/
public class MesPcnEnumUtil {

    /**
     * 物料校验项数据查询类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PART_CHECK_DATA_TYPE {
        ALL_DATA(1, "所有数据"),
        LAST_DATA(2, "最后一条数据");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }


        public String getDescription() {
            return description;
        }
    }

    /**
     * 注塑生产操作模式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum IPC_ACTION_TYPE {
        HAND_WORK(10, "10", "手工录入模式"),
        PLC_WORK(20, "20", "PLC监听模式");

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

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

    /**
     * 作业程序组件类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_MODULE_TYPE {
        MONITOR_MODULE(10, "MONITOR_MODULE", "监听组件"),
        REVEAL_MODULE(20, "REVEAL_MODULE", "展示组件"),
        BUTTON_MODULE(30, "BUTTON_MODULE", "按钮组件"),
        TIMING_MODULE(40, "TIMING_MODULE", "定时组件"),
        PCS_BACK_MODULE(50, "PCS_BACK_MODULE", "工序后台组件"),
        PLC_CALLBACK_MODULE(60, "PLC_CALLBACK_MODULE", "PLC回调工位参数"),
        ASSIST_MODULE(70, "ASSIST_MODULE", "辅助组件");

        private int value;
        private String data;
        private String description;

        WORK_MODULE_TYPE(int value, String data, String description) {
            this.value = value;
            this.data = data;
            this.description = description;
        }

        public int getValue() {
            return value;
        }

        public String getData() {
            return data;
        }

        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 MONITOR_TASK_DETAIL_COLLECT_TYPE {
        SELF_ADDITION(10, "自增列"),
        FEED_FIELD(20, "反馈字段");

        private int value;
        private String description;

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

    /**
     * JIS发运模式类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum JIS_PATTERN_TYPE {
        ONE_PROD(10, "单产品发运"),
        MANY_PROD(20, "多产品发运");

        private int value;
        private String description;

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

    /**
     * JIS发运队列状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum JIS_QUEUE_STATUS {

        TRUE(10, "已发运"),
        FALSE(20, "未发运");

        private int value;
        private String description;

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

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

        EXEC(10, "执行方法"),
        COMPLETE(20, "完成方法"),
        HNC_ISSUED(30, "队列自动下达"),
        LABEL_PROPERTIES(40, "标签属性查询方法");

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


    /**
     * mes 工位Bom  是否可重复
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_STATION_BOM_IS_REPEAT {

        REPEATABLE(1, "是"),
        NOT_REPEAT(2, "否");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static MES_STATION_BOM_IS_REPEAT getByValue(int value) {
            for (MES_STATION_BOM_IS_REPEAT 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;
        }

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

    }

    /**
     * 系统配置表枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CONFIG_TYPE {
        FASTDFS_SAVE_PATH(10, "SAVE_PATH", ""),
        NGINX_HOST(20, "NGINX_HOST", ""),
        MES_STATION_SOCKET(30, "mes_station_socket", ""),
        GATEWAY_IP(40, "GATEWAY_HOST", ""),
        UPDATE_SYNC_TIME(50, "SYNC_DATA_URL", "UPDATE_SYNC_TIME"),
        PCN_PULL(60, "SYNC_DATA_URL", "PCN_PULL"),
        PCN_PUSH(70, "SYNC_DATA_URL", "PCN_PUSH"),
        FDFS_DOWNLOAD(80, "SYNC_DATA_URL", "FDFS_DOWNLOAD"),
        REWORK_REPAIR(90, "REWORK_REPAIR", ""),
        OPC_LINK_SERVER_URL(100, "OPC_LINK", "OPC_LINK_SERVER_URL"),
        OPC_LINK_USERNAME(110, "OPC_LINK", "OPC_LINK_USERNAME"),
        OPC_LINK_PASSWORD(120, "OPC_LINK", "OPC_LINK_PASSWORD"),
        OPC_LINK_REALM(130, "OPC_LINK", "OPC_LINK_REALM"),
        OPC_LINK_CALLBACK(140, "OPC_LINK", "OPC_LINK_CALLBACK"),
        SUPPLY_SWITCH(150, "SUPPLY_SWITCH", ""),
        PCN_LOGIN(160, "PCN_LOGIN", ""),
        PCN_MENU(170, "PCN_MENU", ""),
        PCN_MODULE(180, "PCN_MODULE", ""),
        PCN_LOGOUT(190, "PCN_LOGOUT", ""),
        UPDATE_LOCALE_RES(200, "SYNC_DATA_URL", "LOCALE_RES_URL"),
        PCN_SYS_LOCALE_LANGUAGE(210, "PCN_SYS_LOCALE_LANGUAGE", ""),
        PCN_SYS_ALL_LANGUAGE(220, "PCN_SYS_ALL_LANGUAGE", "PCN_SYS_ALL_LANGUAGE"),
        PCN_SYS_RESOURCE_KEY_LANGUAGE(230, "PCN_SYS_RESOURCE_KEY_LANGUAGE", "PCN_SYS_RESOURCE_KEY_LANGUAGE"),
        SYNC_PHOTO_COLLECT_URL(240, "SYNC_PHOTO_COLLECT_URL", "PCN推送图片采集数据至mes");

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

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

    /**
     * pcn 动作类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_ACTION_TYPE {

        BIND(10, "绑定"),
        UNTYING(20, "解绑");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static MES_ACTION_TYPE getByValue(int value) {
            for (MES_ACTION_TYPE 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_TYPE_CFG 类型信息
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_TYPE_CFG {

        DEFECT("DEFECT", "缺陷"),
        POLISHING("POLISHING", "抛光"),
        DISASSEMBLE("DISASSEMBLE", "拆解"),
        DEFECT_CAUSE("DEFECT_CAUSE", "缺陷原因"),
        REPAIR("REPAIR", "处理措施"),
        SCRAP("SCRAP", "报废原因"),
        QC_CHECK_STAND("QC_CHECK_STAND", "质量检测标准"),
        WC_CHECK("WC_CHECK", "开线检查项"),
        BOARD("BOARD", "看板类型"),
        EQU_DEFECT_CAUSE("EQU_DEFECT_CAUSE", "故障原因"),
        EQU_DEFECT_METHOD("EQU_DEFECT_METHOD", "故障处理措施"),
        EQU_DEFECT_PHENOMENON("EQU_DEFECT_PHENOMENON", "故障现象"),
        BH_PACKAGE_TYPE_VALUE("BH_PACKAGE_TYPE_VALUE", "B&H包装条码赋值样品类型值");
        private String value;
        private String description;

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

    /**
     * MesProdBindRecord 是否是关键件
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_IS_BIND_KEY {

        IS_BIND_KEY(1, "是"),
        NO_BIND_KEY(2, "否");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static MES_IS_BIND_KEY getByValue(int value) {
            for (MES_IS_BIND_KEY 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;
        }

    }

    /**
     * 接口同步状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum IF_SYNC_STATUS {

        NO_SYNC(10, "未同步"),
        ALREADY_SYNC(20, "已同步"),
        FAIL_SYNC(30, "同步失败");

        private int value;
        private String description;

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

    /**
     * 条码类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_PRODUCE_SN_TYPE {

        NORMAL(10, "正常件"),
        FIRST_INSPECTION(20, "首检件"),
        HALF_PRODUCT(30, "半成品"),
        KP(40, "关键件");

        private int value;
        private String description;

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

    /**
     * pcn 操作类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_OPERATE_TYPE {

        WORKSTATION_SCAN(10, "工位扫描"),
        QUALITY_JUDGEMENT(20, "质量判定"),
        MATERIAL_DISMANTLING(30, "物料拆解"),
        REWORK(40, "返修作业"),
        WORKSTATION_MONITORING(50, "工位监控");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static MES_OPERATE_TYPE getByValue(int value) {
            for (MES_OPERATE_TYPE 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;
        }

    }

    /**
     * MesProductEncodeCfg 匹配类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_MATCH_TYPE {

        ORGANIZATION(10, "工厂"),
        PART(20, "物料"),
        CUST_CODE(30, "客户代码"),
        CUST_PART_NO(40, "客户物料号"),
        WORK_CENTER(50, "产线");

        private int value;
        private String description;

        MES_MATCH_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 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 MES_MATCH_TYPE getByValue(int value) {
            for (MES_MATCH_TYPE mesMatchType : values()) {
                if (mesMatchType.getValue() == value) {
                    return mesMatchType;
                }
            }
            return null;
        }
    }

    /**
     * MesProductEncodeCfg 编码类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_CODE_TYPE {

        SERIAL_SN(10, "过程条码"),
        PRODUCT_SN(20, "产品条码"),
        PACK_SN(30, "包装条码");

        private int value;
        private String description;

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


    /**
     * MesScrap 报废原因
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SCRAP_TYPE {

        SCRAP_TYPE(10, "过期"),
        SCRAP_TYPE2(20, "不合格"),
        SCRAP_TYPE3(30, "缺失");

        private int value;
        private String description;

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

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

        QUALIFIED(10, "合格"),
        DEFECTED(20, "不合格"),
        SCRAPED(30, "报废"),
        DISMANTLED(40, "已拆解"),
        PRE_CHECK(5, "待检测");

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

    /**
     * mes 工位类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_WORK_CELL_TYPE {

        NORMAL(10, "正常"),
        REWORK(20, "返修"),
        ON_LINE(30, "上线工位");

        private int value;
        private String description;

        MES_WORK_CELL_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_PRODUCE_SN_RESULT {

        OK(10, "OK");

        private int value;
        private String description;

        MES_PRODUCE_SN_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_DEFECT_CAUSE_TYPE {

        QUALITY_DEFECTS(10, "质量缺陷"),
        PROCESS_DEFECTS(20, "工艺缺陷"),
        EQUIPMENT_DEFECT(30, "设备缺陷");

        private int value;
        private String description;

        MES_DEFECT_CAUSE_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_SIDE_LOCATION {

        A_SIDE(10, "A面"),
        B_SIDE(20, "B面"),
        C_SIDE(30, "C面"),
        D_SIDE(40, "D面");

        private int value;
        private String description;

        MES_SIDE_LOCATION(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_REPAIR_STATUS {

        REPAIRED(10, "已维修"),
        NO_REPAIR(20, "待维修"),
        NO_CONFIRM(30, "待确认");

        private int value;
        private String description;

        MES_REPAIR_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_QC_CHECK_TYPE {
        INCOMING_CHECK(5, "来料检验"),
        FIRST_CHECK(10, "首检"),
        ON_SITE_CHECK(20, "巡检"),
        END_CHECK(30, "末检"),
        RC_CHECK(40, "发货检验");

        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-pcn定时任务状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_PCN_TASK_STATUS {

        OPEN(1, "OPEN"),
        CLOSE(2, "CLOSE");

        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-pcn定时任务同步结果状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_PCN_TASK_SYNC_STATUS {

        SUCCESS(1, "mes主服务定时任务工作清单同步成功"),
        ERROR(2, "mes主服务定时任务工作清单同步失败");

        private int value;
        private String description;

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

    /**
     * PCN同步MES主数据同步方式枚举
     * 10.
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SYNC_PATTERN {

        UPDATE(1, "修改或新增"),
        INSERT(2, "新增");

        private int value;
        private String description;

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

    /**
     * PCN同步MES主数据同步类型枚举
     * 10.
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SYNC_TYPE {

        GET_MES_DATA(1, "pcn拉取mes数据"),
        DATA_TO_MES(2, "pcn推送数据至mes");

        private int value;
        private String description;

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

    /**
     * PCN 缓存名称
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PCN_CACHE {

        PCH_EHCACHE(10, "PCN_EHCACHE");

        private int value;
        private String description;

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

    /**
     * RAW_PART_TYPE 原材料类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RAW_PART_TYPE {

        RAW(10, "lotNo", "原材料"),
        SEMIFINISHED(20, "fixLotNo", "半成品");

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

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

    /**
     * RAW_PART_STATUS 原材料状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RAW_PART_STATUS {

        READY(10, "待投料"),
        ALREADY(20, "已投料");

        private int value;
        private String description;

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

    /**
     * PROCESS_BOM_ISFEED 是否投料
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PROCESS_BOM_ISFEED {

        FEED(1, "投料"),
        NOT_FEED(2, "不投料");

        private int value;
        private String description;

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

    /**
     * MesWorkCenter 工作中心运行状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_CENTER_RUNNING_STATUS {

        RUNNING("Y", "start", "开线"),
        STOPPED("N", "stop", "停线");

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

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

        public String getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

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

    /**
     * WC_CHECK_TYPE 开线检查的模块
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WC_CHECK_TYPE {
        MATERIAL(10, "MATERIAL", "物料"),
        ONLINE_SIGNAL(20, "ONLINE_SIGNAL", "开线信号"),
        WORK_ORDER(30, "WORK_ORDER", "工单信息");

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

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

    /**
     * 开线检查
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ONLINE_SIGNAL {

        CHECK(10, "检查"),
        NON_CHECK(20, "不检查");

        private int value;
        private String description;

        ONLINE_SIGNAL(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 IS_WCCHECK_PASS {

        PASS(10, "通过"),
        NON_PASS(20, "不通过");

        private int value;
        private String description;

        IS_WCCHECK_PASS(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 EQP_CONNECT_TYPE {

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

        private int value;
        private String description;

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

    /**
     * 数据库操作类型 开线检查的模块
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DB_OPERATION_TYPE {

        INSERT(10, "insert", "新增"),
        SELECT(20, "select", "查询"),
        UPDATE(30, "update", "更新");

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

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

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

    /**
     * 数据库连接方式
     * wei.peng
     * Copy 代码禁止修改枚举内容,整合枚举会产生兼容性问题 ;
     */
    @Deprecated // 不推荐使用 ， 推荐使用 CommonEnumUtil.DATA_SOURCE_TYPE
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DATA_SOURCE_TYPE {
        SOURCE_MARIA_DB(100, "MariaDB", "MariaDB 10.1", "com.mysql.jdbc.Driver", 3306, null),
        SOURCE_SQL_SERVER(200, "SQL Server", "SQL Server 2017", "com.microsoft.sqlserver.jdbc.SQLServerDriver", 1433, "dbo"),
        SOURCE_ORACLE(300, "Oracle", "Oralce 12C", "oracle.jdbc.driver.OracleDriver", 1521, null),
        SOURCE_POSTGRE_SQL(400, "PostgreSql", "PostgreSql 10.5", "org.postgresql.Driver", 5432, "public");

        private int value;
        private String code;
        private String description;
        private String driverClassName;
        private int defaultPort;
        private String defaultSchemaPattern;

        private DATA_SOURCE_TYPE(int value, String code, String description, String driverClassName, int port, String defaultSchemaPattern) {
            this.value = value;
            this.code = code;
            this.description = description;
            this.driverClassName = driverClassName;
            this.defaultPort = port;
            this.defaultSchemaPattern = defaultSchemaPattern;
        }

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        public String getDriverClassName() {
            return driverClassName;
        }

        public int getDefaultPort() {
            return defaultPort;
        }

        public String getDefaultSchemaPattern() {
            return defaultSchemaPattern;
        }

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

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

        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 DATA_SOURCE_TYPE valueOf(int val) {
            String tmp = null;
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == val) {
                    return values()[i];
                }
            }
            return null;
        }

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

        public String getJDBCUrl(String database, String host, Integer port) {
            if (this.getValue() == SOURCE_MARIA_DB.getValue()) {
                return getJDBCUrlMySQL(database, host, port);
            } else if (this.getValue() == SOURCE_ORACLE.getValue()) {
                return getJDBCUrlOracle(database, host, port);
            } else if (this.getValue() == SOURCE_POSTGRE_SQL.getValue()) {
                return getJDBCUrlPostgreSQL(database, host, port);
            } else if (this.getValue() == SOURCE_SQL_SERVER.getValue()) {
                return getJDBCUrlSQLServer(database, host, port);
            }
            return null;
        }

        public static DATA_SOURCE_TYPE getDataSourceURL(String databaseProductName) {
            if (StringUtils.isNotBlank(databaseProductName)) {
                if (databaseProductName.indexOf(":mysql:") != -1) {
                    return SOURCE_MARIA_DB;
                } else if (databaseProductName.indexOf(":oracle:") != -1) {
                    return SOURCE_ORACLE;
                } else if (databaseProductName.indexOf(":postgresql:") != -1) {
                    return SOURCE_POSTGRE_SQL;
                } else if (databaseProductName.indexOf(":sqlserver:") != -1) {
                    return SOURCE_SQL_SERVER;
                }
            }
            return null;
        }

        private String getJDBCUrlMySQL(String database, String host, Integer port) {
            return "jdbc:mysql://" + host + ":" + port + "/" + database + "?autoReconnect=true&useSSL=false&characterEncoding=utf-8";
        }

        private String getJDBCUrlOracle(String database, String host, Integer port) {
            return "jdbc:oracle:thin:@" + host + ":" + port + ":" + database;
        }

        private String getJDBCUrlPostgreSQL(String database, String host, Integer port) {
            return "jdbc:postgresql://" + host + ":" + port + "/" + database;
        }

        private String getJDBCUrlSQLServer(String database, String host, Integer port) {
            return "jdbc:sqlserver://" + host + ":" + port + ";database=" + database;
        }
    }

    /**
     * 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, "完成"),
        FICTIVE(80, "虚拟工单");

        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, "试制工单"),
        BH_ORDER(40, "B&H工单"),
        JIT_ORDER(50, "JIT工单"),
        STOCK_ORDER(60, "库存工单"),
        REPAIR(70, "返修插单"),
        EMERGENCY_ORDER(80, "紧急插单"),
        FICTIVE(90, "虚拟工单"),
        SPARE_PART_PRODUCTION(100, "备件生产"),
        REPRODUCTION_RMS(110, "重新生产-报工"),
        REPRODUCTION_NOT_RMS(120, "重新生产-不报工"),
        REVERSE_SPRAY_ORDER(130, "反喷工单"),
        SPARE_RETURN_REPAIR(140, "客退备件返修"),
        SEIZE_SEAT_ORDER(150, "占位工单");

        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(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实体对应的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(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;
        }
    }

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

        WAIT_LANDED(5, "待下达"),
        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, "关闭"),
        FINISH(30, "完成"),
        OFF_LINE_REWORK(40, "线下返修");

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

    /**
     * 工站分组队列状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_CELL_POINT_GROUP_STATUS {
        CREATE(10, "创建"),
        COMPLETE(20, "完成");

        private int value;
        private String description;

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

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

    /**
     * 条码生成业务类型
     */
    @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;
        }
    }


    /**
     * mes工步类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_STEP_TYPE {

        AUTO_RUN(10, "自动执行"),
        SCAN_RUN(20, "扫描执行");


        private Integer value;
        private String description;

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

    /**
     * MesRoute 流程的类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ROUTE_TYPE {

        SCAN(10, "扫描流程"),
        MONITOR(20, "监控流程");

        private int value;
        private String description;

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

    /**
     * redis过期时间
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum EXPIRE_TIME {

        NEVER(-1, "不过期"),
        ONE_HOUR(3600, "一小时"),
        FIVE_MINS(300, "5分钟"),
        HALF_HOUR(1800, "半小时"),
        ONE_QUARTER(900, "一刻钟"),
        ONE_MIN(60, "一分钟");

        private int value;
        private String description;

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

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

        TRAY("TRAY:", "托盘缓存key"),

        SERIAL_NO("PCN_SERIAL:", "条码缓存key");

        private String value;
        private String description;

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

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRODUCE_SN_STATUS {
        CREATE(10, "创建"),
        PROCESS(20, "加工"),
        OFFLINE(30, "下线"),
        PACKAGE_SCAN(35, "打包扫描"),
        INSTOCKED(40, "入库"),
        SHIPPING(50, "发运"),
        REDO(60, "重做"),
        FORCE(70, "强过"),
        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;
        }

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


    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PACKAGE_IS_SEALED {

        UNSEALED(1, "未封箱"),
        SEALED(2, "已封箱");

        private int value;
        private String description;

        PACKAGE_IS_SEALED(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 PACKAGE_OP_TYPE {

        PACK(10, "打包"),
        UNPACK(20, "拆包"),
        STOP_OVER(30, "过站");

        private int value;
        private String description;

        PACKAGE_OP_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 WORK_ORDER_PRINT_STATUS {

        UNPRINTED(10, "未打印"),
        PRINTED(20, "已打印");

        private int value;
        private String description;

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

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PACKAGE_PRINT_STATUS {

        UNPRINTED(10, "未打印"),
        PRINTED(20, "已打印");

        private int value;
        private String description;

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

    /**
     * 工位程序交互时的业务类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum STATION_BUSI_TYPE {
        MESSAGE("message", "返回信息"),
        STEP_LIST("stepList", "工步列表"),
        STATE_LIST("stateList", "状态列表"),
        STEP_CONTENT("stepContent", "工步内容"),
        MODULE_CONTENT("moduleContent", "展示组件内容"),
        MODULE_HEAD("moduleHead", "展示组件头"),
        GUIDE_CONTENT("guideContent", "指导内容"),
        ASSISTANT_CONTENT("assistantContent", "辅助展示组件"),
        CUSTOM_COMPONENT("customComponent", "定制内容"),
        TASK_COMPLETE("taskComplete", "整个扫描完成"),
        STEP_RAN_STATUS("stepRanStatus", "工步列表执行前"),
        RUNNING_INFO("runningInfo", "执行信息"),
        STOP_PCS_CTL("stopPcsCtl", "停止监控"),
        RENEW_REQUEST_PARAMS("renewRequestParams", "回传刷新StationResultBean"),
        PROCESS_CONTENT("processContent", "过程组件内容"),
        TIME_MODULE_CONTENT("timeModuleContent", "定时组件内容"),
        TIME_MODULE_INIT("timeModuleInit", "初始化时间展示组件"),
        TIME_MODULE_START("timeModuleStart", "定时组件开始"),
        ADDITIONAL_TIPS("additionalTips", "额外帮助信息显示"),
        ADDITIONAL_TIPS_HIDE("additionalTipsHide", "额外帮助信息隐藏"),
        TIME_MODULE_STOP("timeModuleStop", "定时组件暂停"),
        MESSAGE_POOL("messagePool", "消息池");

        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", "按钮"),
        TABLES("tables", "多个表格"),
        CUSTOM("custom", "定制页面"),
        CUSTOM_DIALOG("custom_dialog", "定制弹窗"),
        FORM("form", "文本按钮"),
        SPEC_TEXT("spec_text", "工步弹框文本"),
        IMAGE_LIST("image_list", "图片列表"),
        MODULE_HEAD("module_head", "展示组件头部"),
        MODULE_GUIDE("module_guide", "展示组件知道内容"),
        SHOW_ASSEMBLE_TABLE("SHOW_ASSEMBLE_TABLE", "展示组件表格"),
        BACKGROUND_COLOR_TEXT("BACKGROUND_COLOR_TEXT", "背景色文字");

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


    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ONLINE_SEND_TYPE {

        PLC("PLC", "PLC"),
        SELF_HANDLE("SELF_HANDLE", "自处理"),
        DB("DB", "DB");

        private String value;
        private String description;

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

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SN_TRAVEL_OPERATE {

        WORKCELL_SCAN(10, "工位扫描"),
        CHECK_QUALITY(20, "质量判定"),
        DISASSEMBLE_MATERIAL(30, "物料拆解"),
        REWORK(40, "返修作业");

        private int value;
        private String description;

        SN_TRAVEL_OPERATE(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_PACKAGE
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PACKAGE_PACKLEVEL {

        FIRST(1, "第一层"),
        SECOND(2, "第二层"),
        THIRD(3, "第三层"),
        FOURTH(4, "第四层");

        private int value;
        private String description;

        PACKAGE_PACKLEVEL(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 PRODUCT_PATTERN_PARAMS {

        MATCH_WORK_ORDER(10, "匹配工单"),
        API_WORK_ORDER(20, "读取接口工单"),
        SN_WORK_ORDER(30, "获取条码对应工单");

        private int value;
        private String description;

        PRODUCT_PATTERN_PARAMS(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 MONITOR_TASK_OBJECT_TYPE {

        PLC(10, "PLC"),
        DB(20, "DB");

        private int value;
        private String description;

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

    /**
     * MesMonitorTask实体对应的status值  监听任务状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MONITOR_TASK_STATUS {

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

        private int value;
        private String description;

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

    /**
     * 是否解析
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PLC_IS_PARSE {
        TRUE(1, "是"),
        FALSE(2, "否");

        private int value;
        private String description;

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

    /**
     * 工位监听组件类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_CELL_MONITOR_TYPE {
        MONITOR(10, "监听组件"),
        SHOW(20, "展示组件"),
        BUTTON(30, "按钮组件"),
        PROCESS_MONITOR(40, "工序监听组件");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 工位监听组件触发类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_MODULE_TRIGGER_TYPE {
        BY_SN(10, "根据条码加载工步"),
        BY_PART(20, "根据零件号加载工步");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_MODULE_PARAM_TYPE {
        NUMBER(10, "数值"),
        STRING(20, "字符串");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 缓存类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CACHA_TYPE {
        DATA_REVIEW(10, "数据复核");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 缓存队列状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CACHA_QUEUE_STATUS {
        CREATE(10, "创建"),
        COMPLETE(20, "完成");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }


    /**
     * 配方类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PART_FORMULA_TYPE {
        DEVICE_SEMAPHORE(10, "设备信号");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 工位BOM表中的匹配类型
     * 10.
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum STATION_BOM_MATCH_RULE {

        BARCODE_RULE_MATCHING(10, "条码规则匹配"),
        PROCESS_BARCODE_MATCHING(20, "过程条码匹配"),
        BAR_CODE_MATCHING(30, "箱条码匹配");

        private int value;
        private String description;

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

    /**
     * 作业模式
     * 10.
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum OPERATION_MODE {
        SINGLE_SCAN(10, "单个扫描"),
        NO_SCAN_DEDUCTION(20, "不扫描后端扣减");

        private int value;
        private String description;

        OPERATION_MODE(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 FINISH_FLAG {

        FALSE(0, "未完成"),
        TRUE(1, "完成");

        private int value;
        private String description;

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

    /**
     * 换膜信号
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum HM_FLAG {

        NOT_FILM_EXCHANGE(0, "不需换模"),
        FILM_EXCHANGE(1, "需换模");

        private int value;
        private String description;

        HM_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 EQUIPMENT_TOOLING_TOOLING_TYPE {

        WORK_CLOTHES(10, "工装"),
        CHECKING_TOOL(20, "检具"),
        MOULD(30, "模具");

        private int value;
        private String description;

        EQUIPMENT_TOOLING_TOOLING_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 ACTION_TYPE {

        REPLACE(10, "更换"),
        WAREHOUSING(20, "入库"),
        RECEIVE(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 TABLE_COLOR {

        GREEN("green", "绿色"),
        RED("red", "红色"),
        YELLOW("yellow", "黄色");

        private String code;
        private String description;

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

        public String getCode() {
            return code;
        }

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

    /**
     * 客户发运JIT生产队列状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SHIPPING_ACTUAL_STATUS {
        CREATE(10, "创建"),
        SHIPPED(20, "已发运");

        private int value;
        private String description;

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

    /**
     * 散件IT生产队列状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SP_SHIPPING_STATUS {
        CREATE(10, "创建"),
        SHIPPED(20, "已发运");

        private int value;
        private String description;

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

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum FSM_EVENT {
        TRIGGER(10, "trigger", "触发"),
        ENTRY(20, "entry", "进入状态"),
        EXIT(30, "exit", "离开状态");

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

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

        public int getValue() {
            return this.value;
        }

        public String getCode() {
            return this.code;
        }

        public String getDescription() {
            return this.description;
        }
    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum FSM_STATE_TYPE {
        BEGIN(10, "begin", "开始状态点"),
        BACK(20, "back", "回退状态点"),
        END(40, "end", "结束状态点");

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

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

        public int getValue() {
            return this.value;
        }

        public String getCode() {
            return this.code;
        }

        public String getDescription() {
            return this.description;
        }
    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TRIGGER_TYPE {
        INNER_TRIGGER(10, "内部触发"),
        OUTER_TRIGGER(20, "外部触发");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum STATION_REQUEST_BEAN_CMD {
        JUMP_STATE(10, "JUMP_STATE", "跳过状态点"),
        FORCE_STATE(20, "FORCE_STATE", "强制执行制定的状态点");

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

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

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum STEP_RESULT_CMD {
        JUMP_STEP(10, "JUMP_STEP", "跳过工步"),
        REDO_PROCESS(20, "REDO_PROCESS", "重做工序"),
        JUMP_PROCESS(30, "JUMP_PROCESS", "跳过工序"),
        NORMAL_COMPLETE(40, "NORMAL_COMPLETE", "正常完成"),
        CLEAR_CACHE(50, "CLEAR_CACHE", "工步已清空缓存，执行完工步之后无需放入StationRequestBean");

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

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


    /**
     * 容器使用状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_CONTAINER_STATUS {
        FREE(10, "空闲"),
        OCCUPY(20, "占用");

        private int value;
        private String description;

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

    /**
     * 换膜状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DIE_CHANGE_STATUS {

        INITIALIZATION(0, "初始化"),
        START(1, "开始换模"),
        COMPLETE(2, "完成换模");

        private int value;
        private String description;

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

    /**
     * 状态机流程加载类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum LOAD_FSM_ROUTE_TYPE {

        BY_PART("0", "通过物料号加载"),
        BY_AUTO("1", "自动加载");

        private String value;
        private String description;

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

    /**
     * 组件状态类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum STATUS_TYPE {
        START(10, "START", "开始状态"),
        EXECUTING(20, "EXECUTING", "执行中状态"),
        TERMINATE(30, "TERMINATE", "中断状态"),
        FINISH(40, "FINISH", "完成状态"),
        BACK(99, "BACK", "回退状态");

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

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

    /**
     * 质检单状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum QC_STATUS {
        CREATE(10, "创建"),
        RECEIPT(20, "执行中"),
        SUBMISSION(30, "提交"),
        COMPLETE(40, "完成");

        private int value;
        private String description;

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

    /**
     * 产线管控-过程检验状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PROCESS_INSPECTION {
        NOT_CREATE(10, "未创建"),
        CREATE(20, "已创建"),
        PROCESS(30, "执行中"),
        COMPLETE(40, "完成");

        private int value;
        private String description;

        PROCESS_INSPECTION(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 CHECK_RESULT {

        PASS(10, "通过"),
        NON_PASS(20, "不通过"),
        CONCESSION_PRODUCTION(30, "让步生产");

        private int value;
        private String description;

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

    /**
     * 生产队列 队列类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum QUEUE_ORDER_QUEUE_TYPE {
        PRODUCT_QUEUE(10, "生产队列"),
        PRELOAD_QUEUE(20, "预装队列"),
        FIRST_CELL_QUEUE(30, "首工位队列");

        private int value;
        private String description;

        QUEUE_ORDER_QUEUE_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 VERIFY_MODE {
        PART_NO_BY_BOM("10", "按物料号匹配By-Bom"),
        WORK_CENTER_CODE_BY_BOM("20", "按产线匹配By-Bom"),
        WORK_CENTER_CODE_BY_SCATTER("30", "按产线匹配By-Scatter");

        private String value;
        private String description;

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

    /**
     * 界面类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WINDOW_TYPE {
        BUTTON_CFG(10, "按钮组件"),
        BOARD_BASE_WINDOW(20, "看板基础页面"),
        STEP_WINDOW(30, "工步界面");

        private int value;
        private String description;

        WINDOW_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 CALIBRATION_STATUS {
        UNEXECUTED(10, "UNEXECUTED", "待执行"),
        EXECUTE(20, "EXECUTE", "执行中"),
        CANCEL(30, "CANCEL", "取消"),
        FINISH(40, "FINISH", "完成");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

        public static String valueOfDescription(int val) {
            return valueOf(val);
        }
    }

    /**
     * 扭矩枪类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum GUN_TYPE {
        DL(10, "DL", "小枪"),
        PF(20, "PF", "大枪");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

        public static String valueOfDescription(int val) {
            return valueOf(val);
        }
    }

    /**
     * 排序校验模式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CHECK_PROD_SEQ_FLAG {
        PRODUCTION_MATERIAS(10, "NO_SORT_CHECK", "无排序校验"),
        CUSTOMER_SHPING(20, "QUEUE_BAR_CODE", "按产品队列条码校验排序"),
        OUTWARD_SHIPMENT(30, "PRODUCT_MATERIAL_NUMBER", "按产品物料号校验排序"),
        ALLOCATION(40, "SAME_MATERIAL_RACK", "按队列同料架单产品校验排序");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

        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 String codeOf(int val) {
            String tmp = null;
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == val) {
                    tmp = values()[i].code;
                }
            }
            return tmp;
        }

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

        public static String valueOfDescription(int val) {
            return valueOf(val);
        }
    }

    /**
     * 生产异常操作记录
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRODUCE_ERROR_RECORD {
        JUMP_PROCESS(10, "跳过工序"),
        JUMP_STEP(20, "跳过工步"),
        JUMP_STATE(30, "跳过状态点"),
        ABNORMAL_DEDUCTION(40, "扣减异常"),
        REDO_STATION(50, "工位重做"),
        RELEASE(60, "放行继续");

        private int value;
        private String description;

        PRODUCE_ERROR_RECORD(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 TOPIC_TYPE {
        COLOUR(10, "零件颜色"),
        GRADE(20, "等级"),
        TO_CONFIGURE(30, "配置");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        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 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 STOP_MACHINE_TYPE {
        TIMER_TIME_OUT(10, "计时器超时停机"),
        DELAY_HELP(20, "延时帮助停机"),
        URGENT_STOP(30, "急停停机");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * plc状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_PLC_STATUS {

        UN_CONNECT(0, "断开"),
        CONNECT(1, "连接");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        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 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 KEY_BIND_MODE {

        PRODUCE_BOM_BIND(10, "产品BOM绑定"),
        SCATTER_BOM_BIND(20, "散件BOM绑定");

        private int value;
        private String description;

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

    /**
     * 不良品处理类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BAD_HANDLE_TYPE {
        BACK_SPRAY(10, "BACK_SPRAY", "返喷"),
        SCRAPPED(20, "SCRAPPED", "报废"),
        POLISHING(30, "POLISHING", "抛光"),
        DETERMIND(40, "DETERMIND", "待定");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

        public static String valueOfDescription(int val) {
            return valueOf(val);
        }

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

    /**
     * MES_产品颜色 	类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_COLOR_TYPE {

        PRODUCT_COLOR(10, "产品颜色"),
        MATERIAL_COLOR(20, "物料颜色");

        private int value;
        private String description;

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

    /**
     * 选配类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum OPTION_TYPE {
        OPTION(10, "选配件"),
        BOM_DISASSEMBLY(20, "BOM拆解");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        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 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 VALUE_RANGE {

        SCAN(10, "扫描"),
        READ_CACHE(20, "读取缓存");

        private int value;
        private String description;

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

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum AGV_BUTTON_TRIGGER {

        DELAY(10, "延时启动"),
        EMERGENCY_STOP(20, "紧急停止");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

    }

    /**
     * 工作中心 工位监控模式  10=工单作业，20=标准作业
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_CENTER_MONITOR_TYPE {

        ORDER_WORK(10, "工单作业"),
        STANDARD_WORK(20, "标准作业");

        private int value;
        private String description;

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

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PLC_DATA_DIRECT {

        PLC_WRITE(10, "plc->mes"),
        MES_WRITE(20, "mes->plc"),
        SHARE(30, "共用");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_PTL_IS_LIGHT {

        IS_PICK_LIGHT(10, "不需亮灯");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PHOTO_EXTRACT_STATUS {
        NEED_SYNC_DATA(10, "待同步数据"),
        ALREADY_SYNC_DATA(20, "已同步数据");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }
    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum GET_AND_SET {
        GET(10, "get"),
        SET(20, "set");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }
    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PLC_BUSI_TYPE {
        AGV_EMERGENCY_STOP(10, "紧急停止"),
        AGV_EMERGENCY_RESET(20, "急停复位"),
        AGV_DELAY_HELP(30, "延时帮助");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }
    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PLC_TYPE {
        STANDARD(10, "标准"),
        EQU_WORKING_SIGNAL(20, "设备作业信号");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }
    }

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

    /**
     * JIT队列锁定池 状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum JIT_LOCK_CACHE_STATUS {
        CREATE(10, "创建"),
        RELEASE(20, "下达"),
        ONLINE_COMPLETE(30, "上线完成");

        private Integer value;
        private String description;

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

    /**
     * JIT队列锁定池 状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ASSISTANT_MODULE_DISPLAY {
        MULTIMEDIA_PLUG(10, "多媒体插头"),
        ATTENTION_INFO(20, "关注内容");

        private Integer value;
        private String description;

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

    /**
     * 排程记录 状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SCHEDULING_RECORD_STATUS {
        PENDING(10, "待处理"),
        PROCESSED(20, "已处理");

        private Integer value;
        private String description;

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

    /**
     * 产品特性
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PART_TRAIT {
        NORMAL(10, "正常件"),
        FICTITIOUS_ASSEMBLY(20, "虚拟散件总成"),
        FICTITIOUS_HALF_ASSEMBLY(30, "虚拟散件半总成"),
        FICTIVE(40, "虚拟件");

        private int value;
        private String description;

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

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum STEP_DISPLAY_CLASS {
        WHITE(10, "white"),
        LIGHT_BLUE(20, "lightBlue");

        private Integer value;
        private String description;

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

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PROMPT_SOUND {
        SUCCESS(10, "扫描成功"),
        FAILURE(20, "扫描失败");

        private Integer value;
        private String description;

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

    /**
     * 事务类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PACKAGE_TRANS_TYPE {

        OUTSTOCK(10, "出库"),
        INSTOCK(20, "入库"),
        GOBACK(30, "退回");

        private int value;
        private String description;

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

    /**
     * 状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PACKAGE_TRANS_STATUS {

        CREATE(10, "创建"),
        PROCESSED(20, "已处理");

        private int value;
        private String description;

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

    /**
     * 状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PACKAGE_SAMPLE_TYPE {

        NORMAL(10, "正常batch"),
        FIRST(20, "首件"),
        MIDDLE(30, "中件"),
        LAST(40, "末件");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }


    }

    /**
     * 客户JIT生产队列状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum QUEUE_JIT_ACTUAL_STATUS {
        CREATE(10, "创建"),
        LANDED(20, "下达"),
        CANCEL(30, "取消"),
        OFFLINE(40, "下线"),
        SHIPMENT(50, "发运");

        private int value;
        private String description;

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

    /**
     * 涂装导入--反喷标识（Y-正常；F-反喷）
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum REVERSE_SPRAY_MARK {
        REVERSE_SPRAY("F", "反喷"),
        NORMAL("Y", "正常");

        private String value;
        private String description;

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

    /**
     * 是否展示放空队列
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SHOW_VENTING_QUEUE {
        CREATE(10, "显示"),
        SHIPMENT(20, "不显示");

        private int value;
        private String description;

        SHOW_VENTING_QUEUE(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 QC_CHECK_DATA_SOURCE {
        MANUAL_INPUT(10, "10", "人工输入"),
        DB(30, "30", "数据库"),
        PLC(20, "20", "PLC");

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

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

        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 QC_CHECK_VALUE_TYPE {
        STRING(10, "字符串"),
        INTEGER(20, "数值");

        private int value;
        private String description;

        QC_CHECK_VALUE_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 QC_CHECK_VALUE_RESULT {
        OK(10),
        NOT_OK(20),
        MANUAL(30);

        private int value;

        QC_CHECK_VALUE_RESULT(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }

    /**
     * 队列 料架摆放位置
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum GROUP_SIDE {
        POSITIVE(10, "A", "正面"),
        REVERSE_SIDE(20, "B", "背面");

        private Integer value;
        private String code;
        private String description;

        GROUP_SIDE(Integer value, String code, String description) {
            this.value = value;
            this.code = code;
            this.description = description;
        }

        public Integer getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 过程检测检测检测结果
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BOARD_MONITOR_OBJECT_TYPE {
        ORGANIZE("10"),
        WORK_SHOP("20"),
        WORK_CENTER("30");

        private String value;

        BOARD_MONITOR_OBJECT_TYPE(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }

    /**
     * 中航DB数据检查配置-DB复核项
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_DB_DATA_CHECK_ITEM {
        PART_NO_NULL(10, "物料为空复核"),
        PART_NO_ORDER(20, "零件工单匹对复核"),
        SERIA_LNUMBER_REPEAT(30, "过程条码重复复核"),
        SERIA_LNUMBER_NULL(40, "过程条码为空复核"),
        PRODUCT_SN_REPEAT(50, "产品二维码重复复核"),
        PRODUCT_SN_NULL(60, "产品二维码为空复核"),
        KEY_DATA_FILED_NULL(70, "质量关键字段为空复核"),
        QC_FAIL_MAX_COUNT(80, "缺陷类型连续超过设定数复核");

        private int value;
        private String description;

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

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

    /**
     * 客户JIT生产队列特殊标识
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum QUEUE_JIT_ACTUAL_SPECIAL_FLAG {
        NORMAL(10, "正常"),
        EMPTYING(20, "放空"),
        ERR_PERCH(30, "异常占位");

        private int value;
        private String description;

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

    /**
     * 产品位置
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRODUCE_CATEGORY_NAME {

        FL("FL", "前左"),
        FR("FR", "前右"),
        RL("RL", "后左"),
        RR("RR", "后右");

        private String description;
        private String value;

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

    /**
     * 设备自动报警
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum EQU_AUTO_ALARM_TYPE {

        NORMAL(10, "正常"),
        RUNNING(20, "正在运行"),
        ERROR(30, "发生异常");

        private String description;
        private Integer value;

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


    /**
     * 过程检测数据源类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum LINE_OPERATION_TYPE {
        DB(10, "数据库"),
        PLC(20, "PLC");

        private int value;
        private String description;

        LINE_OPERATION_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 WORK_CENTER_MONITOR_BUSI_TYPE {
        EQU_ALARM(10, "设备自动报警");

        private int value;
        private String description;

        WORK_CENTER_MONITOR_BUSI_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 SRC_MENU_CODE {

        STATION_MONITOR("STATION_MONITOR", "工位监控");

        private String value;
        private String description;

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

    /**
     * 弹窗异常提醒记录 状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum EXCEPTION_WINDOW_RECORD_STATUS {
        PENDING(10, "待处理"),
        PROCESSED(20, "已处理");

        private Integer value;
        private String description;

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

    /**
     * 设备故障等级
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TAKET_LEVEL_CODE {
        NORMAL(10, "A", "不需要报警和安灯处理"),
        ALARM_CALL_ANDON(20, "B", "不需要报警,安灯记录"),
        CALL_ANDON(30, "C", "安灯记录"),
        FORCE_ANDON(40, "D", "强制ANDON呼叫"),
        STOPLINE_FORCE_ANDON(50, "E", "系统进行记录并停线,强制ANDON呼叫");

        private Integer value;
        private String code;
        private String description;

        TAKET_LEVEL_CODE(Integer value, String code, String description) {
            this.value = value;
            this.code = code;
            this.description = description;
        }

        public Integer getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 图片展示类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum IMG_DISPLAY_TYPE {
        STEP(10, "按工步显示"),
        WORK_CELL(20, "按工位显示");

        private Integer value;
        private String description;

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

    /**
     * 工位线程类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PCN_THREAD_TYPE {
        STEP(10, "跟随工步线程"),
        PROCESS(20, "跟随工序线程"),
        MODULE(30, "跟随展示组件线程");

        private Integer value;
        private String description;

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

        public Integer getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 控制计划审核状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CONTROL_PLAN_AUDIT_TYPE {
        WAIT_AUDIT(10, "待审核"),
        AUDIT_PASS(20, "审核通过"),
        AUDIT_NON_PASS(30, "审核驳回");

        private int value;
        private String description;

        CONTROL_PLAN_AUDIT_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 PRE_WORK_CENTER_CODE {
        OP10("OP10", "OP10"),
        OP20A("OP20a", "OP20a"),
        OP20B("OP20b", "OP20b");

        private String code;
        private String description;

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

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        public static PRE_WORK_CENTER_CODE getByCode(String code) {
            for (PRE_WORK_CENTER_CODE workCenterCode : values()) {
                if (workCenterCode.getCode().equals(code)) {
                    return workCenterCode;
                }
            }
            return null;
        }
        public static String codeOfDescription(String code) {
            String tmp = null;
            for (int i = 0; i < values().length; i++) {
                if (values()[i].code.equals(code)) {
                    tmp = values()[i].description;
                }
            }
            return tmp;
        }

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

    /**
     * JIS_回冲标识：BACKFLUSH = 正常回冲扣减，REPAIR = 返修冲料
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum JIS_BACKFLUSH_STATUS {
        BACKFLUSH("BACKFLUSH", "正常回冲扣减"),
        REPAIR("REPAIR", "返修冲料");

        private String value;
        private String description;

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