package com.ningdatech.carapi.sys.entity.constant;

import com.ningdatech.carapi.sys.entity.enumeration.ImportTemplateEnum;

import java.util.*;

/**
 * <p>
 * ImportTemplateEnumConstant
 * </p>
 *
 * @author WendyYang
 * @since 20:11 2022/11/4
 */
public class ImportTemplateConstant {

    public static final List<String> VEHICLE_VIOLATION_COL_LIST = Arrays.asList("序号","城市","区（县）","企业名称","车牌号","车架号","行驶里程", "总累计违章次数", "万公里违章次数", "风险评估","备注");

    public static final List<String> VEHICLE_ACCIDENT_COL_LIST = Arrays.asList("序号","城市","区（县）","企业名称","车牌号","车架号","行驶里程", "总累计出险次数", "万公里出险次数", "风险评估","备注");

    public static final List<String> VEHICLE_OVER_SPEED_COL_LIST = Arrays.asList("序号","城市","区（县）","企业名称","车牌号","车架号","行驶里程", "总累计超速次数", "万公里超速次数", "风险评估","备注");

    private static final List<String> LAB_WORKER_CERTIFICATE = Arrays.asList("企业完整名称", "姓名", "性别", "身份证号码", "证照编号", "有效开始日期", "有效结束日期", "备注");

    private static final List<String> LAB_ACCEPTANCE_CERTIFICATE = Arrays.asList("证书编号", "企业完整名称", "备案项目", "执行标准", "发证机关", "发证日期", "备注", "换证日期");

    // private fileout final List<String> LAB_ACCEPTANCE_CERTIFICATE = Arrays.asList("证书编号", "企业名称", "备案项目", "生产能力", "执行标准", "有限期限", "发证机关", "发证日期", "备注", "换证日期");

    public static final List<String> VEHICLE_OUT_DANGER_COL_LIST = Arrays.asList("序号","所属区域","车牌号", "保險公司", "企业名称", "事故地点", "事故时间","受伤人数","死亡人数","理赔金额");

    public static final List<String> DRIVER_ARCHIVES_COL_LIST = Arrays.asList("姓名","性别","身份证号(必填)","出生年月","籍贯","手机号码","健康状况","住址","驾驶证号","准驾车型","驾驶证初次申领时间","拟驾车型","违法违规信息");

    private static final Map<ImportTemplateEnum, List<String>> IMPORT_TEMPLATE_MAP;

    static {
        IMPORT_TEMPLATE_MAP = new HashMap<>(ImportTemplateEnum.values().length);
        IMPORT_TEMPLATE_MAP.put(ImportTemplateEnum.VEHICLE_ACCIDENT, VEHICLE_ACCIDENT_COL_LIST);
        IMPORT_TEMPLATE_MAP.put(ImportTemplateEnum.VEHICLE_VIOLATION, VEHICLE_VIOLATION_COL_LIST);
        IMPORT_TEMPLATE_MAP.put(ImportTemplateEnum.VEHICLE_OVER_SPEED, VEHICLE_OVER_SPEED_COL_LIST);
        IMPORT_TEMPLATE_MAP.put(ImportTemplateEnum.LAB_WORKER_CERTIFICATE_QUA, LAB_WORKER_CERTIFICATE);
        IMPORT_TEMPLATE_MAP.put(ImportTemplateEnum.LAB_WORKER_CERTIFICATE_EDU, LAB_WORKER_CERTIFICATE);
        IMPORT_TEMPLATE_MAP.put(ImportTemplateEnum.LAB_ACCEPTANCE_CERTIFICATE, LAB_ACCEPTANCE_CERTIFICATE);
        IMPORT_TEMPLATE_MAP.put(ImportTemplateEnum.INSURE_OUT_DANGER, VEHICLE_OUT_DANGER_COL_LIST);
        IMPORT_TEMPLATE_MAP.put(ImportTemplateEnum.DRIVER_ARCHIVES,DRIVER_ARCHIVES_COL_LIST);
    }

    public static List<String> getTemplateTitle(ImportTemplateEnum template) {
        return IMPORT_TEMPLATE_MAP.getOrDefault(template, Collections.emptyList());
    }

}
