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


import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @Description :
 * @Reference :
 * @Author : jason.niu
 * @CreateDate : 2019-11-11
 * @Modify:
 **/
public class ApsEnumUtil {

    /**
     * 日历中选择星期的多选枚举
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CALENDAR_WEEK {
        MONDAY(1, "星期一"),
        TUESDAY(2, "星期二"),
        WEDNESDAY(4, "星期三"),
        THURSDAY(8, "星期四"),
        FRIDAY(16, "星期五"),
        SATURDAY(32, "星期六"),
        SUNDAY(64, "星期天");

        private int value;
        private String description;

        CALENDAR_WEEK(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 MATERIAL_TYPE {
        PRODUCT("PRODUCT", "成品"),
        HALF_PRODUCT("HALF_PRODUCT", "半成品"),
        RAW_MATERIAL("RAW_MATERIAL", "原材料"),
        INNER_PRODUCT("INNER_PRODUCT", "中间品"),
        VIRTUAL("VIRTUAL", "虚拟件");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 物料报表统计类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MATERIAL_REPORT_TYPE {
        PURCHASE("PURCHASE", "采购"),
        PRODUCE("PRODUCE", "生产"),
        INVENTORY("INVENTORY", "库存");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 报表时间间隔
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum REPORT_TIME_SPAN {
        ONE_HOUR("ONE_HOUR", "1小时"),
        EIGHT_HOUR("EIGHT_HOUR", "8小时"),
        TWELVE_HOUR("TWELVE_HOUR", "12小时"),
        ONE_DAY("ONE_DAY", "一天"),
        ONE_WEEK("ONE_WEEK", "一周"),
        ONE_MONTH("ONE_MONTH", "一月");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 备料类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PREPARE_TYPE {
        NO("NO", "不备料"),
        SELF_MAKE("SELF_MAKE", "自制"),  // 自制
        PURCHASE("PURCHASE", "采购");    // 采购

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 补充类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum REPLENISHMENT_TYPE {
        NO("NO", "不补充"),
        BATCH("BATCH", "批量补充"),
        ONEBYONE("ONEBYONE", "一对一补充");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 物料分配限制
     * 主要考虑输出订的最晚计算时间不能晚于输入的最晚计算时间
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum MATERIAL_ASSIGN_LIMIT {
        INVENTORY(1, "库存制约"),
        PURCHASE(2, "采购制约"),
        PRODUCT(4, "生产制约");

        private int value;
        private String description;

        MATERIAL_ASSIGN_LIMIT(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 DIRECTION {
        POSITIVE("POSITIVE", "正向"),
        REVERSE("REVERSE", "逆向");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 尾数处理方式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TAIL_DEAL {
        NODEAL("NODEAL", "不处理"),
        CEILING("CEILING", "向下"),
        PUSHFRONT("PUSHFRONT", "向上");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 则管理中规则的类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RULE_TYPE {
        CANCEL_PLAN("CANCEL_PLAN", "取消计划"),
        MAT_CALC("MAT_CALC", "物料运算"),
        HEURISTIC("HEURISTIC", "排程运算"),
        FIELD_SET("FIELD_SET", "字段赋值"),
        FLUSH_PLAN("FLUSH_PLAN", "刷新计划");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 资源区分
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RESOURCE_CLASS {
        LIMITLESS("LIMITLESS", "无限能力"),
        SINGLE("SINGLE", "单能力"),
        BATCH("BATCH", "炉资源");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 锁定时间的取值方式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RESOURCE_LOCK_TYPE {
        NONE("NONE", "不锁定"),
        PRODUCE_BEGIN("PRODUCE_BEGIN", "后工序生产开始时刻"),
        PRODUCE_END("PRODUCE_END", "后工序生产结束时刻");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 资源类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RESOURCE_TYPE {
        MAIN("MAIN", "主资源"),
        ASS("ASS", "副资源");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 资源效率影响类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum EFFICIENCY_EFFECT {
        PREV_SET(1, "前设置"),    // 前设置
        PRODUCE(2, "生产"),     // 生产
        POST_SET(4, "后设置");    // 后设置

        private int value;
        private String description;

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

        public int getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 预置的资源选择规则
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RESOURCE_CHOISE_RULE {
        PREV_SET_TIME("PREV_SET_TIME", "前设置时间"),
        PRODUCE_TIME("PRODUCE_TIME", "生产时间"),
        POST_SET_TIME("POST_SET_TIME", "后设置时间"),
        WORK_WAIT_TIME("WORK_WAIT_TIME", "工作等待时间"),
        RES_BALANCE("RES_BALANCE", "资源均衡度"),
        SAME_MATERIAL("SAME_MATERIAL", "相同物料"),
        SAME_ORDER("SAME_ORDER", "相同订单"),
        NEARLY_WORK("NEARLY_WORK", "前后工作"),
        POST_RESOURCE("POST_RESOURCE", "后资源制约"),
        SAME_ASS_RESOURCE("SAME_ASS_RESOURCE", "相同副资源"),
        RESOURCE_PRIORITY("RESOURCE_PRIORITY", "资源优先级"),
        RESOURCE_USEAGE("RESOURCE_USEAGE", "资源使用率"),
        CUST_EXPRESSION("CUST_EXPRESSION", "自定义表达式");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 订单删除限制
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ORDER_DEL_LIMIT {
        NONE("NONE", "不限制"),
        NO_PO("NO_PO", "未计划"),
        NO_PLAN("NO_PLAN", "计划完毕"),
        NO_POR("NO_POR", "指示完毕"),
        NO_PPRS("NO_PPRS", "已确认");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 锁定时间计算方式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RES_COMB_LOCK_TYPE {
        KEEP_ORIGIN("KEEP_ORIGIN", "各自锁定"),
        MAIN_LOCK("MAIN_LOCK", "主资源锁定"),
        MAX_ALL_RESOURCE("MAX_ALL_RESOURCE", "最大锁定时间");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 生产时间计算方法
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RES_COMB_TIME_TYPE {
        MAIN_RESOURCE("MAIN_RESOURCE", "主资源"),
        MAX_ASS_RESOURCE("MAX_ASS_RESOURCE", "副资源最大值"),
        MIN_ASS_RESOURCE("MIN_ASS_RESOURCE", "副资源最小值"),
        AVG_ASS_RESOURCE("AVG_ASS_RESOURCE", "副资源平均值"),
        MAX_ALL_RESOURCE("MAX_ALL_RESOURCE", "主副资源最大值"),
        MIN_ALL_RESOURCE("MIN_ALL_RESOURCE", "主副资源最小值"),
        AVG_ALL_RESOURCE("AVG_ALL_RESOURCE", "主副资源平均值");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 时间圆整方式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum TIME_ROUND_TYPE {
        UP("UP", "向上"),
        DOWN("DOWN", "向下"),
        ROUNDING("ROUNDING", "四舍五入");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 工艺路径有效性判断类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ROUTING_VALID_TYPE {
        ORDER_CALC_LET("ORDER_CALC_LET", "与订单的最晚结束时刻计算值做比较"),
        CALC_LET_LT("CALC_LET_LT", "与最晚结束时刻计算值-提前期做比较"),
        BASE_TIME("BASE_TIME", "与基准时刻做比较");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 使用类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum USE_TYPE {
        MAIN("MAIN", "主资源"),
        FIRST_ASS("FIRST_ASS", "第一套副资源"),
        SECOND_ASS("SECOND_ASS", "第二套副资源"),
        THIRD_ASS("THIRD_ASS", "第三套副资源"),
        FOURTH_ASS("FOURTH_ASS", "第四套副资源"),
        FIFTH_ASS("FIFTH_ASS", "第五套副资源"),
        SIXTH_ASS("SIXTH_ASS", "第六套副资源");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 工作计划类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_PLAN_TYPE {
        MAIN_PLAN("MAIN_PLAN", "主资源计划"),
        ASS_PLAN("ASS_PLAN", "副资源计划"),
        BATCH_PLAN("BATCH_PLAN", "炉资源计划");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 工作关联类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_RELATION_TYPE {
        INNER("INNER", "订单内关联"),
        OUTER("OUTER", "订单间关联");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 工作排序规则
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_SORT_RULE {
        ORDER_LET("ORDER_LET", "订单交货期"),
        ORDER_PRIORITY("ORDER_PRIORITY", "订单优先级"),
        ORDER_EST("ORDER_EST", "订单最早开始时刻"),
        ORDER_COUNT("ORDER_COUNT", "订单数量"),
        ORDER_RECEIVE_DATE("ORDER_RECEIVE_DATE", "订单接单日期"),
        ORDER_LET_SUB_EST("ORDER_LET_SUB_EST", "订单交货期与订单最早开始时刻之差"),
        ORDER_SURPLUS("ORDER_SURPLUS", "订单余裕度"),
        NOPLAN_OPERATION_SIZE("NOPLAN_OPERATION_SIZE", "残留工序数"),
        REMAIN_PRODUCE_TIME("REMAIN_PRODUCE_TIME", "残留生产时间"),
        MIN_OPERATION_REMAIN_TIME("MIN_OPERATION_REMAIN_TIME", "最小工序宽裕时间"),
        WORK_LET("WORK_LET", "工作最晚结束时刻"),
        WORK_EST("WORK_EST", "工作最早开始时刻"),
        FIRST_WORK_BEGIN("FIRST_WORK_BEGIN", "订单首工作上次开始时刻"),
        HAVE_HIGH_WORK("HAVE_HIGH_WORK", "订单中含有高级别工作"),
        WORK_RESOURCE_SIZE("WORK_RESOURCE_SIZE", "工作的可用资源数"),
        TOP_ORDER_LET("TOP_ORDER_LET", "顶层订单的交货期"),
        TOP_ORDER_CODE("TOP_ORDER_CODE", "顶层订单代码"),
        TOP_ORDER_PRIORITY("TOP_ORDER_PRIORITY", "顶层订单优先级"),
        CUST_EXPRESSION("CUST_EXPRESSION", "自定义表达式");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 工作分割类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_SPLIT_TYPE {
        NONE("NONE", "不分割"),
        RATIO("RATIO", "按比例分割"),
        COUNT("COUNT", "按数量分割"),
        BATCH("BATCH", "按批量分割"),
        REMAINDER("REMAINDER", "按余数分割");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 工作状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_STATUS {
        NOPLAN("NOPLAN", "未计划"),
        PLANDONE("PLANDONE", "计划完毕"),
        INDICATIONDONE("INDICATIONDONE", "指示完毕"),
        CONFIRM("CONFIRM", "确认"),
        STARTPRODUCT("STARTPRODUCT", "开始生产"),
        FINISH("FINISH", "完成");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 工作种类
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum WORK_TYPE {
        FICTITIOUS("FICTITIOUS", "虚拟工作"),
        NORMAL("NORMAL", "普通工作");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 动态设置时间影响类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DYNAMIC_SET_TYPE {
        PREV_SET("PREV_SET", "只对前设置影响"),
        POST_SET("POST_SET", "只对后设置影响"),
        ALL("ALL", "对前后设置都产生影响");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 动态设置事件取值方式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DYNAMIC_SET_CALC {
        MIN("MIN", "取最小值"),
        MAX("MAX", "取最大值"),
        SUM("SUM", "求和");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 接续方式
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CONSTRAINT_TYPE {
        ES("ES", "前工序结束，后工序开始"),
        SS("SS", "前工序开始，后工序开始"),
        EE("EE", "前工序结束，后工序结束"),
        SSEE("SSEE", "前后工序同时开始或同时结束");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 加班日历类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum CALENDAR_TYPE {
        ENABLE("ENABLE", "加班"),
        DISABLE("DISABLE", "下班");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 导入类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum IMPORT_DETAIL_TYPE {
        REPLACE("REPLACE", "替代导入"),
        DIFF("DIFF", "差分导入");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 字段赋值对象
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum FIELD_SET_BEAN {
        Material("Material", "物料"),
        ProductRouting("ProductRouting", "工艺路线"),
        Operation("Operation", "工序"),
        OperInput("OperInput", "工序输入"),
        OperOutput("OperOutput", "工序输出"),
        OperResource("OperResource", "工序资源"),
        StandOperation("StandOperation", "标准工序"),
        SalesOrder("SalesOrder", "销售订单"),
        ProductOrder("ProductOrder", "生产订单"),
        PurchaseOrder("PurchaseOrder", "采购订单"),
        Inventory("Inventory", "库存"),
        Work("Work", "工作"),
        WorkInput("WorkInput", "工作输入"),
        WorkOutput("WorkOutput", "工作输出"),
        WorkResource("WorkResource", "工作资源"),
        WorkRelation("WorkRelation", "工作关联");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 计划类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum PLAN_TYPE {
        PREV_SET("", "前设置"),
        PRODUCE("", "生产"),
        POST_SET("", "后设置"),
        LOCK("", "锁定");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 数据连接类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum DATA_LINK_TYPE {
        EXCEL("EXCEL", "EXCEL"),
        MYSQL("MYSQL", "MySql"),
        ORACLE("ORACLE", "Oracle"),
        SQLSERVER("SQLSERVER", "SqlServer");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 字段的编辑类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum EDIT_TYPE {
        NONE("NONE", "未知"),
        BOOLEAN("BOOLEAN", "布尔, 开关编辑"),
        CHAR("CHAR", "字符, 文本框编辑"),
        SHORT("SHORT", "短整型, 数字编辑"),
        INTEGER("INTEGER", "整型, 数字编辑"),
        LONG("LONG", "长整型, 数字编辑"),
        DOUBLE("DOUBLE", "浮点型, 文本框编辑"),
        DATE("DATE", "日期类型(2019-09-16)"),
        TIME("TIME", "时间类型(17:35:30)"),
        DATE_TIME("DATE_TIME", "日期时间类型(2019-09-16 17:35:30)"),
        DURATION("DURATION", "时间段(1H),文本框编辑"),
        ENUM("ENUM", "枚举,下拉选择"),
        MULTI_ENUM("MULTI_ENUM", "多选枚举， 下拉多选"),
        STRING("STRING", "字符串，文本框编辑"),
        OBJECT("OBJECT", "关联对象，下来选择关联对象的Code值"),
        LIST("LIST", "对象集合，不可编辑。"),
        MULTI_OBJECT("MULTI_OBJECT", "多选对象，弹出框选择，可以选择全部对象，以*表示选择全部");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 字段类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum FIELD_TYPE {
        NONE("NONE", "未知"),
        BOOLEAN("BOOLEAN", "布尔"),
        CHAR("CHAR", "字符"),
        SHORT("SHORT", "短整型"),
        INTEGER("INTEGER", "整型"),
        LONG("LONG", "长整型"),
        DOUBLE("DOUBLE", "浮点型"),
        DATE("DATE", "日期类型(2019-09-16)"),
        TIME("TIME", "时间类型(17:35:30)"),
        DATE_TIME("DATE_TIME", "日期时间类型(2019-09-16 17:35:30)"),
        DURATION("DURATION", "时间段(1H)"),
        ENUM("ENUM", "枚举"),
        MULTI_ENUM("MULTI_ENUM", "多选枚举"),
        STRING("STRING", "字符串"),
        OBJECT("OBJECT", "关联对象，下来选择关联对象的Code值"),
        LIST("LIST", "对象集合，不可编辑。");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 资源符合时间间隔类型
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum RESOURCE_LOAD_SPAN {
        ONE_HOUR("ONE_HOUR", "1小时"),
        TWO_HOUR("TWO_HOUR", "2小时"),
        SIX_HOUR("SIX_HOUR", "6小时"),
        EIGHT_HOUR("EIGHT_HOUR", "8小时"),
        TWELVE_HOUR("TWELVE_HOUR", "12小时"),
        ONE_DAY("ONE_DAY", "1天"),
        ONE_WEEK("ONE_WEEK", "1周"),
        ONE_MONTH("ONE_MONTH", "1月");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

        public String getDescription() {
            return description;
        }
    }

    /**
     * 订单状态
     */
    @JsonFormat(shape = JsonFormat.Shape.OBJECT)
    public enum ORDER_STATUS {
        NOPLAN("NOPLAN", "未计划"),
        PLANDONE("PLANDONE", "计划完毕"),
        INDICATIONDONE("INDICATIONDONE", "指示完毕"),
        CONFIRM("CONFIRM", "确认"),
        STARTPRODUCT("STARTPRODUCT", "开始生产"),
        FINISH("FINISH", "完成");

        private String value;
        private String description;

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

        public String getValue() {
            return value;
        }

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