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

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

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

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


    /**
     * 流程提交校验
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum GROUP_COMMIT_CHECK {
        DISABLE(1, "禁止提交"), CHECK_MOVE(2, "校验移动单"),
        NO_CHECK(3, "不校验"), CHECK_OLD_MOVE_NO(4, "校验是否已产生移动单");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 订单明细信息 是否免费
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum IS_FREE {
        CHARGING(1, "计费"), GRATIS(2, "免费");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 移库单主表：优先级
     */
    @Deprecated
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRIORITY {
        NORMAL(1, "正常"), URGENT(2, "紧急");
        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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


    /**
     * 移库单主表：优先级  (PRIORITY_NEW)
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRIORITY_NEW {
        URGENT(1, "紧急"), NORMAL(2, "正常");
        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 主表信息 单据类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ORDER_TYPE {
        REG(10, "REG", "原物料采购"),
        SUB(20, "SUB", "委外采购"),
        TAR(30, "TAR", "多角贸易采购"),
        TAP(40, "TAP", "多角代采购"),
        AMP(50, "AMP", "AMP收货"),
        INNER(60, "INNER", "内部收货");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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


    /**
     * 单据主表状态(ASN,PO,MOVE,QC,SO)
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MASTER_ORDER_STATUS {
        CREATE(10, "CREATE", "新建"),
        RECEIPT(20, "RECEIPT", "处理中"),
        RECEIPT_FINISH(30, "RECEIPT_FINISH", "已完成"),
        CLOSED(40, "CLOSED", "已关闭"),
        CANCELLED(50, "CANCELLED", "已取消"),
        BATCHING_FINISH(60, "BATCHING_FINISH", "配料完成");

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

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


        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

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

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

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


    /**
     * 单据主表状态(ASN,PO,MOVE,QC,SO)
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PICKING_MASTER_ORDER_STATUS {
        CREATE(10, "CREATE", "新建"),
        RECEIPT(20, "RECEIPT", "已生成"),
        FAILED(30, "RECEIPT_FINISH", "生成失败");

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

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

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

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

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

        public static String valueOfDescription(int val) {
            return valueOf(val);
        }
    }
    /**
     * 收货状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum REC_STATUS_KANBAN {
        TO_BE_RECEIVED(10, "TO_BE_RECEIVED", "待收货"),
        RECEIVING(20, "RECEIVING", "收货中"),
        DELAYED_NON_RECEIPT(30, "DELAYED_NON_RECEIPT", "延迟"),
        COMPLETED(40, "COMPLETED", "已完成");

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

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

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

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

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

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

    /**
     * 订单明细状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ORDER_DETAILS_STATUS {
        CREATE(10, "CREATE", "创建"),
        PROCESSING(50, "PROCESSING", "发运中"),
        RECEIPTED(20, "FINISHED", "已完成"),
        CANCEL(30, "CANCLE", "行取消"),
        PRINTED(40, "PRINTED", "已打印");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

        public static String valueOfDescription(int val) {
            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 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;
        }

    }

    /**
     * 单据条码状态（PO/DOC_MOVE）
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ORDER_SN_STATUS {
        CREATE(10, "N", "创建"),
        RECEIPTED(20, "R", "已完成"),
        CANCEL(30, "C", "行取消"),
        PRINTED(40, "C", "已打印");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

    /**
     * 产品入库，发运状态
     * WMS_产品报工明细信息 ：单据状态
     * WMS_发泡打箱包装
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRODUCT_INSTOCK_STATUS {
        CREATE(10, "创建"), FINISH(20, "已处理"), FAIL(30, "处理出错"), CREATE_DOCMOVE(40, "生成移库单"), PULL_FAIL(50, "拉动出错");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 条码打印状态  （库存条码打印字段使用）
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRINT_STATUS {
        PRINTED(1, "已打印"), NOPRINT(2, "未打印"), GENERATE(3, "退料生成条码");

        private int value;
        private String description;

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

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

    /**
     * 库位类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum LOCATE_TYPE {
        COLLECT_LOCATE(10, "I", "收货库"),
        BASICS_LOCATE(20, "P", "基础库"),
        MANEUVER_LOCATE(30, "R", "机动库"),
        COMBINATION_LOCATE(40, "D", "组合库"),
        LINE_LOCATE(50, "L", "线边库"),
        NC_LOCATE(60, "N", "NC库"),
        SPILLAGE_LOCATE(70, "Y", "溢料库"),
        TRANSIT_LOCATE(80, "T", "在途库"),
        UTENSIL_LOCATE(90, "U", "器具库"),
        OPERATION_PALTFORM(100, "W", "工作台"),
        CUST_LOCATE(110, "CUST", "客户库位");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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

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

    /**
     * 库位状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum LOCATE_STATUS {
        EMPTY(10, "空库位"), NOT_EMPTY(20, "非空"), FULL(30, "已满");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 移库单移动类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum OUT_MOVEMENT_MOVE_TYPE {
        IN_STORE(10, "IN", "入库"),
        OUT_STORE(20, "OUT", "出库"),
        MOVE_STORE(30, "MOVE", "移库"),
        OTHER(40, "OTHER", "其他"),
        NC_HANDLE(50, "NC_HANDLE", "NC处理");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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

    /**
     * 移库单业务类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum OUT_MOVEMENT_BUSI_TYPE {
        PRODUCTION_MATERIAS(10, "PROD_MATERIALS", "生产领料"),
        CUSTOMER_SHPING(20, "CUS_SHPING", "客户发运"),
        OUTWARD_SHIPMENT(30, "OUT_SHIPMENT", "委外发运"),
        ALLOCATION(40, "ALLOCATION", "调拨"),
        SCATTERED_OUT(50, "SCATTERED_OUT", "零星出库"),
        SCATTERED_IN(60, "SCATTERED_IN", "零星入库"),
        NC_WAREHOSING_IN(70, "NC_WAREHOSING", "NC入库"),
        SUPPLIER_RETURN(80, "SUPPLIER_RETURN", "供应商退货"),//默认DMR
        CUSTOMER_RETURN(90, "CUSTOMER_RETURN", "客户退货"),
        PRODUCT_RETURN(100, "PRODUCT_RETURN", "生产退料"),
        INSTRUCTION_MOVE(110, "INSTRUCTION_MOVE", "指令移库"),
        SCRAPPING_OUT(120, "SCRAPPING_OUT", "报废出库"),
        RECEIVING_IN(130, "RECEIVING_IN", "收货入库"),
        OUTSOURCING_BACK(140, "OUTSOURCING_BACK", "委外退回"),
        NC_WAREHOSING_OUT(150, "NC_WAREHOSING_OUT", "NC出库"),
        SUPPLIER_RETURN_SMRR(190, "SUPPLIER_RETURN_SMRR", "供应商退货(SMRR)"),
        NC_DISMANTLING_PICKING(160, "NC_DISMANTLING_PICKING", "NC拆解领料"),
        NC_DISMANTLING_RETREAT(170, "NC_DISMANTLING_RETREAT", "NC拆解退料"),
        LINE_EDGE_SCRAPPING_OUT(180, "LINE_EDGE_SCRAPPING_OUT", "线边报废出库"),
        ASN(200, "ASN", "ASN"),
        PO(210, "PO", "PO"),
        QC(220, "QC", "QC"),
        AMPR(230, "AMPR", "AMPR"),
        FINISHGOODS(240, "FINISHGOODS", "VDA生产快速入库"),
        VDA_REPORT(250, "VDA_REPORT", "VDA生产报工"),
        VDA_PR_INSTOCK(260, "VDA_PR_INSTOCK", "VDA生产推荐入库"),
        VDA_PICKING_GOODS(270, "VDA_PICKING_GOODS", "VDA生产领料"),
        VDA_ONE_PICKING_GOODS(280, "VDA_ONE_PICKING_GOODS", "VDA单箱领料"),
        VDA_QC(290, "VDA_QC", "VDA质检"),
        VDA_SN_SPLIT(300, "VDA_SN_SPLIT", "VDA物料拆分"),
        VDA_SN_MERGE(310, "VDA_SN_MERGE", "VDA物料合并"),
        RECEPTION(320, "RECEPTION", "让步接收"),
        SCRAP(330, "SCRAP", "报废"),
        QUARANTINE(340, "QUARANTINE", "隔离"),
        BACK_QUARANTINE(350, "BACK_QUARANTINE", "反隔离"),
        DEFINITE_FAIL(360, "DEFINITE_FAIL", "不合格"),
        RETURN(370, "RETURN", "退货"),
        REWORK(380, "REWORK", "返工"),
        MISCALCULATION(390, "MISCALCULATION", "误判"),
        SORTING(400, "SORTING", "分选"),
        VDA_STATIC_CS(410, "VDA_STATIC_CS", "静态盘点"),
        VDA_CS_SEARCH(420, "VDA_CS_SEARCH", "VDA盘点查询"),
        DEFINITE(430, "DEFINITE", "合格"),
        VDA_PACKAGE_MANAGE(440, "VDA_PACKAGE_MANAGE", "VDA编组管理"),
        KT_PURCHASE_RC(450, "KT_PURCHASE_RC", "采购收货"),
        KT_PACK_RC(460, "KT_PACK_RC", "坤泰包装收货"),
        FINISH_PRODUCT_SHPING(470, "FINISH_PRODUCT_SHPING", "成品发运"),
        FINISH_PRODUCT_SHPING_NEW(480, "FINISH_PRODUCT_SHPING_NEW", "成品发运-新业务类型"),
        KT_PICK_RC(480, "KT_PICK_RC", "坤泰拣货"),
        PRODUCE_INSTOCK(490, "PRODUCE_INSTOCK", "VDA生产入库"),
        UTENSIL_CONSUMING(500, "UTENSIL_CONSUMING", "器具领用"),
        TG_PICKING_GOODS(510, "TG_PICKING_GOODS", "TG生产领料"),
        EXTERNAL_PULL(520, "EXTERNAL_PULL", "外部拉动"),
        LOADING_ORDER(530, "LOADING_ORDER", "装车单"),
        SALE_ON_WAY(540, "SALE_ON_WAY", "销售在途"),
        FORK_INSTORE(550, "FORK_INSTORE", "叉车入库"),
        CONTAINER_OUTSTORE(560, "CONTAINER_OUTSTORE", "AGV料车出库"),
        CONTAINER_INSTORE(570, "CONTAINER_INSTORE", "AGV料车入库"),
        AGV_PART_NO_OUT(580, "AGV_PART_NO_OUT", "AGV物料出库"),
        FORKLIFT_PART_NO_OUT(590, "FORKLIFT_PART_NO_OUT", "PAD物料出库"),
        INTERNAL_SHIPPING(600, "INTERNAL_SHIPPING", "内部发运"),
        ASSEMBLY_DISASSEMBLY_STORAGE(610, "ASSEMBLY_DISASSEMBLY_STORAGE\n", "总成拆解入库"),
        INTERNAL_WORK_ORDER_MATERIAL_STORAGE(620, "INTERNAL_WORK_ORDER_MATERIAL_STORAGE", "内部工单物料入库"),
        PART_NUMBER_CONVERSION_MATERIAL_STORAGE(630, "PART_NUMBER_CONVERSION_MATERIAL_STORAGE", "零件号转化物料入库"),
        PART_NUMBER_CONVERSION_MATERIAL_OUT_STOCK(640, "PART_NUMBER_CONVERSION_MATERIAL_OUT_STOCK", "零件号转化物料出库"),
        INTERNAL_WORK_ORDER_MATERIAL_OUT_STOCK(650, "INTERNAL_SHIPPING", "内部工单物料出库"),
        CUSTOMER_RETURN_SCRAP(660, "CUSTOMER_RETURN_SCRAP", "客户退货报废"),
        MATERIAL_SCRAP(670, "MATERIAL_SCRAP", "物料报废"),
        PROD_SCRAP(680, "PROD_SCRAP", "生产报废"),
        OUT_RETURN_SOURCING(690, "OUT_RETURN_SOURCING", "委外返工发料"),
        OUT_RETURN_RECOVER(700, "OUT_RETURN_RECOVER", "委外返工收回"),
        WITHOUT_PRICE_CENTER_OUT(710, "WITHOUT_PRICE_CENTER_OUT", "无成本中心出库"),
        WITHOUT_PRICE_CENTER_IN(720, "WITHOUT_PRICE_CENTER_OUT", "无成本中心入库"),
        OTHER_IN(730, "OTHER_IN", "其它入库"),
        OTHER_OUT(740, "OTHER_OUT", "其它出库"),
        COGI_BALANCE(750, "COGI_BALANCE", "COGI调账入库"),
        SUPPLIER_STD_RETURN(760, "SUPPLIER_STD_RETURN", "供应商退货"),
        COGI_BALANCE_OUT(770, "COGI_BALANCE", "COGI调账出库");//默认DMR

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

        public static OUT_MOVEMENT_BUSI_TYPE codeOfs(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }

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

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


    /**
     * 物料：分类（ABC）
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PART_ABC {
        A(1, "A"),
        B(2, "B"),
        C(3, "C"),
        D(4, "D"),
        E(5, "E");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 外部单据：关联单据类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum LINK_ORDER_TYPE {
        ASN("ASN", "ASN"),
        PO("PO", "PO"),
        SO("SO", "SO"),
        MOVE("MOVE", "移库单"),
        IN_STOCK("IN_STOCK", "入库单"),
        SHIPPING("SHIPPING", "发运单"),
        QC("QC", "质检"),
        CS("CS", "盘点"),
        DR("DR", "直送收货"),
        AMPR("AMPR", "AMP拉动收货"),
        OPENING("OPENING", "开口合同");

        private String value;
        private String description;

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

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return value;
        }

        public String getValue() {
            return value;
        }

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

        public static String getDes(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 OP_TYPE_CODE {
        RC("RC", "收货"),
        QC("QC", "质检"),
        PICK("PICK", "拣货"),
        OUTSTOCK("OUTSTOCK", "出库"),
        INSTOCK("INSTOCK", "入库"),
        MOVESTOCK("MOVESTOCK", "移库"),
        CS("CS", "盘点"),
        VDARC("VDARC", "VDA收货"),
        VDAINSTOCK("VDAINSTOCK", "VDA入库"),
        VDAMOVESTOCK("VDAMOVESTOCK", "VDA内部移库"),
        VDA_FAST_STOCK("VDA_FAST_STOCK", "VDA采购快速入库"),
        VDAREPORT("VDAREPORT", "VDA生产报工"),
        VDA_FINISH_GOODS("VDA_FINISH_GOODS", "VDA生产快速入库"),
        VDA_PICKING_GOODS("VDA_PICKING_GOODS", "VDA生产领料"),
        VDA_NC_FREEZE("VDA_NC_FREEZE", "VDA_NC冻结"),
        VDA_ONE_PICKING_GOODS("VDA_ONE_PICKING_GOODS", "VDA单箱领料"),
        VDA_NC_UN_FREEZE("VDA_NC_UN_FREEZE", "VDA_NC解冻"),
        VDA_PART_BOXING_ERROR_PROOFING("VDA_PART_BOXING_ERROR_PROOFING", "VDA装箱防错"),
        VDA_SN_SPLIT("VDA_SN_SPLIT", "VDA条码拆分"),
        VDA_SN_MERGE("VDA_SN_MERGE", "VDA条码合并"),
        VDA_SCAN_QUERY("VDA_SCAN_QUERY", "VDA扫描查询"),
        VDA_TRANSACTION_QUERY("VDA_TRANSACTION_QUERY", "VDA事务查询"),
        VDA_STATIC_CS("VDA_STATIC_CS", "VDA静态盘点"),
        VDA_PACKAGE_MANAGE("VDA_PACKAGE_MANAGE", "VDA编组管理"),
        KT_PICK_RC("KT_PICK_RC", "坤泰拣货"),
        UTENSIL_CONSUMING("UTENSIL_CONSUMING", "器具领用"),
        TG_PICKING_GOODS("TG_PICKING_GOODS", "TG生产领料"),
        INTELLIGENT("INTELLIGENT", "智能化");
        private String value;
        private String description;

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

        public String getCode() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getValue() {
            return value;
        }
    }

    /**
     * 作业组件参数：组件执行方法名称
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MODULE_METHOD_NAME {
        EXECUTE("execute", "执行方法"),
        GETOPTIONS("getOptions", "流程初始化方法"),
        PROMPT("prompt", "初始化方法"),
        GETLIST("getList", "获取列表数据"),
        DOCOMPLETE("doComplete", "执行完成方法"),
        SHOWINFORMATION("showInformation", "回显方法"),
        INSTALL("install", "安装组件"),
        UNINSTALL("unInstall", "卸载组件");
        private String value;
        private String description;

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

        public String getCode() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getValue() {
            return value;
        }

        public static MODULE_METHOD_NAME codeOf(String value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (StringUtils.equalsIgnoreCase(values()[i].value, value)) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }


    /**
     * 作业任务状态、移库单条码操作状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TASK_INFO_STATUS {
        CREATE(10, 10, "创建"), HANDLEING(20, 20, "处理中"),
        FINISH(30, 30, "已处理"), CLOSE(40, 40, "已关闭");

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

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

        public int getValue() {
            return value;
        }

        public int getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

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

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

        public static TASK_INFO_STATUS codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }


    /**
     * 业务表：库存条码状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum STOCK_SN_STATUS {
        CREATE(10, "创建"),
        QUALITY_CONTROL(20, "质检中"),
        PRE_INSTOCK(30, "待入库"),
        INSTOCKED(40, "入库"),
        PICKED(50, "配料"),
        OUT_STOCK(60, "出库"),
        SCRAP(70, "报废"),
        COMMING(80, "在途");

        private int value;
        private String description;

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

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

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

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


    /**
     * 业务表：库存条码状态
     * 10=创建，20=质检中，30=待入库，40=入库，50=配料，60=出库，70=报废，80=在途
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CARRIAGE_STATUS {
        CREATE(10, "创建"),
        PUBLISH(20, "已发布"),
        RECEIVE(30, "承运商接收"),
        ARRIVE(40, "车辆到达"),
        INSTALL(50, "装车完成"),
        CARRIAGE_IN(60, "运输中"),
        CLOSE(70, "已关单");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

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

    /**
     * 单据是否生成任务状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum IS_GENERAL_TASK {
        CREATE(10, "CREATE", "创建"),
        INIT(20, "INIT", "初始化"),
        IS_GENERAL(30, "IS_GENERAL", "已生成"),
        NO_GENERAL(40, "NO_GENERAL", "不生成"),
        CANCEL(50, "CANCEL", "撤销");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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

    /**
     * 业务表：库存条码质检状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum STOCK_SN_QC_STATUS {
        NORMAL(10, "NORMAL", "合格"), ABNORMAL(20, "ABNORMAL", "不合格"),
        ISOLATED(30, "ISOLATED", "隔离"), FRAZE(40, "FRAZE", "报废");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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

        public static STOCK_SN_QC_STATUS codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 盘点主表 单据类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CS_STRATEGY_TYPE {
        MATERIAL_PART_COVERAGE(110, "物料分类覆盖"),
        TOUCH(120, "动碰"),
        ZORE_STOCK(130, "零库存"),
        MATERIAL_COVERAGE(140, "物料覆盖");
        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 盘点主表 单据类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CS_ORDER_TYPE {
        DAY_INVENTORY(10, "日常盘点"),
        MONTH_INVENTORY(20, "月度盘点"),
        SEASON_INVENTORY(30, "季度盘点"),
        YEAR_INVENTORY(40, "年度盘点"),
        AJUST_INVENTORY(50, "库存调整盘点"),
        PART_COVERAGE(110, "物料分类覆盖"),
        TOUCH(120, "动碰"),
        ZORE_STOCK(130, "零库存"),
        MATERIAL_COVERAGE(140, "物料覆盖"),
        CHECK(150, "点检");

        private int value;
        private String description;

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

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

    /**
     * 盘点主表 盘点状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CS_ORDER_STATUS {
        CREATE(10, "CREATE", "创建"),
        STARTING_INVENTORY(20, "STARTING_INVENTORY", "开启盘点"),
        IN_INVENTORY(30, "IN_INVENTORY", "盘点中"),
        INVENTORY_FINISH(40, "INVENTORY_FINISH", "盘点完成"),
        THAWING(50, "THAWING", "已解冻"),
        CLOSED(60, "CLOSED", "已关闭");

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

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

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 盘点冻结 处理状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CS_TRANS_STATUS {
        CREATE(10, "已创建"),
        INVENTORY(20, "已盘"),
        FROZEN(30, "已冻结"),
        THAWING(40, "已解冻"),
        RETURN_GOODS(50, "取消冻结"),
        UNSETTLED_NCUNFREEZE(60, "未盘解冻");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 盘点实盘 处理状态;质检操作明细状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CS_ITEM_STATUS {
        CREATE(10, "创建"), FINISH(20, "已处理");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 库存移动单状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MOVE_ORDER_STATUS {
        CREATE(10, "创建"),
        BE_HANDLE(20, "待处理"),
        FINISH(30, "已处理"),
        HANDLE_ERROR(40, "处理出错");

        private int value;
        private String description;

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

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

    /**
     * 库存移动单状态状态:10=新建,20=已处理,30=处理出错
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WMSSHIPPING_ORDER_STATUS {
        CREATE(10, "新建"),
        PENDING(20, "已处理"),
        ERROR(30, "处理出错");

        private int value;
        private String description;

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

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

    /**
     * 库存移动单明细状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MOVE_ORDER_DETAILS_STATUS {
        CREATE(10, "创建"),
        BE_HANDLE(20, "待处理"),
        FINISH(30, "已处理");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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


    /**
     * 质检业务状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum QC_STATUS {
        INSPECTION_FREE(10, "免检"),
        PENDING_QUALITY_INSPECTION(20, "待质检"),
        DELAYED_NON_QC(40, "延迟"),
        QUALITY_INSPECTION_COMPLETED(30, "质检完成");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 质检业务状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum QC_INFO_STATUS {
        CREATE(10, "新建"),
        FINISH(20, "处理中"),
        FAIL(30, "已完成"),
        CLOSE(40, "已关闭"),
        CANCEL(50, "已取消");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 质检明细状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum QC_ITEM_STATUS {
        NORMAL(10, "正常"),
        CANCELLATION(20, "已处理");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    }

    /**
     * 质检业务类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum QC_INFO_TYPE {
        FEED(10, "进料检验"),
        ONLINE(20, "在线检验"),
        EMDPRODUCT(30, "成品检验"),
        SHIPMENTS(40, "出货检验");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 作业记录参数状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ALD_EXECUTE_STATUS {
        CREATE(10, "创建"),
        PROCESSING(20, "处理中"),
        COMPLETED(30, "已完成");
        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 作业流程动作类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ACTION_GROUP_DETAILS_VALUE_TYPE {
        ONETIMEONLY(10, "只输入一次"),
        MANYTIME(20, "输入多次"),
        MAYTIMEUNIQUE(30, "输入多次不允许重复"),
        ACTIONFINISH(40, "本流程结束");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 作业步骤处理组件参数类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ACTION_MOUDULE_PARAM_TYPE {
        CHECKLIST(1, "可选列表"),
        NUMBER(10, "数字"),
        STRING(20, "字符串"),
        CONFIGURABLE_STR(25, "可配字符串"),
        OUT_OR_UNNECESSARY(30, "出参或者不必需的参数");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 组件扫描单号 单据类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RC_ORDER_TYPE {
        PO(10, "PO"),
        ASN(20, "ASN");

        private int value;
        private String description;

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

    /**
     * 打印单号数据类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRINT_ORDER_TYPE {
        PO(10, "PO"),
        ASN(20, "ASN"),
        MOVEMENT(30, "MOVEMENT");

        private int value;
        private String description;

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

    /**
     * 组件统一返回提示
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RC_RESPONSE_TIPS {

        OK(1, true, "正确"),
        NG(2, false, "失败");

        private int value;
        private boolean codeStatus;
        private String description;

        RC_RESPONSE_TIPS(int value, boolean codeStatus, String description) {
            this.value = value;
            this.codeStatus = codeStatus;
            this.description = description;
        }

        public int getValue() {
            return value;
        }

        public boolean getCodeStatus() {
            return codeStatus;
        }

        public String getDescription() {
            return description;
        }

    }

    /**
     * 流程管家中触发源
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ACTION_BUTLER_SOURCE {

        SCANNER(10, "扫描枪"),
        SUBMIT(20, "提交按钮"),
        RESET(30, "重置按钮"),
        CHECK_DETAILS(40, "查看明细"),
        DELETE_DETAILS(50, "明细(删除)"),
        CLEAR_DETAILS(60, "明细（清空）"),
        CUSTOM_BUTTON(70, "自定义按钮"),
        MAGNIFIER(80, "放大镜");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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


    /**
     * 组件类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum AM_TYPE {

        PROCESS_HANDLING(10, "流程处理组件"),
        PROCESS_INITIALIZATION(20, "流程初始化组件"),
        PROCESS_COMMIT(30, "流程提交组件"),
        DETAIL_PROCESS(40, "明细处理组件"),
        BACK_DISPLAY(50, "回显方法"),
        PROCESS_END(60, "流程结束组件");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 条码类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SN_TYPE {
        ONE_DIMENSIONAL_CODE(10, "1D"),
        QR_CODE(20, "2D"),
        ALL(30, "ALL");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static String 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;
        }
    }

    /**
     * 流程明细动作类型
     * 10=交互动作,20=后台动作,30=提交动作
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum AGD_VALUE_TYPE {
        INTERACTIVE_ACTION(10, "交互动作"),
        BACKSTAGE_ACTION(20, "后台动作"),
        SUBMIT_ACTION(30, "提交动作"),
        SELECT_ACTION(40, "选择动作");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 成功标志枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum AM_OK_VALUE {

        IS_TRUE(10, true, "成功"),
        IS_FALSE(20, false, "失败");

        private int value;
        private boolean codeValue;
        private String description;

        AM_OK_VALUE(int value, boolean codeValue, String description) {
            this.value = value;
            this.codeValue = codeValue;
            this.description = description;
        }

        public int getValue() {
            return value;
        }

        public boolean getCodeValue() {
            return codeValue;
        }

        public String getDescription() {
            return description;
        }

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

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

    }

    /**
     * 通用序号编码枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum COMMON_SEQ {
        TASK_MV_ORDERNO("TASK_MV_ORDERNO", "作业任务移动单号"),
        ROUTING_SEQ("ROUTING_SEQ", "物料路线序号"),
        LOCATE_SEQ("LOCATE_SEQ", "库位序号"),
        OP_SEQ("OP_SEQ", "作业类型序号"),
        TRAN_SEQ("TRAN_SEQ", "交易类型序号"),
        STEP_SEQ("STEP_SEQ", "步骤调用序号"),
        MOVE_ORDER_NO("MOVE_ORDER_NO", "移库单单号"),
        QC_ORDER_NO("QC_ORDER_NO", "质检单单号"),
        CHECK_ORDER_NO("CHECK_ORDER_NO", "盘点主表序号"),
        INITIALIZE_SN("INITIALIZE_SN", "库存初始化"),
        IMPORT_DATA_MODEL_NO("IMPORT_DATA_MODEL_NO", "导入数据库文档模板单号");

        private String code;
        private String description;
        int value;

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

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 通用条码枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum COMMON_SN {
        PO_SN("PO_SN", "PO条码"),
        VDA_SN("VDA_SN", "VDA条码"),
        SELF_SN("SELF_SN", "自制件条码");

        private String code;
        private String description;
        int value;

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

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 可选项类型枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum OPTION_TYPE {
        OPTIONS(10, "OPTIONS", "可选项"),
        BUTTON(20, "BUTTON", "按钮");

        private String code;
        private String description;
        int value;

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

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 数据对象枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DATA_OBJ_TYPE {
        WAREHOUSE(10, "WAREHOUSE", "仓库对象"),
        ZONE(20, "ZONE", "存储区对象"),
        LOCATE(30, "LOCATE", "库位对象"),
        MATERIAL(40, "MATERIAL", "物料对象"),
        TRANS_TYPE(50, "TRANS_TYPE", "交易代码对象"),
        BUSI_TYPE(60, "BUSI_TYPE", "业务类型对象"),
        BUSI_OPERATION_TYPE(70, "BUSI_OPERATION_TYPE", "业务操作对象"),
        BH_CHECK_TYPE(80, "BH_CHECK_TYPE", "检测大类对象");

        private String code;
        private String description;
        int value;

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

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

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

        public static DATA_OBJ_TYPE codeOf(Integer val) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == val) {
                    return values()[i];
                }
            }
            return null;
        }
    }

    /**
     * 数据操作枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DATA_OBJ_OP_TYPE {
        ADD(10, "ADD", "新增"),
        DEL(20, "DEL", "删除"),
        UPD(30, "UPD", "修改"),
        QUERY(40, "QUERY", "查询");

        private String code;
        private String description;
        int value;

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

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 库存交易记录生成标记
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TRANS_QUAN_GENERAL_TAG {
        SRC(-1, "SRC", "一条：负"), ZERO(0, "ZERO", "一条：0"), DEST(1, "DEST", "一条：正"), TWO(2, "TWO", "两条：一正一负");

        private String code;
        private String description;
        int value;

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

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 数据状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DATA_STATUS {
        YES(1, "TRUE", "fa fa-success cell-fa fa-check"),
        NO(2, "FALSE", "fa fa-disabled cell-fa fa-times-circle");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

        //取反
        public static int getInvertValue(int val) {
            return val == 1 ? 2 : 1;
        }
    }

    /**
     * 打印模板
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRINT_TEMPLATE {
        SN_PRINT_TEMPLATE(10, "SN_PRINT_TEMPLATE", "条码打印模板"),
        ORDER_PRINT_TEMPLATE(20, "ORDER_PRINT_TEMPLATE", "订单打印模板"),
        RC_BACK_PRINT_TEMPLATE(30, "RC_BACK_PRINT_TEMPLATE", "收货回执打印模板");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

    /**
     * 版本号
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum VERSION {
        PO_VERSION(10, "VERSION", "PO版本号");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

    /**
     * 包装类型枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PACKAGE_TYPE {
        BOX(10, "BOX", "BOX（盒）"),
        CARTON(20, "CARTON", "CARTON（箱）"),
        PALLET(30, "PALLET", "PALLET（栈板）"),
        CONTAINER(40, "PALLET", "PALLET（集装箱）"),
        FEEDER(50, "FEEDER", "料架");

        private String code;
        private String description;
        int value;

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

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        public static String 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;
        }
    }

    /**
     * NC处理 操作类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum NC_HANDLE_BUSI_TYPE {
        RECEPTION(10, "RECEPTION", "让步接收"),
        SCRAP(20, "SCRAP", "报废"),
        QUARANTINE(30, "QUARANTINE", "隔离"),
        BACK_QUARANTINE(40, "BACK_QUARANTINE", "反隔离"),
        DEFINITE_FAIL(50, "DEFINITE_FAIL", "不合格");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

    /**
     * NC处理 操作类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BUSI_OPERATION_TYPE {
        //收货改数
        GOODS_CHANGE_NUMBER(10, "GOODS_CHANGE_NUMBER", "收货改数");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

    /**
     * 盘点物料 是否调差
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CS_IS_ADJUST {
        IS_ADJUST(1, "是调差"), ADJUST(2, "否调差");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 单据是否散件
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum IS_PART {
        IS_ADJUST(1, "散件"), ADJUST(2, "非散件");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 单据是否指定条码
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum IS_CHECK_SN {
        IS_APPOINT_SN(1, "指定条码"), APPOINT_SN(2, "不指定条码");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 脚本类型
     * 10=组件脚本，20=表单脚本，30=报表脚本，40=JOB脚本，50=其他脚本
     */
    public enum SCRIPT_TYPE {
        MODUAL(10, "Modual", "组件脚本"),
        FORM(20, "Form", "表单脚本"),
        REPORT(30, "Report", "报表脚本"),
        JOB(40, "Job", "JOB脚本"),
        OTHER(50, "Other", "其他脚本");

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

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

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 脚本语言类型
     * 10=Groovy, 20=Jython, 30=JavaScript, 40=Scala, 50=JRuby
     */
    public enum LANGUAGE_TYPE {
        GROOVY(1, "Groovy", 10),
        PYTHON(2, "jython", 20), // "jython" string can not change
        JS(3, "JavaScript", 30);
        // 下面这2种语言没人会写，暂不支持
        //SCALA(40,"scala"),
        //JRUBY(50,"jruby");

        private int index;
        private String description;
        private int value;

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

        public String getDescription() {
            return description;
        }

        public int getIndex() {
            return this.index;
        }

        public int getValue() {
            return value;
        }

        // 根据枚举编号获取语言代码
        public static String getCodeByIndex(Integer index) {
            for (LANGUAGE_TYPE languageType : LANGUAGE_TYPE.values()) {
                if (languageType.getValue() == index) {
                    return languageType.getDescription();
                }
            }

            return null;
        }
    }

    /**
     * 系统参数类型
     * 1.SYSTEM：系统参数
     * 2.BUSI：业务参数
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WMS_CONFIG_TYPE {

        SYSTEM(10, "系统参数", "系统参数"),
        BUSI(20, "业务参数", "业务参数");

        private int value;
        private String name;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getName() {
            return name;
        }

        public String getDescription() {
            return description;
        }

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

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

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

    /**
     * 系统配置值类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WMS_CONFIG_VALUE_TYPE {
        CHECKLIST(10, "可选列表"),
        NUMBER(20, "数字"),
        STRING(30, "字符串");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 是否条码管控（用于物料）
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum IS_SN_CONTROL {
        SN_CONTROL(1, "条码管控"), NOT_SN_CONTROL(2, "非条码管控");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 几步法
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum STEP {
        ONE_STEP(1, "一步法"), TWO_STEP(2, "两步法");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 外部单据：关联单据类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum IMPORT_ORDER_TYPE {
        PO("1", "PO", "要货计划"),
        ASN("2", "ASN", "ASN"),
        INSTRUCTIONS("3", "INSTRUCTIONS", "指令"),
        SCATTERED_OUT("C00", "C00", "零星出库指令"),
        SCATTERED_INT("C01", "C01", "零星入指令"),
        NC_DISMANTLING_PICKING("C02", "C02", "NC拆解领料"),
        NC_DISMANTLING_RETURN("C03", "C03", "NC拆解退料"),
        NC_SCRAPPED("C04", "C04", "NC报废指令"),
        NOT_JIS("NOTJIS", "NOTJIS", "非JIS指令"),
        STOCK_DUMP("D00", "D00", "库存转储指令"),
        NC_INSTOCK("D01", "D01", "NC入库指令"),
        SMRR("B00", "B00", "SMRR退货"),
        DMR("B01", "B01", "DMR退货"),
        OUT_SOURCING("A00", "A00", "委外发料指令"),
        OUT_REBACK("A01", "A01", "委外退料指令"),
        OUT_RETURN_SOURCING("A02", "A02", "委外返工发料指令"),
        OUT_RETURN_("A03", "A03", "委外返工退料指令"),
        SALES_RETURN_REBACK("SALES_RETURN", "SALES_RETURN", "销售退货指令"),
        CS("CS", "CS", "盘点指令"),
        CS_ADUJUST("CS_ADUJUST", "CS_ADUJUST", "盘点调差指令");
        private String value;
        private String code;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 物料类型（用于物料）
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WMS_PART_TYPE {
        RAW_MATERIAL(10, "原材料"), PARTIALLY_PREPARED_PRODUCTS(20, "半成品"), FINISHED_PRODUCT(30, "成品"), CONTAINER_PRODUCT(40, "容器"),
        UTENSIL(50, "器具");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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


    public enum WMS_PART_TYPE_STR {
        RAW_MATERIAL("10", "原材料"), PARTIALLY_PREPARED_PRODUCTS("20", "半成品"), FINISHED_PRODUCT("30", "成品"), CONTAINER_PRODUCT("40", "容器"),
        UTENSIL("50", "器具");
        private String value;
        private String description;

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


    /**
     * 任务数据来源：检查子数据
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TRUE_OR_FALSE {
        TRUE(1, "是"), FALSE(2, "否");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

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

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

    }


    /**
     * 库存交易表状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WMS_TRANS_QUAN_STATUS {
        CREATE(1, "创建"), SUCCESS(10, "处理成功"), FAIL(30, "处理失败");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * PO ASN 收货状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PO_RECEIVE_STATUS {
        WAITING_RECEIVE_TIME_EARLY("R0001", "待收货"),
        RECEIVEING_TIME_EARLY("R0002", "提前收货中"),
        RECEIVED_IIME_EARLY("R0003", "提前收货完成"),
        WAITING_RECEIVE_TIME_IN("R0004", "待收货"),
        RECEIVEING_TIME_IN("R0005", "正常收货中"),
        RECEIVED_TIME_IN("R0006", "正常收货完成"),
        WAITING_RECEIVE_TIME_LATE("R0007", "延迟未收货"),
        RECEIVEING_TIME_LATE("R0008", "延迟收货中"),
        RECEIVED_TIME_LATE("R0009", "延迟收货完成"),
        STATUS_NEED_TO_CHECK("R0010", "待查询");

        private String value;
        private String description;

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

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return value;
        }

        public String getValue() {
            return value;
        }

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

        public static String getDes(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 STOCK_LEVEL_STATUS {
        LOW("LOW", "低于最低库存"),
        HIGH("HIGH", "高于最高库存"),
        NORMAL("CREATE", "安全库存");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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


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

    /**
     * 外部接口单据来源枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SRC_STATUS {
        ZMMES("ZMMES", "知明MES"),
        TBMES("TBMES", "MES接口"),
        TGMES("TGMES", "泰国MES"),
        AMP("AMP", "AMP系统"),
        DR("DR", "直送拉动");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    public static Map<String, Object> getEnumByName(String enumName) throws Exception {
        Class[] innerClazz = WmsEnumUtil.class.getDeclaredClasses();// 获取常量类中的所有内部类
        Class<Enum> clazz;
        Enum[] enumConstants;

        Map<String, Object> enumMap;// 枚举类
        List<Map<String, Object>> values;// 枚举实例【enumName：{“”：}，{“”：}，{“”：}】
        Map<String, Object> value;// 枚举实例属性

        Method getValue;
        Method getCode;
        Method getDescription;

        // 遍历内部类
        String simpleName;//内部类的类名
        for (Class class1 : innerClazz) {
            //获取内部内的类名
            simpleName = class1.getSimpleName();
            if (simpleName.equals(enumName)) {
                // 判断类是不是枚举类
                clazz = (Class<Enum>) Class.forName("cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil$" + simpleName);

                // 枚举类方法初始化
                getCode = null;
                try {
                    getCode = clazz.getMethod("getCode");
                } catch (NoSuchMethodException e) {
                }
                getValue = clazz.getMethod("getValue");
                getDescription = clazz.getMethod("getDescription");

                // 获取所有枚举实例
                enumConstants = clazz.getEnumConstants();
                enumMap = new HashMap<>();
                values = new ArrayList<>();
                for (Enum enum1 : enumConstants) {
                    value = new HashMap<>();
                    value.put("value", getValue.invoke(enum1));
                    if (getCode != null) {
                        value.put("code", getCode.invoke(enum1));
                    }
                    value.put("description", getDescription.invoke(enum1));
                    values.add(value);
                }
                enumMap.put("enumName", clazz.getSimpleName());
                enumMap.put("valuesList", values);
                return enumMap;
            }
        }
        return null;
    }

    /**
     * 库存数量类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum STOCK_QUAN_QTY_TYPE {
        QTY("qty", "可用数量"),
        FAIL_QTY("failQty", "不合格数量"),
        HOLD_QTY("holdQty", "隔离数量"),
        QC_QTY("qcQty", "质检中数量"),
        RIN_QTY("rinQty", "待入库数量"),
        FREEZE_QTY("freezeQty", "冻结数量"),
        CONSIGN_QTY("consignQty", "寄售数量"),
        LOCK_QTY("lockQty", "锁定数量"),
        SCRAP_QTY("scrapQty", "报废数量");

        private String value;
        private String description;

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

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return value;
        }

        public String getValue() {
            return value;
        }

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

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

    /**
     * ERP同步标识 10=待同步，20=同步成功，30=同步失败
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WMS_ERP_SYNC_FLAG {
        CREATE(10, "待同步"), SUCCESS(20, "同步成功"), FAIL(30, "同步失败");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * ERP同步标识 10=待同步，20=同步成功，30=同步失败
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WMS_SN_GENERATE_RULE {
        SOURCE(10, "源"), TARGET(20, "目标"), NON_ASSIGNMENT(30, "不赋值");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * PDA顶级菜单
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PDA_TOP_MENU {
        RC("RC", "收货"),
        QC("QC", "质检"),
        PICK("PICK", "拣货"),
        OUTSTOCK("OUTSTOCK", "出库"),
        INSTOCK("INSTOCK", "入库"),
        MOVESTOCK("MOVESTOCK", "移库"),
        ASSIST("ASSIST", "辅助"),
        NC("NC", "NC"),
        CS("CS", "盘点");

        private String value;
        private String description;

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

        public String getCode() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getValue() {
            return value;
        }
    }

    /**
     * 条码类型 10=实物条码，20=虚拟条码
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WMS_STOCK_TYPE {
        SOURCE(10, "实物条码"),
        TARGET(20, "虚拟条码"),
        CUST_SN(30, "客户条码");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 库位校验源库位目标库位参数
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SRC_DEST_LOCATE {
        SRC(10, "SRC", "源库位"),
        DEST(20, "DEST", "目标库位");

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

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

        public int getValue() {
            return value;
        }

        public static SRC_DEST_LOCATE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == (value)) {
                    return values()[i];
                }
            }
            return null;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

    /**
     * 物料结算标识
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum OUT_CLOSE_FLAG {
        INTERNAL_SETTLEMENT("1", "内部结算"),
        NOMAL_SETTLEMENT("2", "正常结算");

        private String value;
        private String description;

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

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return value;
        }

        public String getValue() {
            return value;
        }


        public static String getDes(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 OUT_CLOSE_TYPE {
        OFF_LINE_SETTLEMENT("10", "下线结算"),
        PICK_SETTLEMENT("20", "配料结算");

        private String value;
        private String description;

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

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return value;
        }

        public String getValue() {
            return value;
        }


        public static String getDes(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 STOCK_INITIALIZE_STATUS {
        CREATE(10, "创建"),
        FINISH(20, "完成");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 盘点差异类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum INVENTORY_DIFFERENCE_TYPE {
        INVENTORY_FLAT(10, "INVENTORY_FLAT", "盘平"),
        INVENTORY_LOSSES(20, "INVENTORY_LOSSES", "盘亏"),
        INVENTORY_WIN(30, "INVENTORY_WIN", "盘盈"),
        INVENTORY_DIS(40, "INVENTORY_DIS", "库位不一致"),
        INVENTORY_WITHOUT(60, "INVENTORY_WITHOUT", "未盘");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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

    /**
     * 收货状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum REC_STATUS {
        UNRECEIVED("UNRECEIVED", "未收货"),
        COMPLETE_RECEIPT("COMPLETE_RECEIPT", "完成收货"),
        PARTIAL_RECEIPT("PARTIAL_RECEIPT", "部分收货");

        private String value;
        private String description;

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

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return value;
        }

        public String getValue() {
            return value;
        }


        public static String getDes(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 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_TYPE {
        SN(10, "SN"),
        PACKAGE_NO(20, "PACKAGE_NO");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

        public static PRINT_TYPE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }
    }

    /**
     * 打印状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ETC_PRINT_STATUS {
        NOT_HIT(10, "未打"),
        ALREADY_HIT(20, "已打");

        private int value;
        private String description;

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

    /**
     * 物料关系信息 关联类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PART_ASSOCIATE_TYPE {
        LINE(10, "LINE", "产线"),
        CUSTOMER(20, "CUSTOMER", "客户"),
        VENDOR(30, "VENDOR", "供应商"),
        BOXING_ERROR_PROOFING(40, "BOXING_ERROR_PROOFING", "装箱防错");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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

        public static PART_ASSOCIATE_TYPE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }
    }

    /**
     * 条码操作记录信息 操作类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SN_OPERATE_TYPE {
        REPORT(10, "REPORT", "生产报工"),
        BOXING_ERROR_PROOFING(20, "BOXING_ERROR_PROOFING", "装箱防错"),
        REPORT_CANCEL(30, "REPORT_CANCEL", "报工撤销"),
        PACKAGE(40, "BOXING_ERROR_PROOFING", "翻包"),
        SHIP_CHECK(50, "SHIP_CHECK", "发运校验");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


    /**
     * 物流规则 处理模式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ROUTING_RULE_MODE {
        CREATE_TASK(10, "CREATE_TASK", "生成任务"),
        AUTO_OPT(20, "AUTO_OPT", "自动操作"),
        MENU_OPT(30, "MENU_OPT", "手工操作"),
        AUTO_OPT_NON_TRANS(40, "AUTO_OPT_NON_TRANS", "自动操作无交易"),
        CREATE_DOCMOVE(50, "CREATE_DOCMOVE", "生成移库单"),
        UPDATE_TASK(60, "UPDATE_TASK", "复用任务"),
        AUTO_INSTORE_DOCMOVE(70, "AUTO_INSTORE", "自动入库移库单");
        private int value;
        private String code;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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

    /**
     * 物流规则 处理模式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ROUTING_RULE_TYPE {
        PROMOTION_TYPE(10, "REPLENISH_TYPE", "推动规则"),
        REPLENISH_TYPE(20, "PROMOTION_TYPE", "补货规则");
        private int value;
        private String code;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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

    /**
     * 分类
     * 物流规则 处理单位
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ROUTING_DELAY_UNIT {
        M(10, "M", "分"),
        D(20, "D", "天");
        private int value;
        private String code;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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

    /**
     * MOVE_TO_ERP表是否同步
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MOVE_TO_ERP_IS_SYNC {
        SYNCHRONIZED(1, "已同步"), UN_SYNCHRONIZED(2, "未同步"), NON_SYNCHRONIZED(3, "不同步");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 防错类型：
     * 10=零件装箱防错，20=条码装箱防错，30=BMW标签防错，40=BMW零件防错，50=BMW发运防错，60=单件发运防错
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PART_BOXING_ERROR_PROOFING_TYPE {
        PART_NO(10, "零件装箱防错"),
        SN(20, "条码装箱防错"),
        BMW_TAG(30, "BMW标签防错"),
        BMW_PART(40, "BMW零件防错"),
        BMW_DISPATCH(50, "BMW发运防错"),
        SINGLE_DISPATCH(60, "单件发运防错");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 日志推送至MQ的处理类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum LOG_TO_MQ_HANDLE_TYPE {
        INSERT(10, "新增"), UPDATE(20, "修改"), DELETE(30, "删除");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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


    /**
     * 规格层级
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SPEC_LEVEL {
        FIRST_LEVEL(10, "一层"), SECOND_LEVEL(20, "二层"), THIRD_LEVEL(30, "三层"), FOURTH_LEVEL(40, "四层"), FIFTH_LEVEL(50, "五层");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 生产质检单的方式
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CREATE_QC_ORDER_TYPE {
        BY_MOVE(10, "按库存移动单"), BY_PART(20, "按物料编号");

        private int value;
        private String description;

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

    /**
     * 编组管理操作类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PACKAGE_OPERATE_TYPE {
        PACKAGE_ADD("PACKAGE_ADD", "新建组号"),
        PACKAGE_ADDITIONAL("PACKAGE_ADDITIONAL", "增添条码"),
        PACKAGE_DELETE("PACKAGE_DELETE", "移除条码"),
        PACKAGE_CLEAR("PACKAGE_CLEAR", "删除组号");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 客户发运 发运数量控制
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SHIPP_QTY_CONTROL {
        LESS_SEND(10, "少发"),
        MANY_SEND(20, "多发"),
        CONSISTENT(30, "一致"),
        NO_CONTROL(40, "不控制");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static SHIPP_QTY_CONTROL codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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


    /**
     * 客户发运 发运数量控制逻辑
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum LOCK_FIFO_SN_TYPE {
        SHIP_FLAG(10, "客户发运"),
        OVER_SEND(20, "多发"),
        CONSISTENT(30, "一致"),
        NO_CONTROL(40, "不控制"),
        OVER_ONE_BOX(50, "多一箱");


        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static LOCK_FIFO_SN_TYPE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

    /**
     * 拉动方式维护
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PULL_WAY_STATUS {
        SAFETY_STOCK_PULL(10, "安全库存拉动"),
        ELECTRONIC_KANBAN_PULL(20, "电子看板拉动"),
        LINE_PULL(30, "巡线拉动"),
        PLANNED_PULL(40, "计划拉动"),
        ANDON_PULL(50, "安灯拉动"),
        EXTERNAL_PULL(60, "手工拉动"),
        WORKORDER_PULL(70, "工单拉动");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static PULL_WAY_STATUS codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

    /**
     * 尾数计算方式
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TAIL_QTY_MODE {
        NONE(1, "不处理"),
        ORIGIN_NUMBER(10, "原数值"),
        UP_ROUND(20, "向上取整"),
        DOWN_ROUND(30, "向下取整");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static TAIL_QTY_MODE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

    /**
     * 收货看板状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RECEIVING_GOODS_STATUS {
        WAIT_RECEIVING(10, "待收货"),
        RECEIVING(20, "收货中"),
        COMPLETE_RECEIVING(30, "收货完成"),
        CLOSE(40, "已关闭"),
        CANCEL(50, "已取消"),
        UN_RECEIVED(60, "延迟未收货");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static RECEIVING_GOODS_STATUS codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

    /**
     * 发运看板状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum FINAL_SHIPMENT_STATUS {
        CREATE(10, "新建"),
        PROCESSING(20, "处理中"),
        COMPLETE(30, "已完成");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static FINAL_SHIPMENT_STATUS codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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


    /**
     * 生产计划主表状态创建
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_ORDER_MASTER_STATUS {
        CREATE(10, "CREATE", "创建"),
        PLANNED(20, "PLANNED", "已计划"),
        CLOSE(30, "CLOSE", "已关闭");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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


    /**
     * 生产计划主表计划状态
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_ORDER_PLAN_STATUS {
        CREATE(10, "CREATE", "创建"),
        PLANNED(20, "PLANNED", "处理中"),
        FINISH(25, "FINISH", "已完成"),
        CLOSE(30, "CLOSE", "已关闭");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

        public static int descOf(String desc) {
            int tmp = 1;
            for (int i = 0; i < values().length; i++) {
                if (values()[i].description.equals(desc)) {
                    tmp = values()[i].value;
                }
            }
            return tmp;
        }
    }
    /**
     * 是否贵重物料
     * 默认为2
     */
    public enum IS_VALUABLE {
        TRUE(1, "贵重物料"), FALSE(2, "非贵重物料");

        private int value;
        private String description;

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

    }

    /**
     * 计划拉动明细表状态创建
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PULL_TASK_DETAILS_STATUS {
        BE_HANDLE(10, "BE_HANDLE", "待处理"),
        CANCELLATION(20, "CANCELLATION", "已处理");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

    /**
     * 计划拉动主表状态创建
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PULL_TASK_MASTER_STATUS {
        CREATE(10, "CREATE", "创建"),
        ENABLED(20, "ENABLED", "已启动"),
        COMPLETE(30, "COMPLETE", "已完成"),
        CLOSE(40, "CLOSE", "已关闭");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

    /**
     * 计划拉动明细表状态创建
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum VENDOR_TYPE {
        VENDOR(10, "供应商"), CARRIERS(20, "承运商");

        private int value;
        private String description;

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

    /**
     * 推送类型单位
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PUSH_TYPE {
        EMAIL(10, "邮件"), SMS(20, "短信");

        private int value;
        private String description;

        PUSH_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 GROUP_COMMIT_MODE {
        JUST_CURRENT(10, 10, "只提交当前移动单"), REF_SRC(20, 20, "关联单据提交"), REF_GROUP(30, 30, "关联分组号提交");

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

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

        public int getValue() {
            return value;
        }

        public int getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

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

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

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

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

    /**
     * 自定义列表：优先级  (CUSTOMIZE_PROP)
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CUSTOMIZE_PROP {
        DEFAULT(1, "默认"), CUSTOMIZE(2, "自定义");
        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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

    /**
     * 领料看板执行状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PICKING_EXECUTE_STATUS {
        IN_PROGRESS(1,"IN_PROGRESS", "执行中"),
        EXPIRED(2,"EXPIRED", "已超期"),
        NORMAL(3,"NORMAL", "正常");

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

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

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

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

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

    /**
     * 同批次条码-查询范围
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum QUERY_RANGE_TYPE {
        LOCATE(10, "库位"), AREA_OWNER(20, "责任区域");

        private int value;
        private String description;

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

    /**
     * 交易类型-单据回退类型
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ORDER_BACK_TYPE {
        REC_QTY(10, "REC_QTY", "已收货数量"),
        PICK_QTY(20, "PICK_QTY", "已拣货数量"),
        MOVE_QTY(30, "MOVE_QTY", "已移库数量"),
        OUT_QTY(40, "OUT_QTY", "已出库数量");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

        public static ORDER_BACK_TYPE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

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

    /**
     * 插件类型 10-PDA插件，20-按钮增强插件，30-交易处理插件
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PLUGIN_TYPE {
        PDA_PLUGIN(10, "PDA_PLUGIN", "PDA插件"),
        BTN_PLUGIN(20, "BTN_PLUGIN", "按钮增强插件"),
        TRANS_PLUGIN(30, "TRANS_PLUGIN", "交易处理插件");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

        public static PLUGIN_TYPE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

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

    /**
     * 波次合并规则
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WAVE_MERGE_RULE {
        IS_SAME_CUSTOMER("同客户", "isSameCustomer", "2", 10,
                0, "isSameCustomer", "同客户"),
        IS_SAME_WAREHOUSE("同仓库", "isSameWareHouse", "2", 10,
                0, "isSameWareHouse", "同仓库"),
        IS_SAME_PRIORITY("同优先级", "isSamePriority", "1", 10,
                0, "isSamePriority", "同优先级"),
        IS_SAME_SRC_ZONE("同来源存储区", "isSameSrcZone", "2", 10,
                0, "isSameSrcZone", "同来源存储区"),
        IS_SAME_DEST_ZONE("同目标存储区", "isSameDestZone", "2", 10,
                0, "isSameDestZone", "同目标存储区"),
        IS_SAME_PART("同物料", "isSamePart", "2", 10,
                0, "isSamePart", "同物料"),
        IS_SAME_PART_GROUP("同物料组", "isSamePartGroup", "2", 10,
                0, "isSamePartGroup", "同物料组"),
        IS_SAME_DELIVERY_TIME("同发货时间", "isSameDeliveryTime", "2", 10,
                0, "isSameDeliveryTime", "同发货时间"),
        IS_SAME_BUSI_TYPE("同业务类型", "isSameBusiType", "1", 10,
                0, "isSameBusiType", "同业务类型"),
        IS_SAME_ORDER_STATUS("同单据状态", "isSameOrderStatus", "1", 10,
                0, "isSameOrderStatus", "同单据状态"),
        IS_CROSS_AREA("允许跨区", "isCrossArea", "2", 10,
                0, "isCrossArea", "允许跨区"),
        IS_COLLECTION("物料整箱归集", "isCollection", "2", 10,
                0, "isCollection", "物料整箱归集");

        private String fieldChName;

        private String fieldEnName;

        private int mergeOperatorType;

        private String fieldValue;

        private int value;

        private String code;

        private String description;

        WAVE_MERGE_RULE(String fieldChName, String fieldEnName, String fieldValue, int mergeOperatorType, int value,
                        String code, String description) {
            this.fieldChName = fieldChName;
            this.fieldEnName = fieldEnName;
            this.fieldValue = fieldValue;
            this.mergeOperatorType = mergeOperatorType;
            this.value = value;
            this.description = description;
            this.code = code;
        }

        public String getFieldChName() {
            return fieldChName;
        }

        public String getFieldEnName() {
            return fieldEnName;
        }

        public String getFieldValue() {
            return fieldValue;
        }

        public int getMergeOperatorType() {
            return mergeOperatorType;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

        public int getValue() {
            return value;
        }
    }

    /**
     * 波次合并规则
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WAVE_MERGE_RANGE {
        CUST_NO("客户代码", "custNo", "cn.estsh.i3plus.pojo.wms.bean.BasCustomer",
                "custNo,custName", "custNo,custName", "custNo",
                20, "", "custNo", 0, "客户代码"),
        WAREHOUSE_CODE("仓库代码", "srcWhNo", "cn.estsh.i3plus.pojo.wms.bean.WareHouse",
                "code,name", "code,name", "code",
                20, "", "srcWhNo", 0, "仓库代码"),
        PRIORITY("优先级", "priority", "PRIORITY_NEW", "",
                "", "", 20, "",
                "priority", 0, "优先级"),
        SRC_ZONE_NO("来源存储区代码", "srcZoneNo", "cn.estsh.i3plus.pojo.wms.bean.WmsZones",
                "zoneNo,zoneName", "zoneNo", "zoneNo",
                20, "", "srcZoneNo", 0, "来源存储区代码"),
        DEST_ZONE_NO("目标存储区代码", "destZoneNo", "cn.estsh.i3plus.pojo.wms.bean.WmsZones",
                "zoneNo,zoneName", "zoneNo", "zoneNo",
                20, "", "destZoneNo", 0, "目标存储区代码"),
        PART_NO("物料号", "partNo", "cn.estsh.i3plus.pojo.wms.bean.WmsPart",
                "partNo,partName", "partNo", "partNo",
                20, "", "partNo", 0, "物料号"),
        PART_GROUP_NO("物料组代码", "partGroupNo", "cn.estsh.i3plus.pojo.wms.bean.WmsPartGroup",
                "partGroupNo,partGroupName", "partGroupNo",
                "partGroupNo", 20, "", "partGroupNo", 0, "物料组代码"),
        BUSI_TYPE("业务类型", "busiType", "OUT_MOVEMENT_BUSI_TYPE", "",
                "", "", 20, "", "busiType", 0, "业务类型"),
        ORDER_STATUS("单据状态", "orderStatus", "MASTER_ORDER_STATUS", "",
                "", "", 20, "", "orderStatus", 0, "单据状态");

        // 中文名称
        String fieldChName;
        // 英文名称
        String fieldEnName;
        // 下拉枚举名称
        String entityName;
        // 下拉列表显示列名称,多个列名需要根据逗号分隔
        String listColumnName;
        // 下拉搜索列名称,多个列名需要根据逗号分隔
        String searchColumnName;
        // 回显列名
        String explicitColumnName;
        // 合并操作类型
        private int mergeOperatorType;

        private String fieldValue;

        private int value;

        private String code;

        private String description;

        WAVE_MERGE_RANGE(String fieldChName, String fieldEnName, String entityName, String listColumnName,
                         String searchColumnName, String explicitColumnName, int mergeOperatorType, String fieldValue,
                         String code, int value, String description) {
            this.fieldChName = fieldChName;
            this.fieldEnName = fieldEnName;
            this.entityName = entityName;
            this.listColumnName = listColumnName;
            this.searchColumnName = searchColumnName;
            this.explicitColumnName = explicitColumnName;
            this.mergeOperatorType = mergeOperatorType;
            this.fieldValue = fieldValue;
            this.code = code;
            this.value = value;
            this.description = description;
        }

        public String getFieldEnName() {
            return fieldEnName;
        }

        public String getFieldChName() {
            return fieldChName;
        }

        public String getEntityName() {
            return entityName;
        }

        public String getListColumnName() {
            return listColumnName;
        }

        public String getSearchColumnName() {
            return searchColumnName;
        }

        public String getExplicitColumnName() {
            return explicitColumnName;
        }

        public int getMergeOperatorType() {
            return mergeOperatorType;
        }

        public String getFieldValue() {
            return fieldValue;
        }

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return "description";
        }

        public String getCode() {
            return code;
        }
    }

    /**
     * 插件类型 10-合并规则，20-合并范围
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WAVE_MERGE_TYPE {
        WAVE_MERGE_RULE(10, "WAVE_MERGE_RULE", "合并规则"),
        WAVE_MERGE_RANGE(20, "WAVE_MERGE_RANGE", "合并范围");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

        public static WAVE_MERGE_TYPE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

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

    /**
     * 存储区-补货方式
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ZONE_PULL_WAY {
        JOB_CYCLE(10, "JOB周期"),
        FIXED_CYCLE(20, "固定周期");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static ZONE_PULL_WAY codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

    /**
     * 拉动任务-任务类型
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PULL_TASK_TYPE {
        NORMAL_PULL(10, "普通拉动"),
        GROUP_PULL(20, "组合拉动");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static PULL_TASK_TYPE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

    /**
     * 道口预约订单状态
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DOCK_ORDER_STATUS {
        WAIT_SEND(10, "待送货"),
        ARRIVED(20, "已到达"),
        RECEIVED(30, "已收货"),
        CANCELED(40, "已取消");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static DOCK_ORDER_STATUS codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

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

    /**
     * 道口预约订单状态
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DOCK_APPOINTMENT_STATUS {
        WAIT_SEND(10, "待送货"),
        HAS_SENDED(20, "已送达"),
        RECEIVING(30, "收货中"),
        COMPLETED(40, "已完成"),
        OVERTIME(50, "供货超时");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static DOCK_APPOINTMENT_STATUS codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            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 QAD_DOC_TYPE {
        TYPE_S(10, "s", "s"), TYPE_D(20, "d", "d");

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

        public String getCode() {
            return code;
        }

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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


    /**
     * 业务场景Supplier
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BUSI_SCENE_TYPE {
        YFAS_DELIVERY(10, "YFAS_DELIVERY", "YFAS送货"),
        TURN_ZAITU_LOCATE(20, "TURN_ZAITU_LOCATE", "转储到在途库位"),
        ORGANIZE_TRUN(30, "ORGANIZE_TRUN", "工厂内转储"),
        SUPPLIER_SELF(40, "SUPPLIER_SELF", "供应商自提"),
        CUSTOMER_SELF(50, "CUSTOMER_SELF", "客户自提");
        private int value;
        private String code;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        public static BUSI_SCENE_TYPE codeOf(String code) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].code.equals(code)) {
                    return values()[i];
                }
            }
            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;
        }
    }

    /**
     * 道口类型
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DOCK_TYPE {
        WAIT_SEND(10, "收货道口"),
        HAS_SENDED(20, "发运道口");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static DOCK_TYPE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

    /**
     * 钢卷料类型
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PART_STEEL_TYPE {
        NONE(10, "非钢卷料"),
        NORMAL(20, "普通钢卷料"),
        FINE(30, "精钢卷料");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static PART_STEEL_TYPE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

    /**
     * 供货类型
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PART_SUPPLY_TYPE {
        JIT(10, "JIT"),
        NOT_JIT(20, "非JIT");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static PART_SUPPLY_TYPE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

    /**
     * 收货方式
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PART_RECEIVING_METHOD {
        STAND(10, "标准收货"),
        PREPARE(20, "预收货");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static PART_RECEIVING_METHOD codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

    /**
     * 星期
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WEEK_TYPE {
        MONDAY(20, 1, "星期一"),
        TUESDAY(30, 2, "星期二"),
        WEDNESDAY(40, 3, "星期三"),
        THURSDAY(50, 4, "星期四"),
        FRIDAY(60, 5, "星期五"),
        SATURDAY(70, 6, "星期六"),
        SUNDAY(10, 0, "星期日");

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

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

        public int getValue() {
            return value;
        }

        public int getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        public static WEEK_TYPE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

        public static int getValByCode(int code) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].code == code) {
                    return values()[i].value;
                }
            }
            return 0;
        }
    }

    /**
     * 移库单移动类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SO_ORDER_TYPE {
        SALES(10, "SALES", "销售");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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

    /**
     * 数据格式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DATA_FORMAT {
        STRING_FORMAT(1, "String", "字符串格式"),
        INTEGER_FORMAT(2, "Integer", "整数格式"),
        DOUBLE_FORMAT(3, "Double", "高精度浮点格式"),
        DATE_FORMAT(4, "Date", "日期格式"),
        FLOAT_FORMAT(5, "Float", "浮点格式"),
        BOOL_FORMAT(6, "Boolean", "布尔格式"),
        LONG_FORMAT(7, "LONG", "长整数格式"),
        BYTE_FORMAT(8, "Byte", "字节格式"),
        BIGDECIMAL_FORMAT(9, "Bigdecimal", "BigDecimal格式"),
        BLOB_FORMAT(10, "Blob", "BLOB格式"),
        CLOB_FORMAT(11, "Clob", "CLOB格式"),
        TIMESTAMP_FORMAT(12, "Timestamp", "时间戳格式");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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

    /**
     * 数据导入类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TEMPLATE_IMPORT_TYPE {
        SINGLE_TABLE(10, "SINGLE_TABLE", "单表"),
        MULTI_TABLE(20, "MULTI_TABLE", "多表");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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

    /**
     * 数据更新类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TEMPLATE_UPDATE_TYPE {
        FULL_COVERAGE(10, "FULL_COVERAGE", "全覆盖"),
        DIFF_UPDATE(20, "DIFF_UPDATE", "差异更新"),
        REPEATE_NO_IMPORT(30, "REPEATE_NO_IMPORT", "重复不导入");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


    /**
     * 采购计划历史状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PURCHASE_PLAN_HISTORY_STATUS {
        CREATE(10, "CREATE", "采购订单创建"),
        PUBLISH(20, "PUBLISH", "采购订单发布"),
        VERDOR_CONFIRM(30, "VERDOR_CONFIRM", "供应商确认订单"),
        VERDOR_PRINT(40, "VERDOR_PRINT", "供应商打印"),
        VERDOR_SNED(50, "VERDOR_SNED", "供应商发货"),
        RECEIPT_FINISH(60, "RECEIPT_FINISH", "收货完成"),
        FAIL(70, "FAIL", "质检完成");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

    /**
     * BatchHold 检测大类
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BH_CHECK_TYPE {
        FUNCTION(10, "FUNCTION", "功能检测"),
        SIZE(20, "SIZE", "尺寸检测"),
        DEPTH(30, "DEPTH", "熔深检测");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

    /**
     * BatchHold 值类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BH_VALUE_TYPE {
        NUMBER(10, "NUMBER", "数字"),
        TEXT(20, "TEXT", "文本");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

    /**
     * BatchHold 值类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum FG_INSTOCK_SN_TYPE {
        NORMAL(10, "NORMAL", "正常"),
        FIRST_PIECE(20, "FIRST_PIECE", "首件"),
        MIDDLE_PIECE(30, "MIDDLE_PIECE", "中件"),
        TAIL_PIECE(40, "TAIL_PIECE", "末件");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

    /**
     * 返修、挑选状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum REWORK_STATUS {
        INIT(10, "INIT", "初始化"),
        BE_HANDLE(20, "BE_HANDLE", "待处理"),
        HANDLING(30, "HANDLING", "处理中"),
        FINISH(40, "FINISH", "已处理"),
        NONE(50, "NONE", "不处理");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


    /**
     * 返修、挑选状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BOM_TYPE {
        INIT(10, "PART", "物料"),
        BE_HANDLE(20, "OUT", "委外"),
        FINISH(30, "UTENSIL", "器具");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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

    /**
     * 运输方式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TRANSPORT_TYPE {
        LONG_HAUL(10, "长途运输"),
        SHORT_DISTANCE(20, "短途运输");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static TRANSPORT_TYPE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

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


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

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

    /**
     * 物流供应商类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum LOGISTICS_PROVIDER_TYPE {
        VENDOR(10, "承运商");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static LOGISTICS_PROVIDER_TYPE codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

    /**
     * BatchHold 物料检测标准值
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BH_PART_CHECK_STD {
        NUMBER(1, "NORMAL", "合格"),
        TEXT(2, "ABNORMAL", "不合格");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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


    /**
     * BH检测结果类型 RepairOrPick
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BH_TEST_RESULT_TYPE {
        PICK(10, "NORMAL", "挑选"), REPAIR(20, "ABNORMAL", "返修");
        private int value;
        private String code;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static BH_TEST_RESULT_TYPE codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }



    /**
     * 仓库健康指标等级
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum HEALTH_INDICATOR_LEVEL {
        HEALTH(10, "HEALTH", "健康"),
        SUB_HEALTH(20, "SUB_HEALTH", "亚健康"),
        NO_HEALTH(30, "NO_HEALTH", "不健康");
        private int value;
        private String code;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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


    /**
     * 软适配数据类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SOFT_DATA_FORM {
        XML(10, "XML", "XML"), JSON(20, "JSON", "JSON");
        private int value;
        private String code;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static SOFT_DATA_FORM codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 报文校验类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum INTERFACE_DATA_VERIFY_STATUS {
        INITIAL(10, "INITIAL", "初始化"),
        COMPLETED(30, "COMPLETED", "校验完成"),
        ERROR(40, "ERROR", "校验出错");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static INTERFACE_DATA_VERIFY_STATUS codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 运费单审批状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum APPROVAL_STATUS {
        APPROVE_PROCESSING(10, "APPROVE_PROCESSING", "审批中"),
        APPROVE_COMPLETED(20, "APPROVE_COMPLETED", "审批通过"),
        APPROVE_REFUSE(30, "APPROVE_REFUSE", "已驳回");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static APPROVAL_STATUS codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 运费单审批状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum NORMAL_ABNORMAL {
        NORMAL(10, "NORMAL", "正常"),
        ABNORMAL(20, "ABNORMAL", "非正常");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static NORMAL_ABNORMAL codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }


    /**
     * 产品条码事务类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BACTH_TRANS_TYPE {
        REPORT(10, "REPORT", "报工"),
        UNTYING(20, "UNTYING", "解绑"),
        CHECK(30, "CHECK", "检测"),
        PICK(40, "REPAIR", "挑选"),
        REPAIR(50, "REPAIR", "返修"),
        BIND(60, "BIND", "绑定"),
        OUTSTOCK(70, "OUTSTOCK", "出库"),
        RE_PACKING(80, "RE_PACKING", "重绑");
        private int value;
        private String code;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static BACTH_TRANS_TYPE codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 业务表：BH类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BH_TYPE {
        HOLD_LOCATE(10, "hold库位"),
        QUALITY_CONTROL(20, "质检中"),
        PRE_INSTOCK(30, "待入库");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

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


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

    /**
     * BH库位类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BH_LOCATE_TYPE {
        HOLD(10, "HOLD", "HOLD库位"),
        WAIT_CHECK(20, "WAIT_CHECK", "待检测库位"),
        WAIT_OUT(30, "WAIT_OUT", "待出库库位");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static BH_LOCATE_TYPE codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }


    /**
     * BH处理状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BH_WORK_STATUS {
        WAIT_CHECK(10, "WAIT_CHECK", "待检验"),
        SUBMIT_CHECK(20, "SUBMIT_CHECK", "已送检"),
        IN_CHECK(30, "IN_CHECK", "检验中"),
        WAIT_CONFIRM(40, "WAIT_CONFIRM", "待确认"),
        WAIT_REPARI(50, "WAIT_OUT", "待返修"),
        WAIT_PICK(60, "WAIT_OUT", "待挑选"),
        IN_REPARI(70, "WAIT_OUT", "返修中"),
        IN_PICK(80, "WAIT_OUT", "挑选中"),
        WAIT_OUT(90, "WAIT_OUT", "待出库"),
        OUT(100, "WAIT_OUT", "已出库");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static BH_WORK_STATUS codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 库位利用率
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum LOCATE_PROPORTION {
        ZERO(10, "ZERO", "0%"),
        GENERAL(20, "GENERAL", "0%-30%"),
        MEDIUM(30, "MEDIUM", "30%-60%"),
        WELL(40, "WELL", "60%-100%");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static LOCATE_PROPORTION codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * BH同步标识
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BH_SUMMARY_IS_SYNC {
        INIT(10, "INIT", "初始化"),
        WAIT_SYNC(20, "WAIT_SYNC", "待同步"),
        FINISH_SYNC(30, "FINISH_SYNC", "已同步");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static BH_SUMMARY_IS_SYNC codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SCAN_CATEGORY {
        ASN(10, "wmsDocMovementMasterRepository", "ASN"),
        PO(20, "wmsDocMovementMasterRepository", "PO"),
        SO(30, "wmsDocMovementMasterRepository", "SO"),
        MOVE(40, "wmsDocMovementMasterRepository", "移库单"),
        IN_STOCK(50, "wmsDocMovementMasterRepository", "入库单"),
        SHIPPING(60, "wmsDocMovementMasterRepository", "发运单"),
        QC(70, "wmsQCMasterRepository", "质检单"),
        CS(80, "wmsCSOrderMasterRepository", "盘点单"),
        SN(90, "wmsStockSnRepository", "条码"),
        PO_SN(100, "wmsPoSnRepository,wmsASNMasterDetailsRepository", "收货条码");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

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

        public static SCAN_CATEGORY codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 策略等级
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TRACTICS_GRADE {
        ONE_TRACTICS_GRADE(10, "ONE_TRACTICS_GRADE", "1级策略"),
        TWO_TRACTICS_GRADE(20, "TWO_TRACTICS_GRADE", "2级策略"),
        THREE_TRACTICS_GRADE(30, "THREE_TRACTICS_GRADE", "3级策略");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static TRACTICS_GRADE codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 策略组
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TRACTICS_GROUP {
        INSTOCK(10, "INSTOCK", "上架"),
        PICKING(20, "PICKING", "拣货");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static TRACTICS_GROUP codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 上架:策略项:1级策略
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum INSTOCK_TRACTICS_ITEM_ONE {
        COI_RECOMMEND(10, "COI_RECOMMEND", "COI推荐"),
        ADJACENT_RECOMMEND(20, "ADJACENT_RECOMMEND", "高频推荐(相邻)"),
        AREA_RECOMMEND(30, "AREA_RECOMMEND", "区域随机推荐"),
        INERTIA_RECOMMEND(40, "INERTIA_RECOMMEND", "惯性推荐"),
        ARTIFICIAL_RECOMMEND(50, "ARTIFICIAL_RECOMMEND", "人工指定");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static INSTOCK_TRACTICS_ITEM_ONE codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 上架:策略项:2级策略
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum INSTOCK_TRACTICS_ITEM_TWO {
        FULL_RECOMMEND(10, "FULL_RECOMMEND", "放满推荐"),
        EMPTY_RECOMMEND(20, "EMPTY_RECOMMEND", "空位推荐");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static INSTOCK_TRACTICS_ITEM_TWO codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 上架:策略项:3级策略
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum INSTOCK_TRACTICS_ITEM_THREE {
        FCL_RECOMMEND(10, "FCL_RECOMMEND", "整箱推荐"),
        EMPTY_BOX_RECOMMEND(20, "EMPTY_BOX_RECOMMEND", "零箱推荐"),
        WHOLE_BOX_RECOMMEND(30, "WHOLE_BOX_RECOMMEND", "整零箱推荐");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static INSTOCK_TRACTICS_ITEM_THREE codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 拣货:策略项:1级策略
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PICKING_TRACTICS_ITEM_ONE {
        ABSOLUTE_PATH(10, "ABSOLUTE_PATH", "绝对路径"),
        RELATIVE_PATH(20, "RELATIVE_PATH", "相对路径"),
        LOCATE_ORDER_BY(30, "LOCATE_ORDER_BY", "库位编号排序");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static PICKING_TRACTICS_ITEM_ONE codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 库位坐标是否允许偏移
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DOWN_OR_UP {

        IS_TRUE(10, "IS_TRUE", "允许"),
        IS_FALSE(20, "IS_FALSE", "不允许");

        private int value;
        private String codeValue;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getCodeValue() {
            return codeValue;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 动作类型
     * 10-锁定库位，20-锁定库存、30-锁定料车、40-解锁库存、50-解锁库位、60-解锁料车、70-生成任务、
     * 80-取消任务、90-递进交换
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum STRATEGY_ACTION_TYPE {
        LOCKING_LOCATE(10, "LOCKING_LOCATE", "锁定库位"),
        LOCKING_IN_STOCK(20, "LOCKING_IN_STOCK", "锁定库存"),
        LOCKING_FEED_CAR(30, "LOCKING_FEED_CAR", "锁定料车"),
        UNLOCK_IN_STOCK(40, "UNLOCK_IN_STOCK", "解锁库存"),
        UNLOCK_LOCATE(50, "UNLOCK_LOCATE", "解锁库位"),
        UNLOCK_FEED_CAR(60, "UNLOCK_FEED_CAR", "解锁料车"),
        GENERATE_TASK(70, "GENERATE_TASK", "生成任务"),
        CANCEL_TASK(80, "CANCEL_TASK", "取消任务"),
        PROGRESSIVE_EXCHANGE(90, "PROGRESSIVE_EXCHANGE", "递进交换");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static STRATEGY_ACTION_TYPE codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 自动化策略 数量控制
     * 默认为 10
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum AUTO_STRATEGY_QTY_CONTROL {
        LESS_SEND(10, "少发"),
        MANY_SEND(20, "多发"),
        CONSISTENT(30, "一致");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static AUTO_STRATEGY_QTY_CONTROL codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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


    /**
     * 自动入库任务
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum AUTO_FORK_TASK_TYPE {
        START(10, "start", "start"),
        END(20, "end", "end");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


    /**
     * AUTO 命令状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum AUTO_FORK_TASK_STATUS {
        CREATE(10, "新建"),
        PROCESSING(20, "处理中"),
        COMPLETE(30, "已完成"),
        ERROR(40, "处理异常");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static AUTO_FORK_TASK_STATUS codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            return null;
        }

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

    /**
     * 自动化日志记录-操作类型
     * 10-单据生成，20-策略动作、30-任务生成、40-START、50-END、60-其它
     *
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum OPERATE_TYPE {
        ORDER_GENERATE(10, "ORDER_GENERATE", "单据生成"),
        STRATEGIC_ACTION(20, "STRATEGIC_ACTION", "策略动作"),
        TASK_GENERATE(30, "TASK_GENERATE", "任务生成"),
        START(40, "START", "START"),
        END(50, "END", "END"),
        OTHER(60, "OTHER", "其它");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

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


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

        public static OPERATE_TYPE codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * RFID操作类型枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RFID_OPERATE_TYPE {
        IN_STORAGE(10, "IN_STORAGE", "入库"),
        SHIPEMNT(20, "SHIPEMNT", "发运"),
        BACK_STORAGE(30, "BACK_STORAGE", "回库"),
        UN_BUNDING(40, "UN_BUNDING", "解绑"),
        BUNDING(50, "BUNDING", "绑定");

        private String code;
        private String description;
        int value;

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        RFID_OPERATE_TYPE(int value, String code, String description) {
            this.value = value;
            this.code = code;
            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 String valueOfDescription(int val) {
            return valueOf(val);
        }

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


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

        public static RFID_OPERATE_TYPE codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 频次
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum FREQUENCY {
        ORDER_GENERATE(10, "MULTI_FREQUENCY", "多频次"),
        STRATEGIC_ACTION(20, "NON_MULTI_FREQUENCY", "非多频次"),
        TASK_GENERATE(30, "AMP", "AMP");

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

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

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

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

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

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


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

        public static FREQUENCY codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 悬挂链库存同步状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum SUSPEN_STOCK_SYNC_STATUS {
        CREATE(10, "CREATE", "创建"),
        HANDLED(20, "HANDLED", "已处理"),
        HANDLE_ERROR(30, "HANDLE_ERROR", "处理错误"),
        PLC_HANDLE_OUTITME(40, "PLC_HANDLE_OUTITME", "PLC处理超时"),
        SRC_DATA_ERROR(50, "SRC_DATA_ERROR", "来源数据解析错误");

        private String code;
        private String description;
        int value;

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        SUSPEN_STOCK_SYNC_STATUS(int value, String code, String description) {
            this.value = value;
            this.code = code;
            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 String valueOfDescription(int val) {
            return valueOf(val);
        }

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


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

        public static SUSPEN_STOCK_SYNC_STATUS codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }

    /**
     * 收货看板状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RC_BOARD_STATUS {
        FINISH(10, "已完成(绿色)"),
        OVER_TIME(20, "已超时（红色）"),
        UNRECEIVED(30, "未收货（蓝色）"),
        VARIANT(40, "有差异（黄色）"),
        NORMAL(50, "正常（白色）");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static RC_BOARD_STATUS codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            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 CYCLE_RULE {
        FIVE_SECONDs("0/5 * * * * ?", "FIVE_SECONDs", "五秒一次"),
        TWENTY_SECONDS("0/20 * * * * ?", "TWENTY_SECONDS", "二十秒一次"),
        EVERY_DAY("0 0 0 * * ?", "EVERY_DAY", "每天零点"),
        EVERY_HOUR("0 0 * * * ?", "EVERY_HOUR", "每小时");

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

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

        public String getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }
    }


    /**
     * BOM
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum BOM_PRODUCTING_LINE {
        GJ(10, "PIPE", "管件"),
        JF(20, "JF", "夹方"),
        JH(30, "JH", "机焊"),
        SH(40, "SH", "手焊");

        private String code;
        private String description;
        int value;

        public int getValue() {
            return value;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        BOM_PRODUCTING_LINE(int value, String code, String description) {
            this.value = value;
            this.code = code;
            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 String valueOfDescription(int val) {
            return valueOf(val);
        }

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


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

        public static BOM_PRODUCTING_LINE codeOf(Integer value) {
            if (value == null) {
                return null;
            } else {
                for (int i = 0; i < values().length; i++) {
                    if (values()[i].value == value) {
                        return values()[i];
                    }
                }
            }
            return null;
        }
    }


    /**
     * 成品条码状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PRODUCT_STATUS {
        NORMAL(10, "正常"),
        REPAIRE(20, "返工"),
        SCRAP(30, "报废");

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public static PRODUCT_STATUS codeOf(int value) {
            for (int i = 0; i < values().length; i++) {
                if (values()[i].value == value) {
                    return values()[i];
                }
            }
            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 QC_STATUS_FLAG {
        NORMAL(1, "NORMAL", "合格"),
        ABNORMAL(2, "ABNORMAL", "超时");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

    /**
     * PLC业务类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PLC_BUSI_TYPE {
        DR(10, "DR", "DR"),
        DF(20, "DF", "DF"),
        IP(30, "IP", "IP");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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

    /**
     * WMS数据库类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WMS_DB_TYPE {
        MYSQL(10, "mysql", "mysql"),
        SQLSERVER(20, "sqlserver", "sqlserver"),
        ORACLE(30, "oracle", "oracle"),
        POSTGRESQL(40, "postgresql", "postgresql");

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

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }

        public String getCode() {
            return code;
        }

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

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



