package com.usky.ems.service;

import com.usky.ems.service.vo.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 统计报表服务：能源报表、区域报表、采集报表
 */
public interface EmsReportService {

    EmsReportDevicesResponse getEnergyDevices(Long energyTypeId, String keyword, Long projectId);

    EmsEnergyStatisticsResponse getEnergyStatistics(EmsEnergyStatisticsRequest request);

    void exportEnergy(String deviceIds, String attributePointIds, String timeDimension, String timeValue, String format, HttpServletResponse response);

    EmsReportDevicesResponse getRegionDevices(Long energyTypeId, Long regionId, String keyword, Long projectId);

    EmsEnergyStatisticsResponse getRegionStatistics(EmsEnergyStatisticsRequest request, List<Long> regionIds);

    void exportRegion(String deviceIds, String attributePointIds, String timeDimension, String timeValue, String regionIds, String format, HttpServletResponse response);

    EmsReportDevicesResponse getCollectionDevices(Long energyTypeId, String keyword, Long projectId);

    EmsCollectionRealtimeResponse getCollectionRealtime(EmsCollectionRealtimeRequest request);

    EmsEnergyStatisticsResponse getCollectionStatistics(EmsEnergyStatisticsRequest request);

    void exportCollection(String deviceIds, String attributePointIds, String timeDimension, String timeValue, String format, HttpServletResponse response);

    /**
     * 获取能源报表数据
     *
     * @param request 请求参数
     * @return 能源报表响应
     */
    EnergyReportResponse getEnergyReport(EnergyReportRequest request);

    /**
     * 获取分项报表数据
     *
     * @param request 请求参数
     * @return 分项报表响应
     */
    ItemReportResponse getItemReport(ItemReportRequest request);

    /**
     * 获取区域报表数据
     *
     * @param request 请求参数
     * @return 区域报表响应
     */
    SpaceReportResponse getSpaceReport(SpaceReportRequest request);

    /**
     * 导出能源报表 Excel
     */
    void exportEnergyReport(EnergyReportRequest request, HttpServletResponse response);

    /**
     * 导出区域报表 Excel
     */
    void exportSpaceReport(SpaceReportRequest request, HttpServletResponse response);
}
