package com.casic.missiles.modular.system.enums;


import com.casic.missiles.core.enums.ExportExcelHeaderEnum;
import org.hswebframework.expands.office.excel.config.Header;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 设备导出标题枚举
 *
 * @author lwh
 */
public enum DeviceExportHeadersEnum implements ExportExcelHeaderEnum {
    /**
     * 设备导出
     */
    DEVICE_EXPORT(new ArrayList() {{
        add(new Header("设备编号", "devcode"));
        add(new Header("设备名称", "deviceName"));
        add(new Header("监控内容", "watchType"));
        add(new Header("在线状态", "onlineStateName"));
        add(new Header("设备位置", "position"));
        add(new Header("井编号", "wellCode"));
        add(new Header("集中器编号", "concenCode"));
        add(new Header("安装时间", "installDateFmt"));
    }}, new HashMap<String, Short>() {
        {
            put("设备编号", (short)6000);
            put("设备名称", (short)8000);
            put("监控内容", (short)6000);
            put("设备位置", (short)6000);
            put("权属单位", (short)8000);
            put("井编号", (short)6000);
            put("集中器编号", (short)6000);
            put("安装时间", (short)5000);
        }
    }, "device.xlsx", "井盖设备数据导出"
    );

    /**
     * 导出模板相对路径
     */
    private List<Header> headers;
    /**
     * 下载文件名
     */
    private String fileName;
    /**
     * 描述信息
     */
    private String description;
    private Map<String, Short> customColumnStyle;

    DeviceExportHeadersEnum(List<Header> headers, String fileName, String description) {
        this.headers = headers;
        this.fileName = fileName;
        this.description = description;
    }

    DeviceExportHeadersEnum(List<Header> headers, Map<String, Short> customColumnStyle, String fileName, String description) {
        this.headers = headers;
        this.fileName = fileName;
        this.description = description;
        this.customColumnStyle = customColumnStyle;
    }

    @Override
    public List<Header> getHeaders() {
        return headers;
    }

    @Override
    public String getFileName() {
        return fileName;
    }

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

    @Override
    public Map<String, Short> getCustomColumnStyle() {
        return this.customColumnStyle;
    }

}
