package cn.estsh.i3plus.ext.mes.pojo.util;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.StringUtils;

import java.util.Objects;

/**
 * @Description :
 * @Reference :
 * @Author : wangjie
 * @CreateDate : 2018-10-23 15:53
 * @Modify:
 **/

public class MesExtEnumUtil {

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_EXT_EXCEL {
        MES_ESOP_EXT(10, "esopExtExcelService", "sop"),
        MES_Q_MANAGE_EXT(20, "qManageExtExcelService", "qManage"),
        MES_PROCESS_CHECK_EXT(30, "processCheckExtExcelService", "processCheck"),
        MES_PROCESS_BOM_EXT(40, "processBomExtExcelService", "工序BOM表"),
        MES_SHIFT_EXT(50, "shiftExtExcelService", "班次扩展表"),
        MES_PROCESS_FIRST_ITEM_EXT(60, "processFirstItemExtExcelService", "工序首检项目导入"),
        MES_EXTERIOR_SCRATCH_PROOF_CELL(70, "exteriorScratchProofCellExcelService", "外观防划伤工位导入"),
        MES_OQC_PROJECT(80, "oqcProjectExcelService", "出货检验项目导入"),
        MES_PROD_PACK_EXT(90, "prodPackExtExcelService", "产品包装关系扩展表"),
        MES_PRODUCT_ENCODE_CFG(100, "productEncodeCfgExtExcelService", "产品编码配置"),
        MES_PROCESS_CELL(110, "processCellExcelService", "工序工位关系"),
        MES_PART_EXT(120, "partExtExcelService", "物料信息"),
        MES_WEIGHT(130, "sxWeighExcelService", "称重信息"),
        MES_FOUR_M_MANAGE(140, "sxFourMManageExcelService", "4M管理表"),
        MES_FOUR_M_CONFIRM(150, "sxFourMConfirmExcelService", "4M确认表"),
        MES_FOUR_M_CHANGE(160, "sxFourMChangeExcelService", "4M变化表"),
        MES_CONSISTENCY_AFFIRM_PART(170, "consistencyAffirmPartExcelService", "一致性确认物料表"),
        MES_CONSISTENCY_AFFIRM_PROJECT(180, "consistencyAffirmProjectExcelService", "一致性确认项目表"),
        MES_EQUIPMENT_PARAM(190, "equipmentParamExcelService", "工位设备参数表"),
        MES_PROJECT_CONFIRM(200, "projectConfirmExcelService", "工程巡回确认项目表"),
        MES_PROJECT_SORT(210, "projectSortExcelService", "质量巡检项目分类表"),
        MES_PROCEDURE_PROJECT(220, "procedureProjectExcelService", "质量巡检项目表"),
        MES_SHIFT_PROD(230, "shiftProdExcelService", "班次作业项目表"),
        MES_SHIFT_PROD_CENTER(240, "shiftProdCenterExcelService", "产线班次固定作业内容信息表"),
        MES_CONTAINER_TYPE(250, "sxContainerTypeExcelService", "容器类型表"),
        MES_CONTAINER(260, "sxContainerExcelService", "容器信息表"),
        MES_PART_CONTAINER_CAPACITY(270, "sxPartContainerCapacityExcelService", "产品容器容量配置表"),
        MES_EQUIPMENT_CHECK(280, "sxEquipmentCheckExcelService", "工位设备点检表"),
        MES_DEFECT(290, "sxDefectExcelService", "缺陷"),
        MES_ANTI_STATIC_CHECK(300, "sxAntiStaticCheckExcelService", "防静电工位"),
        MES_PLC(390, "sxPlcExcelService", "PLC信息"),
        MES_KPSN_RULE(410, "sxKpsnRuleExcelService", "关键件条码校验规则"),
        MES_DATA_OBJECT(420, "sxDataObjectExcelService", "数据对象"),
        MES_OBJECT_CFG(430, "sxObjectCfgExcelService", "对象结构"),
        MES_OBJECT_CFG_EP(431, "epObjectCfgExcelService", "对象结构"),
        MES_PRINT_PART_PARAMETER(440, "printPartParameterExtExcelService", "打印物料拓展参数"),
        MES_EP_EQUIPMENT_EXT(500, "sxEpEquipmentExcelService", "设备信息表"),
        MES_EP_EQUIPMENT_CHECK_EXT(510, "sxEpEquipmentCheckExcelService", "EP设备点检项目表"),
        MES_EP_PART_EXT(520, "epPartExtExcelService", "物料信息表"),
        MES_EP_HAPPEN_STATION(530, "happenStationExcelService", "发生岗位表"),
        MES_EP_PART_DIVULGE_CHECK_CFG(540, "partDivulgeCheckCfgExcelService", "24小时泄露检测物料配置表"),
        MES_EP_PART_CHECK(600, "epPartCheckExtExcelService", "物料校验项"),
        Mes_Employee_And_Process_Bind(710, "mesEmployeeAndProcessBindExcelService", "人员与工序关系"),
        Mes_Employee_Nature(720, "mesEmployeeNatureExcelService", "员工性质"),
        Mes_Employee_Skills_Management(730, "mesEmployeeSkillsManagementExcelService", "员工技能管理"),
        Mes_Process_Label_Marking(740, "mesProcessLabelMarkingExcelService", "工序标签标示"),
        Mes_Skill_Kanban_Process_Information(750, "mesSkillKanbanProcessInformationExcelService", "技能看板工序信息"),
        Mes_Skills_Management_Benchmark(760, "mesSkillsManagementBenchmarkExcelService", "技能管理基准"),
        Mes_Team_Management_Introduce(770, "mesTeamManagementIntroduceExcelService", "团队管理介绍"),
        BU_MES_CONTAINER(780, "buContainerExcelService", "BU容器信息导入"),// todo 暂未使用
        BU_MES_PROCESS_BOM_EXT(790, "buProcessBomExtExcelService", "BU工序BOM表"),
        MES_PRODUCT_PRINT_TYPE(800, "mesProductPrintTypeExcelService", "产品打印类型配置"),
        MES_ESOP_CENTER_REMAIN_CFG(810, "sxEsopCenterRemainCfgExcelService", "作业指导书生产线切替数量配置"),
        MES_PART_CATEGORY_PLAN_RATE(820, "sxPartCategoryPlanRateExcelService", "产品类别计划比例"),
        MES_PART_CATEGORY_TARGET_CFG(825, "sxPartCategoryTargetCfgExcelService", "产品类别目标配置"),
        MES_WORK_CENTER_EXT(830, "sxWorkCenterExtExcelService", "生产线扩展信息"),
        MES_WORK_LICENSE(840, "sxWorkLicenseExcelService", "上岗证信息"),
        MES_BU_Q_MANAGE_EXT(850, "buQManageExtExcelService", "buQManage"),
        MES_ASSIST_OUT_AND_ENTER(860, "sxAssistOutAndEnterExcelService", "援交明细记录"),
        MES_CAREER_CORRELATION_CFG(870, "sxCareerCorrelationCfgExcelService", "事业别相关配置"),
        MES_OFFICIAL_LOSS_DETAIL_RECORD(880, "sxOfficialLossDetailRecordExcelService", "仕损明细记录"),
        MES_REWORK_ORDER_BIND_UNBIND_SN(890, "sxReworkOrderBindSnExcelService", "本体返工条码绑定导入"),
        MES_CAREER_CATEGORY_WORK_CENTER_CORRELATION_CFG(900, "sxCareerAndCategoryAndWorkCenterCfgExcelService", "综合能率目标导入"),
        MES_PROCESS_TORQUE_MANAGE(910, "torqueManageExcelService", "扭矩管理项目导入"),
        MES_MANAGE_CODE(920, "manageCodeExcelService", "管理码信息导入"),
        MES_ZJ_REWORK_ORDER_BIND_UNBIND_SN(930, "sxReworkOrderBindZjSnExcelService", "组件返工条码绑定导入"),
        MES_JX_OQC_PROJECT(940, "jxOqcProjectExcelService", "JX出货检验项目"),
        MES_JX_BADNESS_TYPE(950, "jxBadnessTypeExcelService", "JX出货不良类型"),
        MES_JX_BADNESS_CLASSIFY(960, "jxBadnessClassifyExcelService", "JX出货不良分类"),
        MES_JX_BADNESS_CLASSIFY_DETAIL(970, "jxBadnessClassifyDetailExcelService", "JX不良分类明细"),
        MES_WORK_CELL_EXT(980, "workCellExtExcelService", "工位信息导入"),
        REPAIR_JUDGE_TYPE(990, "repairJudgeTypeExcelService", "返修判定类型导入"),
        MES_TIME_SEGMENT_STATISTICS(1000, "jxTimeSegmentStatisticsExcelService", "分时段统计方式导入");

        private int value;
        private String service;
        private String description;

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

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

        public String getService() {
            return this.service;
        }

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

        public static MesExtEnumUtil.MES_EXT_EXCEL getByValue(int value) {
            MesExtEnumUtil.MES_EXT_EXCEL[] var1 = values();
            int var2 = var1.length;

            for (int var3 = 0; var3 < var2; ++var3) {
                MesExtEnumUtil.MES_EXT_EXCEL excel = var1[var3];
                if (excel.getValue() == value) {
                    return excel;
                }
            }
            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 String valueOfService(int val) {
            String tmp = null;

            for (int i = 0; i < values().length; ++i) {
                if (values()[i].value == val) {
                    tmp = values()[i].service;
                }
            }

            return tmp;
        }
    }

    @JsonFormat(
            shape = JsonFormat.Shape.OBJECT
    )
    public enum BATCH_FILE_IMPORT_MODULE {
        ESOP("ESOP", "ESOP信息"),
        PART("PART", "物料信息"),
        EXTERIOR_SCRATCH_PROOF_CELL("EXTERIOR_SCRATCH_PROOF_CELL", "外观防划伤工位信息");

        private String description;
        private String value;

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

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

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

    @JsonFormat(
            shape = JsonFormat.Shape.OBJECT
    )
    public enum COMMON_SN {
        WC_NO("WC_NO", "PO条码");

        private String code;
        private String description;
        int value;

        private COMMON_SN(String code, String description) {
            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 WORK_ORDER_STATUS {

        CREATE(10, "创建"),
        LANDED(20, "下达"),
        OPEN(30, "启动"),
        PAUSE(40, "暂停"),
        CLOSE(60, "完成"),
        REMOVE(70, "删除");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * SAP工单状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SAP_WORK_ORDER_STATUS {

        CREATE(10, "创建"),
        CLOSE(30, "关闭"),
        DELETE(40, "删除");

        private int value;
        private String description;

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

    /**
     * WORK_ORDER_TYPE 工单类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_ORDER_TYPE {
        STANDARD_ORDER(10, "正常工单"),
        ATTEMPT_ORDER(20, "试制工单"),
        REWORK_ORDER(30, "返工工单");

        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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;
        }

        public static WORK_ORDER_TYPE getByValue(int value) {
            for (WORK_ORDER_TYPE orderType : values()) {
                if (orderType.getValue() == value) {
                    return orderType;
                }
            }
            return null;
        }
    }


    /**
     * WORK_ORDER_SOURCE
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_ORDER_SOURCE {
        MANUALLY_GENERATE("10", "手动生成"),
        IMPORT_GENERATE("20", "导入生成"),
        SAP_GENERATE("30", "SAP生成");

        private String value;
        private String description;

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

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

        public String getDescription() {
            return this.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;
        }
    }


    /**
     * MesOrderJob 单据状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_ORJ_ORDER_STATUS {
        CREATE(10, "创建"),
        CHECKING(20, "点检中"),
        CHECK_COMPLETE(30, "点检完成"),
        CLOSE(40, "关闭");

        private int value;
        private String description;

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

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

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

        public static String valueOfDescription(int val) {
            String tmp = null;

            for (int i = 0; i < values().length; ++i) {
                if (values()[i].value == val) {
                    tmp = values()[i].description;
                }
            }

            return tmp;
        }

        public static Integer descriptionOfValue(String description) {
            Integer tmp = null;

            for (int i = 0; i < values().length; ++i) {
                if (values()[i].description.equals(description)) {
                    tmp = values()[i].value;
                }
            }

            return tmp;
        }
    }


    /**
     * mes单据规则 作业类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_OR_TASK_TYPE {

        PREPARE_TASK(10, "准备作业"),
        PROCESS_TASK(20, "过程作业");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 是否禁用
     */
    public static enum IS_VAILD {
        VAILD(1, "有效"),
        INVAILD(2, "无效");

        private int value;
        private String description;

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

    /**
     * 绑定规则
     */
    public static enum IS_BIND_KEY {
        YES(1, "是"),
        NO(2, "否");

        private int value;
        private String description;

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

    /**
     * 是否可以重复
     */
    public static enum IS_REPEAT {
        YES(1, "是"),
        NO(2, "否");

        private int value;
        private String description;

        IS_REPEAT(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;
        }
    }
    /**
     * 是否检查
     */
    public static enum IS_CHECK {
        YES(1, "是"),
        NO(2, "否");

        private int value;
        private String description;

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

    /**
     * 匹配规则
     */
    public static enum MATCH_RULE {
        BARCODE_RULE_MATCHING(10, "条码规则匹配"),
        PROCESS_BARCODE_MATCHING(20, "过程条码匹配"),
        BAR_CODE_MATCHING(30, "箱条码匹配"),
        PART_CODE_MATCHING(40, "物料编码匹配");

        private int value;
        private String description;

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

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

    /**
     * mes单据规则 班组确认
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SHIFT_GROUP_CHECK {

        YES(10, "是"),
        NO(20, "否");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * mes单据规则 品质确认
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum QUALITY_CHECK {

        YES(10, "是"),
        NO(20, "否");

        private int value;
        private String description;

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

    /**
     * MesOrderJob  单据类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_OR_ORDER_TYPE {

        PART_CHECK(10, "物料点检"),
        PERSON_CHECK(20, "上岗证点检"),
        //Q_MANAGE(30, "Q管理"),
        EQU_CHECK(40, "设备点检"),
        ESD_CHECK(50, "防静电点检"),
        WORK_ORDER_FIRST(60, "Q管理"),
        FOUR_M_CHECK(70, "4M变更"),
        FAILURE_CASE_CHECK(80, "失败事例点检"),
        SPECIAL_PROCESS_PARAMETERS(90, "特殊过程工艺参数"),
        NAMEPLATE_GUARANTEE_CONSISTENCY(100, "铭牌保证书一致性"),
        EXTERIOR_SCRATCH_PROOF_CHECK(110, "外观防划伤点检"),
        PROJECT_TOUR_CONTRIM(120, "工程巡回确认"),
        WEIGHING_MANAGEMENT_TABLE(130, "称重管理表"),
        TORQUE_MANAGE(140, "扭矩管理");

        private int value;
        private String description;

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

    /**
     * mes单据规则 创建规则
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_OR_CREATE_RULE {

        TIME_TO_CREATE(10, "定时创建"),
        WORK_ORDER_CREATE(20, "工单创建");

        private int value;
        private String description;

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

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

    /**
     * MesEquipmentCheck 设备点检类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_EQUIPMENT_CHECK_TYPE {

        DAY_CHECK("day_check", "日点检", "日"),
        WEEK_CHECK("week_check", "周点检", "周"),
        MONTH_CHECK("month_check", "月点检", "月"),
        YEAR_CHECK("year_check", "年点检", "年");
        private String value;
        private String description;
        private String abbr;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getAbbr() {
            return abbr;
        }

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

    /**
     * mes人员点检详情  点检结果
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CHECK_RESULT {

        OK(10, "OK"),
        NG(20, "NG");

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

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

    /**
     * MesShiftProd 班次作业项目-作业内容分类
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SHIFT_PROD_CATEGORY {

        PART(10, "物料"),
        EQUIMENT(20, "设备"),
        QUALITY(30, "质量"),
        CUT_AND_REPLACE(40, "切替"),
        IMPROVE(50, "改善"),
        MEETING(60, "会议"),
        CHECK(70, "盘点"),
        EDUCATION(80, "教育培训"),
        OTHER(100, "其他");
        private int value;
        private String description;

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

    /**
     * MesShiftProd 班次作业项目-作业类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SHIFT_PROD_TYPE {

        NORMAL_STOP_CENTER(10, "常规停机"),
        UNNORMAL_STOP_CENTER(20, "非常规停机"),
        NORMAL_PROD(30, "常规生产"),
        UNNORMAL_PROD(40, "非常规生产"),
        START_OR_END_SHIFT_TIME(50, "开始/结束班次时间");
        private int value;
        private String description;

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


        public static SHIFT_PROD_TYPE getByValue(int value) {
            for (SHIFT_PROD_TYPE matchType : values()) {
                if (matchType.getValue() == value) {
                    return matchType;
                }
            }
            return null;
        }
    }

    /**
     * MesShiftProd 班次作业项目-是否作业时间
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SHIFT_PROD_IS_PROD_TIME {

        NORMAL_STOP_CENTER(1, "是"),
        UNNORMAL_STOP_CENTER(2, "否");
        private int value;
        private String description;

        SHIFT_PROD_IS_PROD_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 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_TYPE_CFG 类型信息
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_TYPE_CFG_EXT {

        BAD("BAD", "不良"),
        //        DEFECT("DEFECT", "缺陷"),
//        DISASSEMBLE("DISASSEMBLE", "拆解"),
        DEFECT_CAUSE("DEFECT_CAUSE", "缺陷原因"),
        REPAIR("REPAIR", "处理措施");
//        SCRAP("SCRAP", "报废原因"),
//        EQU_DEFECT_CAUSE("EQU_DEFECT_CAUSE", "故障原因"),
//        EQU_DEFECT_METHOD("EQU_DEFECT_METHOD", "故障处理措施"),
//        EQU_DEFECT_PHENOMENON("EQU_DEFECT_PHENOMENON", "故障现象");

        private String value;
        private String description;

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

    /**
     * PROD_CFG_TYPE_CLASSIFY 项目分类
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PROD_CFG_TYPE_CLASSIFY {

        COMPONENT(10, "部品"),
        PROJECT(20, "工程"),
        SAFETY(30, "安全"),
        EQUIPMENT(40, "设备"),
        SPE_ENVIRONMENT(50, "特殊环境"),
        FIVE_S(60, "5S"),
        CHECK(70, "检查"),
        ELSE(80, "其他"),
        ONTOLOGY_LOGISTICS(90, "本体物流"),
        ONTOLOGY_U_PART(100, "本体U部品"),
        ONTOLOGY_ASSEMBLE(110, "本体组装"),
        ONTOLOGY_CHECK(120, "本体检查");


        private int value;
        private String description;

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


    /**
     * MesWorkOrderExt 工单-条码生成状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_ORDER_SN_CREATE_STATUS {

        UN_CREATE(10, "未生成"),
        CREATED(20, "已生成"),
        NO_CREATE(30, "不生成");

        private int value;
        private String description;

        WORK_ORDER_SN_CREATE_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 HANDLER_METHOD {

        MANUALLY_CREATE(10, "手动创建"),
        AUTOMATICALLY_CREATED(20, "自动创建");

        private int value;
        private String description;

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

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

        ORGANIZATION(10, "工厂"),
        PART(20, "物料"),
        WORK_CENTER(30, "生产线"),
        PPT_CODE(40, "产品生产类型"),
        CATEGORY_CODE1(50, "分类1"),
        CATEGORY_CODE2(60, "分类2"),
        CATEGORY_CODE3(70, "分类3");

        private int value;
        private String description;

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

        public static ENCODE_MATCH_TYPE getByValue(int value) {
            for (ENCODE_MATCH_TYPE matchType : values()) {
                if (matchType.getValue() == value) {
                    return matchType;
                }
            }
            return null;
        }
    }

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

        SERIAL_SN(5, "过程条码"),
        STANDARD_SERIAL_SN(10, "正常产品条码"),
        ATTEMPT_SERIAL_SN(20, "试制产品条码"),
        REWORK_SERIAL_SN(30, "再生产品条码"),
        PACK_SN(40, "包装条码"),
        BIG_PACK_SN(50, "大包装条码"),
        BIG_PACK_ATTEMPT_SN(60, "试制大包装条码"),
        BIG_PACK_REWORK_SN(70, "再生大包装条码");

        private int value;
        private String description;

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

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

        public static ENCODE_CODE_TYPE getByValue(int value) {
            for (ENCODE_CODE_TYPE codeType : values()) {
                if (codeType.getValue() == value) {
                    return codeType;
                }
            }
            return null;
        }
    }

    /**
     * 补件是否报工
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum IS_REPAIR_WORK_REPORT {

        YES(10, "是"),
        NO(20, "否");

        private int value;
        private String description;

        IS_REPAIR_WORK_REPORT(int value, String description) {
            this.value = value;
            this.description = 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;
        }

        public static IS_REPAIR_WORK_REPORT getByValue(int value) {
            for (IS_REPAIR_WORK_REPORT codeType : values()) {
                if (codeType.getValue() == value) {
                    return codeType;
                }
            }
            return null;
        }

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 条码类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRODUCE_SN_TYPE {
        STANDARD_SN(10, "正常条码"),
        ATTEMPT_SN(20, "试制条码"),
        REMAKE_SN(30, "改造条码"),
        REWORK_SN(40, "返工条码");

        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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;
        }

        public static PRODUCE_SN_TYPE getByValue(int value) {
            for (PRODUCE_SN_TYPE snType : values()) {
                if (snType.getValue() == value) {
                    return snType;
                }
            }
            return null;
        }
    }

    /**
     * 条码状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRODUCE_SN_STATUS {
        CREATE(10, "创建"),
        PROCESS(20, "在制"),
        ERR_OFFLINE(30, "异常下线"),
        OFFLINE(40, "正常下线"),
        REPAIR(5, "返工");

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

        QUALIFIED(10, "合格"),
        DEFECTED(20, "不合格");

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

    /**
     * 条码打印状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRODUCE_SN_PRINT_STATUS {

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

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


    /**
     * EQU_CHECK_RESULT 设备点检结果
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum EQU_CHECK_RESULT {
        QUALIFIED(10, "合格"),
        EQUIPMENT_ABNORMAL(20, "设备异常"),
        EQUIPMENT_FAILURE(30, "设备故障中");

        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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;
        }
    }


    /**
     * ANTI_CHECK_RESULT 防静电点检结果
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ANTI_CHECK_RESULT {
        QUALIFIED(10, "OK"),
        UN_QUALIFIED(30, "NG");

        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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 ACCIDENT_STATUS {

        EXCEPTION(10, "异常");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * mes 确认
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CONFIRM_TYPE {

        YES(10, "是"),
        NO(20, "否");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * mes 确认
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MANAGE_TYPE {

        人(10, "人"),
        机(20, "机"),
        料(30, "料"),
        法(40, "法");

        private int value;
        private String description;

        MANAGE_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 OQC_CHECK_RESULT {
        QUALIFIED(10, "合格"),
        UNQUALIFIED(20, "不合格");

        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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 OQC_CHECK_RESULT getByValue(int value) {
            for (OQC_CHECK_RESULT oqcCheckResult : values()) {
                if (oqcCheckResult.getValue() == value) {
                    return oqcCheckResult;
                }
            }
            return null;
        }
    }

    @JsonFormat(
            shape = JsonFormat.Shape.OBJECT
    )
    public enum OQC_PROJECT_RESULT {
        OK(10, "OK"),
        NG(20, "NG");

        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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 OQC_PROJECT_RESULT getByValue(int value) {
            for (OQC_PROJECT_RESULT oqcProjectResult : values()) {
                if (oqcProjectResult.getValue() == value) {
                    return oqcProjectResult;
                }
            }
            return null;
        }
    }

    @JsonFormat(
            shape = JsonFormat.Shape.OBJECT
    )
    public enum ON_SITE_ORDER_DETAIL_CHECK_RESULT {
        OK("OK", "OK"),
        NG("NG", "NG");

        private String value;
        private String description;

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

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

        public String getDescription() {
            return this.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 OQC_CHECK_TYPE {

        DAILY_INSPECTION(10, "日常检验"),
        TEARDOWN_INSPECTION(20, "拆机检验"),
        EMPTY_INSPECTION(30, "空洞检验");

        private int value;
        private String description;

        OQC_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 是否AGV搬运
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum IS_AGV_CARRY {

        YES(10, "是"),
        NO(20, "否");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * mes 确认
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SALES_TO {

        CHINA_TO(10, "中国向"),
        JAPAN_TO(20, "日本向"),
        OTHER(30, "其他"),
        CHINA_TAIWAN(40, "中国台湾");

        private int value;
        private String description;

        SALES_TO(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 SALES_TO_STR {
        CHINA_TO("10", "中国向"),
        JAPAN_TO("20", "日本向"),
        TAI_WANG("30", "其他"),
        OTHER("40", "台湾向");

        private String value;
        private String description;

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

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

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

        public static String valueOfDescription(String val) {
            String tmp = null;

            for (int i = 0; i < values().length; ++i) {
                if (Objects.equals(values()[i].value, val)) {
                    tmp = values()[i].description;
                }
            }

            return tmp;
        }

        public static String descriptionOfValue(String description) {
            String tmp = null;

            for (int i = 0; i < values().length; ++i) {
                if (values()[i].description.equals(description)) {
                    tmp = values()[i].value;
                }
            }

            return tmp;
        }
    }

    /**
     * mes 确认
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum LINE_TYPE {

        ONTOLOGY_LINE(10, "本体线"),
        COMPONENT_LINE(20, "组件线"),
        FOUNTAIN(30, "源泉线"),
        PARTS(40, "零部件");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getValueStr() {
            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;
        }

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

    /**
     * mes 容器使用状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CONTAINER_USE_STATUS {

        LEISURE("10", "空闲"),
        OCCUPY("20", "占用");

        private String value;
        private String description;

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

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

    /**
     * mes 非作业时间报表查询维度
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum REPORT_DIMENSION_UN_WORK_TIME_STATISTICS {

        DATE(10, "日期"),
        IS_DONT(20, "系别"),
        DONT_CLASS(30, "班别"),
        CENTER(40, "产线"),
        SHIFT(50, "班次");

        private int value;
        private String description;

        REPORT_DIMENSION_UN_WORK_TIME_STATISTICS(int value, String description) {
            this.value = value;
            this.description = 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 MesExtEnumUtil.REPORT_DIMENSION_UN_WORK_TIME_STATISTICS getByValue(int value) {
            MesExtEnumUtil.REPORT_DIMENSION_UN_WORK_TIME_STATISTICS[] var1 = values();
            int var2 = var1.length;

            for (int var3 = 0; var3 < var2; ++var3) {
                MesExtEnumUtil.REPORT_DIMENSION_UN_WORK_TIME_STATISTICS dimension = var1[var3];
                if (dimension.getValue() == value) {
                    return dimension;
                }
            }
            return null;
        }

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * mes 报表查询维度(日期)
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum REPORT_DIMENSION_DAY_OR_MONTH {

        MONTH(10, "月"),
        DAY(20, "日");

        private int value;
        private String description;

        REPORT_DIMENSION_DAY_OR_MONTH(int value, String description) {
            this.value = value;
            this.description = 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 MesExtEnumUtil.REPORT_DIMENSION_DAY_OR_MONTH getByValue(int value) {
            MesExtEnumUtil.REPORT_DIMENSION_DAY_OR_MONTH[] var1 = values();
            int var2 = var1.length;

            for (int var3 = 0; var3 < var2; ++var3) {
                MesExtEnumUtil.REPORT_DIMENSION_DAY_OR_MONTH dimension = var1[var3];
                if (dimension.getValue() == value) {
                    return dimension;
                }
            }
            return null;
        }

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * mes 出货检验报表查询维度(数据)
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum OQC_REPORT_DIMENSION {

        CATEGORY_CODE3(10, "产品类别"),
        PART_NO(20, "物料编码");

        private int value;
        private String description;

        OQC_REPORT_DIMENSION(int value, String description) {
            this.value = value;
            this.description = 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 MesExtEnumUtil.OQC_REPORT_DIMENSION getByValue(int value) {
            MesExtEnumUtil.OQC_REPORT_DIMENSION[] var1 = values();
            int var2 = var1.length;

            for (int var3 = 0; var3 < var2; ++var3) {
                MesExtEnumUtil.OQC_REPORT_DIMENSION dimension = var1[var3];
                if (dimension.getValue() == value) {
                    return dimension;
                }
            }
            return null;
        }

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * mes 不良统计报表查询维度(数据)
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BAD_STATISTICS_REPORT_DIMENSION {

        CENTER(10, "生产线"),
        CELL(20, "工位");

        private int value;
        private String description;

        BAD_STATISTICS_REPORT_DIMENSION(int value, String description) {
            this.value = value;
            this.description = 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 MesExtEnumUtil.BAD_STATISTICS_REPORT_DIMENSION getByValue(int value) {
            MesExtEnumUtil.BAD_STATISTICS_REPORT_DIMENSION[] var1 = values();
            int var2 = var1.length;

            for (int var3 = 0; var3 < var2; ++var3) {
                MesExtEnumUtil.BAD_STATISTICS_REPORT_DIMENSION dimension = var1[var3];
                if (dimension.getValue() == value) {
                    return dimension;
                }
            }
            return null;
        }

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * mes 报表查询维度(日期)
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum REPORT_DIMENSION_DATE {

        ONE(10, "无差别"),
        YEAR(20, "年"),
        MONTH(30, "月"),
        DAY(40, "日");

        private int value;
        private String description;

        REPORT_DIMENSION_DATE(int value, String description) {
            this.value = value;
            this.description = 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 MesExtEnumUtil.REPORT_DIMENSION_DATE getByValue(int value) {
            MesExtEnumUtil.REPORT_DIMENSION_DATE[] var1 = values();
            int var2 = var1.length;

            for (int var3 = 0; var3 < var2; ++var3) {
                MesExtEnumUtil.REPORT_DIMENSION_DATE dimension = var1[var3];
                if (dimension.getValue() == value) {
                    return dimension;
                }
            }
            return null;
        }

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * mes 报表查询维度(完结率/达成率)
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum REPORT_DIMENSION_ATTAINMENT_RATE_CHART {

        DATE(10, "日期"),
        IS_DONT(20, "系别"),
        DONT_CLASS(30, "班别"),
        CENTER(40, "产线");

        private int value;
        private String description;

        REPORT_DIMENSION_ATTAINMENT_RATE_CHART(int value, String description) {
            this.value = value;
            this.description = 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 MesExtEnumUtil.REPORT_DIMENSION_ATTAINMENT_RATE_CHART getByValue(int value) {
            MesExtEnumUtil.REPORT_DIMENSION_ATTAINMENT_RATE_CHART[] var1 = values();
            int var2 = var1.length;

            for (int var3 = 0; var3 < var2; ++var3) {
                MesExtEnumUtil.REPORT_DIMENSION_ATTAINMENT_RATE_CHART dimension = var1[var3];
                if (dimension.getValue() == value) {
                    return dimension;
                }
            }
            return null;
        }

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * 维修判定
     */
    @JsonFormat(
            shape = JsonFormat.Shape.OBJECT
    )
    public enum MES_REPAIR_JUDGE {
        MISJUDGE(10, "误判"),
        PARTS_BAD(20, "部品不良"),
        TASK_BAD(30, "作业不良"),
        EQUIPMENT_BAD(40, "设备不良"),
        DESIGN_BAD(50, "设计不良");

        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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 enum WORK_CENTER_CT_LOCATION_TYPE {
        LEFT(1, "左位置"),
        RIGHT(2, "右位置");

        private int value;
        private String description;

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

    /**
     * 物料类型2
     */
    public enum CATEGORY_CODE_2 {
        INSIDE("10", "内置件"),
        OUTSIDE("20", "外制件");

        private String value;
        private String description;

        CATEGORY_CODE_2(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 enum REPORT_PART_CATEGORY {
        INSIDE("10", "内置件"),
        OUTSIDE("20", "出口组件"),
        PART("30", "成品");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    @JsonFormat(
            shape = JsonFormat.Shape.OBJECT
    )
    public static enum BIND_RULE {
        COOPERATION_PART(0, "外采件"),
        SELF_CONTROL_PART(1, "自制件");

        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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 static enum IF_SYNC_STATUS {
        ALREADY_SYNC(1, "已同步"),
        NO_SYNC(2, "未同步");

        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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 OQC_TOTAL_STATUS {
        QUALIFIED(10, "合格"),
        DEFECTED(20, "不合格"),
        UNTREATED(30, "未检验");

        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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 static enum REPAIR_STATUS {
        REPAIRED(10, "已维修"),
        NO_REPAIR(20, "待维修");

        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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 static enum REPAIR_JUDGE {
        MISJUDGE(10, "误判"),
        PARTS_BAD(20, "部品不良"),
        TASK_BAD(30, "作业不良"),
        EQUIPMENT_BAD(40, "设备不良"),
        DESIGN_BAD(50, "设计不良");

        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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;
        }
    }


    /**
     * MesEpEquipmentCheck 设备点检结果类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum EP_EQUIPMENT_CHECK_RESULT_TYPE {

        COMPARE_TYPE(10, "值类型"),
        RESULT_TYPE(20, "结果类型"),
        EQUAL_TYPE(30, "内容类型");
        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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 static enum PART_CHECK_DATA_TYPE {
        ALL_DATA(1, "所有数据"),
        LAST_DATA(2, "最后一条数据"),
        ALL_DATA_AND_LAST_DATA(3, "所有数据且最后一条数据必须合格");

        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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 REPORT_DIMENSION_STANDARD_WORK {

        PART(10, "物料"),
        CENTER(20, "产线"),
        SHIFT(30, "班次");

        private int value;
        private String description;

        REPORT_DIMENSION_STANDARD_WORK(int value, String description) {
            this.value = value;
            this.description = 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 int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static MesExtEnumUtil.REPORT_DIMENSION_STANDARD_WORK getByValue(int value) {
            MesExtEnumUtil.REPORT_DIMENSION_STANDARD_WORK[] var1 = values();
            int var2 = var1.length;

            for (int var3 = 0; var3 < var2; ++var3) {
                MesExtEnumUtil.REPORT_DIMENSION_STANDARD_WORK dimension = var1[var3];
                if (dimension.getValue() == value) {
                    return dimension;
                }
            }
            return null;
        }

    }

    /**
     * mes 员工性质颜色枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum EMPLOYEE_NATURE_COLOR {

        R_W("红底白字", "红底白字"),
        B_B("蓝底黑字", "蓝底黑字"),
        G_B("灰底黑字", "灰底黑字"),
        P_B("粉底黑字", "粉底黑字");

        private String value;
        private String description;

        EMPLOYEE_NATURE_COLOR(String value, String description) {
            this.value = value;
            this.description = 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 String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * mes 工序标签标示颜色枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PROCESS_LABEL_MARKING_COLOR {

        Y_R("黄底红字", "黄底红字"),
        Y_W("蓝底白字", "蓝底白字"),
        Y_B("黄底黑字", "黄底黑字"),
        G_B("灰底黑字", "灰底黑字");

        private String value;
        private String description;

        PROCESS_LABEL_MARKING_COLOR(String value, String description) {
            this.value = value;
            this.description = 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 String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * mes 工序标签标示位置枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PROCESS_LABEL_MARKING_LOCATION {

        L_U("左上", "左上"),
        L_D("左下", "左下"),
        R_U("右上", "右上"),
        R_D("右下", "右下");

        private String value;
        private String description;

        PROCESS_LABEL_MARKING_LOCATION(String value, String description) {
            this.value = value;
            this.description = 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 String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * mes 技能管理基准-技能水平
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SKILLS_MANAGEMENT_BENCHMARK_SKTLLS_LEVEL {

        A("A", "red"),
        B("B", "yellow"),
        C("C", "blue"),
        D("D", "white");

        private String value;
        private String description;

        SKILLS_MANAGEMENT_BENCHMARK_SKTLLS_LEVEL(String value, String description) {
            this.value = value;
            this.description = 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 String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * mes 管理团队图片培训
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TEAM_MANAGEMENT_INTRODUCE_PHOTO_TYPE {

        SHIFT_PHOTO(1, "班组长照片"),
        TEAM_PHOTO(2, "团队照片");

        private int value;
        private String description;

        TEAM_MANAGEMENT_INTRODUCE_PHOTO_TYPE(int value, String description) {
            this.value = value;
            this.description = 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 int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * EP生产数据第三方库结果字段
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum EP_PRODUCT_DATA_RESULT {

        OK("1", "OK"),
        NG("2", "NG");

        private String value;
        private String description;

        EP_PRODUCT_DATA_RESULT(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 IS_PRINT_QUALITY_ASSURE_INDIA {

        YES(10, "是"),
        NO(20, "否");

        private int value;
        private String description;

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

    /**
     * BU 容器类别
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CT_TYPE {

        TRAY(10, "托盘"),
        TOOLING_PLATE(20, "工装板"),
        PASS_BOX(30, "周转箱"),
        TROLLEY(40, "台车"),
        IRON_FRAME(50, "铁框");

        private Integer value;
        private String description;

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

        public static Integer descOf(String desc) {
            Integer tmp = null;

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

    }

    /**
     * 审批状态
     */
    @JsonFormat(
            shape = JsonFormat.Shape.OBJECT
    )
    public static enum BAD_CELL_DETAIL_APPROVAL_STATUS {
        APPROVAL(10, "审批"),
        REJECT(20, "驳回"),
        UN_APPROVAL(30, "待审批");

        private int value;
        private String description;

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

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

        private BAD_CELL_DETAIL_APPROVAL_STATUS(int value, String description) {
            this.value = value;
            this.description = 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 PCC_DATA_DIMENSION {

        DEFECT_CODE(10, "不良现象"),
        BAD_PART_NO(20, "不良部品编码"),
        BAD_PART_VENDER(30, "不良部品厂家"),
        REPAIR_JUDGE(40, "不良类型");

        private int value;
        private String description;

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

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

                return null;
            }
        }
    }

    /**
     * mes 工程集计报表数据维度
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum FIELD_MENU_TYPE {

        PROCESS_BOM(10, "工序BOM"),
        KPSN_RULE(20, "关键件规则"),
        PART(30, "物料信息");


        private int value;
        private String description;

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

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

                return null;
            }
        }
    }

    /**
     * 数据履历 确认类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DATA_TRAVEL_CONFIRM_TYPE {
        SKILL_CONFIRM(10, "工技确认"),
        MANUFACTURING_CONFIRM(20, "制造确认");

        private int value;
        private String description;

        DATA_TRAVEL_CONFIRM_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 PRINT_QUEUE_TYPE {

        PACK_SN(10, "包装条码"),
        QUALITY_ASSURE(20, "质保书"),
        PROD_SN(30, "产品条码"),
        BIG_PROCESS(40, "大本体条码"),
        BIG_PACK_SN(50, "大包装条码");

        private int value;
        private String description;

        PRINT_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 PRINT_MODE {

        LODOP(10, "Lodop"),
        BAR_TENDER(20, "BarTender");

        private int value;
        private String description;

        PRINT_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 boolean checkValueIsValid(int value){
            if(StringUtils.isEmpty(valueOfDescription(value))) {
                return false;
            }
            return true;
        }
    }

    /**
     * 大包装条码绑定状态
     */
    public static enum PACKAGE_BIND_STATUS {
        BINGDING(10, "绑定"),
        UNBIND(20, "解绑");

        private int value;
        private String description;

        PACKAGE_BIND_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;
        }
    }
    /**
     * 援入援出明细项
     * 援入 内部援出 新人援出 外部援出 制造援出
     */
    public static enum ASSIST_OUT_AND_ENTER_DETAIL {
        ASSIST_ENTER(10, "援入"),
        IN_ASSIST_OUT(20, "内部援出"),
        NEWCOMER_ASSIST_OUT(30, "新人援出"),
        EXTERNAL_ASSIST_OUT(40, "外部援出"),
        MAKE_ASSIST_OUT(50, "制造援出");

        private int value;
        private String description;

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

    /**
     * 援入援出明细项
     * 援入 内部援出 新人援出 外部援出 制造援出
     */
    public static enum BU_ASSIST_OUT_AND_ENTER_DETAIL {
        ASSIST_ENTER(10, "援入"),
        IN_ASSIST_OUT(20, "内部援出"),
        NEWCOMER_ASSIST_OUT(30, "新人援出"),
        EXTERNAL_ASSIST_OUT(40, "外部援出");

        private int value;
        private String description;

        BU_ASSIST_OUT_AND_ENTER_DETAIL(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 static enum WORK_CENTER_GENERATE_TYPE {
        RELEASE_GENERATION(10, "下达生成"),
        STATION_GENERATION(20, "工位生成");

        private Integer value;
        private String description;

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

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

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

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

        public static String valueOfDescription(Integer value) {
            String tmp = null;

            for(int i = 0; i < values().length; ++i) {
                if (values()[i].value.equals(value)) {
                    tmp = values()[i].description;
                }
            }

            return tmp;
        }
    }

    /**
     * MesQManageTaskDetail Q管理作业点检类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_Q_MANAGER_CHECK_TYPE {

        ORDER_CHECK("order_check", "工单点检"),
        //WEEK_CHECK("week_check", "周点检"),
        MONTH_CHECK("month_check", "月点检");
        private String value;
        private String description;

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

    /**
     * 是否启用
     */
    public enum IS_ENABLE {
        ENABLE(1, "启用"),
        DISABLE(2, "禁用");

        private int value;
        private String description;

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

    /**
     * 生产数据JOB统计KEY
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum JOB_STATISTICS_PROD_DATA_KEY {
        SHIFT_PROD_MONTH_KEY("10", "month", "停开机数据按月分组KEY汇总工时 (生产线+班次+作业内容+作业类型+产品别+事业别+内容分类)"),
        SHIFT_PROD_DAY_KEY("20", "day", "停开机数据按日分组KEY汇总工时 (生产线+作业时间+班次+作业内容+作业类型+产品别+事业别)"),
        OUT_PUT_MONTH_KEY1("30", "month", "产量数据按月分组KEY汇总正常工单产量工数 (生产线+班次+物料+工单类型+产品别+事业别)"),
        OUT_PUT_DAY_KEY1("40", "day", "产量数据按日分组KEY汇总正常工单产量工数 (生产线+作业时间+班次+物料+工单类型+产品别+事业别)"),
        OUT_PUT_MONTH_KEY2("50", "month", "产量数据按月分组KEY汇总正常工单产量 (生产线+物料+工单类型+产品别+事业别)"),
        OUT_PUT_DAY_KEY2("60", "day", "产量数据按日分组KEY汇总正常工单产量 (生产线+作业时间+物料+工单类型+产品别+事业别)"),
        OUT_PUT_MONTH_KEY3("70", "month", "产量数据按月分组KEY汇总所有工单产量 (物料)");

        private String value;
        private String flag;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getFlag() {
            return flag;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * 生产数据推送通知业务
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PROD_DATA_PUSH_NOTIFY_STRATEGY_FLAG {

        ONE("1", "sxProdDataPushNotifyStrategyAssistOneService", "援进援出", "钉钉通知:某月各部门所有数据工时统计"),
        TWO("2", "sxProdDataPushNotifyStrategyAssistTwoService", "援进援出", "邮件通知:某月所有数据明细附件"),
        THREE("3", "sxProdDataPushNotifyStrategyAssistThreeService", "援进援出", "钉钉通知:某月各部门未确认数据统计"),
        FOUR("4", "sxProdDataPushNotifyStrategyAssistFourService", "援进援出", "邮件通知:某月各部门未确认数据明细附件"),
        FIVE("5", "sxProdDataPushNotifyStrategyProdRunConditionDingService", "生产推送", "钉钉通知:各产线、产品别达成率、综合能率"),
        SIX("6", "sxProdDataPushNotifyStrategyProdRunConditionEmailService", "生产推送", "邮件通知:各产线、产品别达成率、综合能率"),
        SEVEN("7", "sxProdDataPushNotifyStrategyAssistSevenService", "援入援出", "钉钉通知:上月所有数据明细推送至责任人和部长"),
        EIGHT("8", "sxProdDataPushNotifyStrategyAssistEightService", "援入援出", "邮件通知:上月所有数据明细推送至责任人和部长"),
        NINE("9", "sxProdDataPushNotifyStrategyAssistNineService", "援入援出", "钉钉通知:本月所有未确认数据明细推送至担当和责任人"),
        TEN("10", "sxProdDataPushNotifyStrategyAssistTenService", "援入援出", "邮件通知:本月所有未确认数据明细推送至担当和责任人"),
        ELEVEN("11", "sxProdDataPushNotifyStrategyAssistElevenService", "援入援出", "钉钉通知:根据责任部门推送上个月的数据汇总给对应的部长"),
        TWELVE("12", "sxProdDataPushNotifyStrategyAssistTwelveService", "援入援出", "邮件通知:根据责任部门推送上个月的数据汇总给对应的部长");

        private String flag;
        private String clazz;
        private String module;
        private String description;

        PROD_DATA_PUSH_NOTIFY_STRATEGY_FLAG(String flag, String clazz, String module, String description) {
            this.flag = flag;
            this.clazz = clazz;
            this.module = module;
            this.description = description;
        }

        public String getFlag() {
            return flag;
        }

        public String getClazz() {
            return clazz;
        }

        public String getModule() {
            return module;
        }

        public String getDescription() {
            return description;
        }

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

    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public static enum REWORK_RANGE_IS_BAND {
        YES(10, "已关联"),
        NO(20, "未关联");

        private int value;
        private String description;

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

        public String getValueStr() {
            return this.value + "";
        }

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

        private REWORK_RANGE_IS_BAND(int value, String description) {
            this.value = value;
            this.description = 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 static enum TREND_ANALYSIS {
        Q_MANAGE(10, "Q管理作业"),
        FIRST_ORDER(20, "工单首检"),
        EQUIP_CHECK(30, "设备点检");

        private int value;
        private String description;

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

        public String getValueStr() {
            return this.value + "";
        }

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

        private TREND_ANALYSIS(int value, String description) {
            this.value = value;
            this.description = 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 TREND_ANALYSIS getByValue(int value) {
            for (TREND_ANALYSIS matchType : values()) {
                if (matchType.getValue() == value) {
                    return matchType;
                }
            }
            return null;
        }
    }

    /**
     * 事业别相关配置数据类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CAREER_CORRELATION_CFG_DATA_TYPE {

        PROD_AMOUNT("10", "生产金额目标值"),
        PLAN_LOSS("20", "工场损失目标值"),
        COMPOSITE_RATE_TARGET("30", "综合能率目标");

        private String value;
        private String description;

        CAREER_CORRELATION_CFG_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 (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 SX_OFFICIAL_LOSS_TYPE {

        QUALITY("10", "品质报废"),
        PROJECT("20", "工程报废");

        private String value;
        private String description;

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

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

        INTRA(10, "社内"),
        OUTSIDE(20, "社外");

        private Integer value;
        private String description;

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

        public Integer 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 valueOfDescription(Integer val) {
            String tmp = null;
            for (int i = 0; i < values().length; i++) {
                if (Objects.equals(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 ASSIST_OUT_AND_ENTER_CONFIRM_LEVEL {

        TAKE_ON(10, "担当"),
        PERSON_IN_CHARGE(20, "责任人"),
        RESPONSIBLE_MINISTERGE(30, "责任部长");

        private Integer value;
        private String description;

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

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

    }

    /**
     * 绑定状态
     */
    public static enum BIND_STATUS {
        BINGDING(10, "绑定"),
        UNBIND(20, "解绑");

        private int value;
        private String description;

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


    /**
     * 绑定状态
     */
    public static enum CAREER_CORRELATION_CFG_DATA_DIMENSION {
        CAREER("10", "事业别"),
        CATEGORY("20", "产品别"),
        WORK_CENTER("30", "产线别");

        private String value;
        private String description;

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

        public static CAREER_CORRELATION_CFG_DATA_DIMENSION getByValue(String value) {
            for (CAREER_CORRELATION_CFG_DATA_DIMENSION matchType : values()) {
                if (matchType.getValue().equals(value)) {
                    return matchType;
                }
            }
            return null;
        }
    }

    /**
     * Q管理管理类型
     */
    public static enum Q_MANAGE_MANAGE_TYPE {
        COMPARE_TYPE("10", "比值类型"),
        RESULT_TYPE("20", "结果类型")
        ;

        private String value;
        private String description;

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

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

    /**
     * 扭矩规格值
     */
    public static enum TORQUE_SPEC_VALUE {
        ZERO_TO_TWENTY("10", "0~20 kgf cm"),
        TWENTY_TO_FORTY("20", "20~40 kgf cm"),
        FORTY_TO_SIXTY_NINE("30", "40~69 kgf cm")
        ;

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * mes 管理码使用状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MANAGE_USE_STATUS {

        OFFLINE(10, "下线"),
        ONLINE(20, "上线");

        private int value;
        private String description;

        MANAGE_USE_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 IS_MANUAL_REPORT {

        YES(10, "是"),
        NO(20, "否");

        private int value;
        private String description;

        IS_MANUAL_REPORT(int value, String description) {
            this.value = value;
            this.description = 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;
        }

        public static IS_MANUAL_REPORT getByValue(int value) {
            for (IS_MANUAL_REPORT codeType : values()) {
                if (codeType.getValue() == value) {
                    return codeType;
                }
            }
            return null;
        }

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 是 或 否
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum YES_OR_NO {

        YES(10, "是"),
        NO(20, "否");

        private int value;
        private String description;

        YES_OR_NO(int value, String description) {
            this.value = value;
            this.description = 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;
        }

        public static YES_OR_NO getByValue(int value) {
            for (YES_OR_NO codeType : values()) {
                if (codeType.getValue() == value) {
                    return codeType;
                }
            }
            return null;
        }

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 条码操作类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SN_OPERATE_TYPE {
        QUALIFIED(10, "合格"),
        REPAIR(20, "返修");

        private int value;
        private String description;

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

    /**
     * 检测类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CHECK_JUDGE_TYPE {

        RESULT_TYPE(10, "结果类型"),
        COMPARE_TYPE(20, "比值类型"),
        EQUIVALENCE_TYPE(30, "等值类型");
        private int value;
        private String description;

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

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

        public String getDescription() {
            return this.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 OQC_TYPE {
        NORMAL(10, "正常检验"),
        MANUAL(20, "手动检验");

        private int value;
        private String description;

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

    /**
     * JX出货检验操作方式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum OQC_MANAGE_ACTION_TYPE {
        SERIAL_NUMBER("10", "buQmsOqcBySnManageService", "buQmsOqcBySnGenService", "buQmsOqcBySnManualService", "buQmsOqcBySnManualGenService","", "成品检验"),
        ZJ("20", "buQmsOqcByZjManageService", "buQmsOqcByZjGenService", "buQmsOqcByZjManualService", "buQmsOqcByZjManualGenService","",  "组件检验");

        private String value;
        private String queryClass;
        private String execClass;
        private String queryClass2;
        private String execClass2;
        private String queryClass3;
        private String description;

        OQC_MANAGE_ACTION_TYPE(String value, String queryClass, String execClass, String queryClass2, String execClass2, String queryClass3, String description) {
            this.value = value;
            this.queryClass = queryClass;
            this.execClass = execClass;
            this.queryClass2 = queryClass2;
            this.execClass2 = execClass2;
            this.queryClass3 = queryClass3;
            this.description = description;
        }

        public String getValue() {
            return value;
        }

        public String getQueryClass() { return queryClass; }

        public String getExecClass() {
            return execClass;
        }

        public String getQueryClass2() { return queryClass2; }

        public String getExecClass2() { return execClass2; }

        public String getQueryClass3() {return queryClass3; }

        public String getDescription() {
            return description;
        }

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

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

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

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

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

    /**
     * 出货检验单据检验项结果
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum OQC_CHECK_DETAIL_RESULT {
        OK(10, "OK"),
        NG(20, "NG");

        private int value;
        private String description;

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

    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public static enum TRUE_OR_FALSE {
        TRUE(1, "是"),
        FALSE(2, "否");

        private int value;
        private String description;

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

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

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

        public String getValueStr() {
            return this.value + "";
        }

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

        public static int descriptionOfValue(String desc) {
            return descOf(desc);
        }
    }

    /**
     * 出货检验月报日报查询维度(数据)
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum REPORT_DIMENSION_CATEGORY_OR_SALESTO_OR_PART {

        CATEGORY_CODE3(10, "产品类别"),
        SALES_TO(20, "销售向"),
        PART_NO(30, "物料编码");

        private int value;
        private String description;

        REPORT_DIMENSION_CATEGORY_OR_SALESTO_OR_PART(int value, String description) {
            this.value = value;
            this.description = 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 MesExtEnumUtil.REPORT_DIMENSION_CATEGORY_OR_SALESTO_OR_PART getByValue(int value) {
            MesExtEnumUtil.REPORT_DIMENSION_CATEGORY_OR_SALESTO_OR_PART[] var1 = values();
            int var2 = var1.length;

            for (int var3 = 0; var3 < var2; ++var3) {
                MesExtEnumUtil.REPORT_DIMENSION_CATEGORY_OR_SALESTO_OR_PART dimension = var1[var3];
                if (dimension.getValue() == value) {
                    return dimension;
                }
            }
            return null;
        }

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * 报表查询维度(日期)
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum REPORT_DIMENSION_DAY_OR_MONTH_OR_YAER {

        YEAR(10, "年"),
        MONTH(20, "月"),
        DAY(30, "日");

        private int value;
        private String description;

        REPORT_DIMENSION_DAY_OR_MONTH_OR_YAER(int value, String description) {
            this.value = value;
            this.description = 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 int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * 报表查询维度(数据)
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum REPORT_DIMENSION_DATE_OR_CENTER {

        DATE(10, "日期"),
        CENTER(20, "生产线");

        private int value;
        private String description;

        REPORT_DIMENSION_DATE_OR_CENTER(int value, String description) {
            this.value = value;
            this.description = 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 MesExtEnumUtil.REPORT_DIMENSION_DATE_OR_CENTER getByValue(int value) {
            MesExtEnumUtil.REPORT_DIMENSION_DATE_OR_CENTER[] var1 = values();
            int var2 = var1.length;

            for (int var3 = 0; var3 < var2; ++var3) {
                MesExtEnumUtil.REPORT_DIMENSION_DATE_OR_CENTER dimension = var1[var3];
                if (dimension.getValue() == value) {
                    return dimension;
                }
            }
            return null;
        }

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public static enum OQC_BASE_TYPE {
        DECIMALISM(10, 10,"十进制"),
        HEXADECIMAL(20, 16,"十六进制");

        private int value;
        private int base;
        private String description;

        private OQC_BASE_TYPE(int value, int base, String description) {
            this.value = value;
            this.base = base;
            this.description = description;
        }

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

        public int getBase() {
            return this.base;
        }

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

        public String getValueStr() {
            return this.value + "";
        }

        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 baseOfValue(int val) {
            int tmp = 0;

            for (int i = 0; i < values().length; ++i) {
                if (values()[i].value == val) {
                    tmp = values()[i].base;
                }
            }

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

        public static int descriptionOfValue(String desc) {
            return descOf(desc);
        }
    }
}
