package com.qmth.sop.common.enums;

/**
 * @Description: 处理时限枚举
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2023/10/14
 */
public enum ProcessLimitedEnum {

    PROJECT_KEY_INFO_DATE("project_key_info_date", "项目关键信息提交截止时间"),

    APPROVE_RADIO("approve_radio", "内审"),

    SCAN_START_TIME("scan_start_time", "扫描开始时间"),

    SCAN_END_TIME("scan_end_time", "扫描结束时间"),

    MARK_START_TIME("mark_start_time", "阅卷开始时间"),

    MARK_END_TIME("mark_end_time", "阅卷结束时间"),

    SERVICE_FINISH_PLAN_DATE("service_finish_plan_date", "现场服务撤场计划时间"),

    SERVICE_FINISH_PLAN_BEGIN_DATE("service_finish_plan_begin_date", "现场服务进场计划时间"),

    ENV_DEPLOYMENT_TIME("env_deployment_time", "环境部署时间"),

    FLOW_TASK("flow_task", "流程待办"),

    FLOW_TASK_BEFORE("flow_task_before", "流程待办提前预警"),

    FLOW_TASK_AFTER("flow_task_after", "流程待办超时预警"),

    SERVICE_SCOPE_RADIO("service_scope_radio", "服务范围"),

    CONTACTS("contacts", "联系人"),

    MOBILE_NUMBER("mobile_number", "电话"),

    ENGINEER_USERS_ID("engineer_users_id", "工程师"),

    DEPLOY_WAY_RADIO("deploy_way_radio", "部署方式"),

    MARK_WAY_RADIO("mark_way_radio", "阅卷方式"),

    SCAN_NET_RADIO("scan_net_radio", "扫描场地网络情况"),

    REGION_MANAGER_ID("region_manager_id", "大区经理"),

    PROJECT_MANAGER_ID("project_manager_id", "项目经理"),

    REGION_COORDINATOR_ID("region_coordinator_id", "区域协调人");

    private String key;

    private String title;

    private ProcessLimitedEnum(String key, String title) {
        this.key = key;
        this.title = title;
    }

    /**
     * 根据key查找枚举类
     *
     * @param key
     * @return
     */
    public static ProcessLimitedEnum convertKeyToEnum(String key) {
        ProcessLimitedEnum res = null;
        for (ProcessLimitedEnum value : ProcessLimitedEnum.values()) {
            if (key.equals(value.getKey())) {
                res = value;
            }
        }
        return res;
    }

    public String getKey() {
        return key;
    }

    public String getTitle() {
        return title;
    }
}
