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

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

public class MesPcnExtEnumUtil {

    /**
     * MesOrderJob 单据状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WorkOrderTypeEnum {
        STANDARD_ORDER(10, "正常工单"),
        ATTEMPT_ORDER(20, "试制工单"),
        REWORK_ORDER(30, "返工工单");

        private int value;
        private String description;

        private WorkOrderTypeEnum(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;
        }
    }

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

    /**
     * 补件是否报工
     */
    @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;
        }
    }


    /**
     * 是否禁用
     */
    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;
        }
    }

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

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

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

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

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

    /**
     * 工单状态
     */
    @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;
        }
    }

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

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


    /**
     * MesOrderJob 单据状态
     */
    @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;

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

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

            return tmp;
        }

        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 COMMON_SN {
        CZ_NO("CZ_NO", "称重条码"),
        WC_NO("WC_NO", "PO条码"),
        OQC_NO("OQC_NO", "OQC条码"),
        TOQC_NO("TOQC_NO", "TOQC条码");

        private String code;
        private String description;
        int value;

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



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

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

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

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


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

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

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

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

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

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

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

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

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

    @JsonFormat(
            shape = JsonFormat.Shape.OBJECT
    )
    public static enum PRODUCE_SN_QC_STATUS {
        QUALIFIED(10, "合格"),
        DEFECTED(20, "不合格");

        private int value;
        private String description;

        private PRODUCE_SN_QC_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_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_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 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;
        }
    }

    @JsonFormat(
            shape = JsonFormat.Shape.OBJECT
    )
    public static enum MES_REPAIR_STATUS {
        REPAIRED(10, "已维修"),
        NO_REPAIR(20, "待维修"),
        NO_CONFIRM(30, "待确认");

        private int value;
        private String description;

        private MES_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 MES_WORK_CELL_TYPE {
        NORMAL(10, "正常"),
        REWORK(20, "返修"),
        ON_LINE(30, "上线工位");

        private int value;
        private String description;

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

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

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

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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


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

    }

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

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

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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


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

    }

    /**
     *  是否可重复
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum IS_REPEAT {

        REPEATABLE(1, "是"),
        NOT_REPEAT(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 IS_REPEAT getByValue(int value) {
            for (IS_REPEAT mesInsertExcel : values()) {
                if (mesInsertExcel.getValue() == value) {
                    return mesInsertExcel;
                }
            }
            return null;
        }


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

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

    }

    /**
     * mes 物料绑定记录结果
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MES_PRODUCE_SN_RESULT {

        OK(10, "OK");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    }

    /**
     * CHECK_RESULT 点检结果
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CHECK_RESULT {
        OK(10, "O"),
        NG(20, "X");

        private int value;
        private String description;

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

    /**
     * 打印队列数据类型
     */
    @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;
        }
    }


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

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

    /**
     * 包装封箱状态
     */
    @JsonFormat(
            shape = JsonFormat.Shape.OBJECT
    )
    public static enum PACKAGE_IS_SEALED {
        UNSEALED(1, "未封箱"),
        SEALED(2, "已封箱");

        private int value;
        private String description;

        private PACKAGE_IS_SEALED(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 PACKAGE_RECORD_TYPE {
        CONTAINER(10, "容器"),
        PACKAGE(20, "包装");

        private int value;
        private String description;

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

    /**
     * 物料类型 10=成品，20=半成品
     **/
    @JsonFormat(
            shape = JsonFormat.Shape.OBJECT
    )
    public static enum PACKAGE_PART_TYPE {
        FINISHED(10, "成品"),
        NO_FINISHED(20, "半成品");

        private int value;
        private String description;

        private PACKAGE_PART_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 IF_SYNC_STATUS {
        DOING(0, "正在写入"),
        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;
        }
    }

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

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

        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 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 this.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 GENERATION_METHOD {

        FROM_WORK_ORDER_START(10, "工单启动生成"),
        FROM_TIMING_TASK(20, "定时任务生成");

        private int value;
        private String description;

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

    /**
     * 出货检验类型
     */
    @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 确认
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ASSOCIATED_STATUS {

        CLOSE(10, "关联完成"),
        OPEN(20, "未关联完成");

        private int value;
        private String description;

        ASSOCIATED_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 PUT_PALLET_PROD_TYPE {
        PLC_WORK(10, "10", "PLC监听+人工装托模式"),
        AUTO_WORK(20, "20", "PLC监听+机械臂装托模式"),
        HAND_WORK(30, "30", "全人工模式");

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

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

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

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

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

        public static String codeOfDescription(String code) {
            String tmp = null;

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

            return tmp;
        }
    }

    /**
     * 产线托盘位置类型
     */
    public 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;
        }
    }

    /**
     * 包装打印状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PACKAGE_PRINT_STATUS {

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

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 24小时泄露检测结果
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DIVULGE_CHECK_RESULT {

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

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 条码绑定工单
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum EP_SN_BIND_ORDER_PROD_TYPE {

        SINGLE_BIND(10, "单个绑定"),
        BATCH_BIND(20, "区间批量绑定"),
        SINGLE_UNBIND(30, "单个解绑"),
        BATCH_UNBIND(40, "区间批量解绑");

        private int value;
        private String description;

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

    /**
     * 条码绑定工单
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum EP_PD_REVIEW_RESULT {

        OK(10, "合格"),
        NG(20, "不合格"),
        ERROR(30, "异常");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum EP_PUT_PALLET_PROD_TYPE {
        HAND_WORK(10, "10", "人工模式"),
        PLC_WORK(20, "20", "PLC模式");

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

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

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

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

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

        public static String codeOfDescription(String code) {
            String tmp = null;

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

            return tmp;
        }
    }

    /**
     * 物料类型2
     */
    public enum ORG_ZJ_REMADE_METHOD_CFG {
        BU("10", "sxSubassemblyRemadeCtNoService", "sxSubassemblyRemadePackageNoService", "BU工厂"),
        EP("20", "sxSubassemblyRemadePackageNoService", "sxSubassemblyRemadePackageNoService", "EP工厂");

        private String value;
        private String inSideClass;
        private String outSideClass;
        private String description;

        ORG_ZJ_REMADE_METHOD_CFG(String value, String inSideClass, String outSideClass, String description) {
            this.value = value;
            this.inSideClass = inSideClass;
            this.outSideClass = outSideClass;
            this.description = description;
        }

        public String getValue() {
            return value;
        }

        public String getInSideClass() {
            return inSideClass;
        }

        public String getOutSideClass() {
            return outSideClass;
        }

        public String getDescription() {
            return description;
        }

        public static String valueOfCalss(String val, String categoryCode2) {
            String tmp = null;
            if (StringUtils.isEmpty(categoryCode2) || StringUtils.isEmpty(CATEGORY_CODE_2.valueOfDescription(categoryCode2))) {
                return tmp;
            }
            val = StringUtils.isEmpty(val) ? ORG_ZJ_REMADE_METHOD_CFG.BU.getValue() : val;
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value.equals(val)) {
                    if (CATEGORY_CODE_2.INSIDE.getValue().equals(categoryCode2)) {
                        tmp = values()[i].inSideClass;
                    } else if (CATEGORY_CODE_2.OUTSIDE.getValue().equals(categoryCode2)) {
                        tmp = values()[i].outSideClass;
                    }
                }
            }
            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;
        }
    }

    /**
     * 审批状态
     */
    @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;
        }
    }

    /**
     * 绑定规则
     */
    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 WORK_CENTER_MOVTRN_STATUS {
        MOVTRN("0", "入立体库"),
        UN_MOVTRN("1", "不入立体库"),
        LOW_MOVTRN("2", "入平库");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public Integer getValueInt() {
            return Integer.valueOf(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 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 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;
        }
    }

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

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

        private int value;
        private String description;

        IS_WATER_PURIFIER(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_WATER_PURIFIER getByValue(int value) {
            for (IS_WATER_PURIFIER 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 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 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 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;
        }
    }

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

    /**
     * 扭矩管理检测结果
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TORQUE_MANAGE_CHECK_RESULT {

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

        private int value;
        private String description;

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

    /**
     * 管理码与工单条码关系状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MC_RECORD_SN_STATUS {
        LINE_ON(10, "管理码上线"),
        LINE_OFF(20, "管理码下线");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

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

    /**
     * 管理码与工单条码关系上线状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MC_RECORD_LINE_ON_STATUS {
        TRUE(10, "已上线"),
        FALSE(20, "半上线");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

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

    /**
     * 管理码与工单条码关系质量状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MC_RECORD_QC_STATUS {
        TRUE(10, "合格"),
        FALSE(20, "返修");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

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

    /**
     * 条码操作类型
     */
    @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 IS_UNFREEZE {

        BIND(10, "已解冻"),
        UNTYING(20, "未解冻");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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


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

    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum JX_PROD_BUSI_STRATEGY {
        COMMON(0, "通用处理", "jxProdBusiStrategyCommonService"),
        STANDARD_ORDER(10, "正常工单", "jxProdBusiStrategyStandardService"),
//        ATTEMPT_ORDER(20, "试制工单", "jxProdBusiStrategyAttemptService"),
        ATTEMPT_ORDER(20, "试制工单", "jxProdBusiStrategyStandardService"),
        REWORK_ORDER(30, "返工工单", "jxProdBusiStrategyRepairService");

        private int value;
        private String description;
        private String clazz;

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

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

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

        public String getClazz() {
            return this.clazz;
        }

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

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

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

            return tmp;
        }

    }


}
