package com.yunfeiyun.agmp.common.enums;

public enum DictTypeEnums {

    FMS_TASK_WORK_TYPE("fms_taskwork_type","农事类型"),
    FMS_CROP_TYPE("fms_crop_type","作物类型"),
    FMS_BLOCK_TYPE("fms_block_type","地块类型"),
    WMS_CHANGE_APPLY_AUDIT_STATUS("wms_change_apply_audit_status","变动申请审核状态"),
    FMS_TASK_STATUS("fms_task_status","农事任务状态"),
    FMS_TASK_RCD_AUDIT_STATUS("fms_task_rcd_audit_status","农事任务提交记录审核状态"),
    FMS_TASK_AUDIT_TYPE("fms_task_audit_type","农事任务审核状态"),
    WMS_GOODS_TYPE("wms_goods_type","农资类型"),
    FMS_TASKPATROL_WAY("fms_taskpatrol_way","巡田方式"),
    WMS_GOODS_UNIT("wms_goods_unit","农资单位"),
    FMS_WARN_STATUS("fms_warn_status","预警状态"),
    FMS_MACH_STATUS("fms_mach_status","农机状态"),
    FMS_MACH_TYPE("fms_mach_type","农机类型"),
    FMS_POLICY_TYPE("fms_policy_type","农事决策类型"),
    AGM_PROCESS_TYPE("agm_process_type","供应商类型"),
    AGM_MPP_PRODUCT("agm_mpp_product","农产品信息"),
    TMN_BASE_TYPE("tmn_base_type","设备类型"),
    WMS_CHANGE_WAY("wms_change_way","变动方式"),
    WMS_CHANGE_APPLY_BIZ_TYPE("wms_change_apply_biz_type","变化申请业务类型"),
    AGM_MPP_PRODUCT_TYPE("agm_mpp_product_type","农产品类型"),
    SPM_PRODUCT_INOUTBOUND_TYPE("spm_product_inoutbound_type","农产品变化申请业务类型"),
    SYS_WARN_CLASS("sys_warn_class","预警分类"),
    SYS_WARN_TYPE("sys_warn_type","预警类型"),
    SPM_ORDER_SEND_TYPE("spm_order_send_type","发货方式"),
    SPM_ORDER_STATUS("spm_order_status","溯源订单状态"),
    ;

    private final String type;
    private final String label;

    DictTypeEnums(String type, String label)
    {
        this.type = type;
        this.label = label;
    }

    public String getCode()
    {
        return type;
    }

    public String getLabel()
    {
        return label;
    }

    public boolean equal(String type){
        return this.type.equals(type);
    }

    public static String labelOfType(String type){
        for(TaskStatus taskStatus: TaskStatus.values()) {
            if(taskStatus.equal(type)){
                return taskStatus.getMessage();
            }
        }
        return "";
    }
}
