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

import com.casic.missiles.config.DeviceServerProperties;
import com.casic.missiles.core.enums.ExportExcelEnum;
import com.casic.missiles.core.util.SpringContextHolder;

public enum DeviceExportEnum implements ExportExcelEnum {

    WELLDATA_EXPORT("wellCoverData.xlsx", "wellCoverData.xlsx", "井盖查询数据"),
    LIQUIDDATA_EXPORT("liquidData.xlsx", "liquidData.xlsx", "液位数据"),
    BUSCONCENTRATOR_EXPORT("busConcentrator.xlsx", "busConcentrator.xlsx", "集中器数据"),
    DEVICE_EXPORT("device.xlsx", "device.xlsx", "设备数据");

    /**
     * 导出模板相对路径
     */
    private String fileTempPath;
    /**
     * 下载文件名
     */
    private String fileName;
    /**
     * 描述信息
     */
    private String description;

    DeviceExportEnum(String fileTempPath, String fileName, String description) {
        this.fileTempPath = SpringContextHolder.getBean(DeviceServerProperties.class).getExportPath().concat(fileTempPath);
        this.fileName = fileName;
        this.description = description;
    }

    @Override
    public String getFileTempPath() {
        return fileTempPath;
    }

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

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