package com.njcn.event.service.majornetwork;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
import com.njcn.event.pojo.param.*;
import com.njcn.event.pojo.vo.*;
import freemarker.template.TemplateException;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.ParseException;
import java.util.List;

/**
 * @author xxy
 * @version 1.0.0
 * @date 2022年07月28日 13:32
 */
public interface ReportService {

    List<GeneralVO> getGeneralSituation(DeviceInfoParam.BusinessParam businessParam);

    List<GeneralVO> getVoltage(DeviceInfoParam.BusinessParam businessParam);

    List<WaveTypeVO> getSeverity(DeviceInfoParam.BusinessParam businessParam);

    List<ReasonsVO> getReason(DeviceInfoParam.BusinessParam businessParam);

    Page<DetailVO> getContinueTime(WaveTypeParam waveTypeParam);

    Page<DetailVO> getSagTimes(WaveTypeParam waveTypeParam);

    Page<DetailVO> getUpTimes(WaveTypeParam waveTypeParam);

    Page<DetailVO> getBreakTimes(WaveTypeParam waveTypeParam);

    void getExport(DeviceInfoParam.BusinessParam businessParam, HttpServletResponse response) throws IOException, TemplateException;

    void getLineExport(ExportParam exportParam, HttpServletResponse response) throws InvalidFormatException, IOException, TemplateException, ParseException;

    /**
     * 获取事件报告
     *
     * @author zbj
     * @date 2022/7/29
     */
    Page<WaveTypeVO> getEventReport(WaveTypeParam deviceInfoParam);

    /**
     * 获取区域报告
     *
     * @author zbj
     * @date 2022/8/4
     */
    void getAreaReport(AreaReportParam areaReportParam, HttpServletResponse response) throws Exception;


    /***
     * Pms获取区域报告
     * @author wr
     * @date 2023-03-07 10:16
     * @param areaReportParam
     * @param response
     */
    void getPmsAreaReport(AreaReportParam areaReportParam, HttpServletResponse response) throws Exception;

    /**
     * @Description: 灿能云暂态报告
     * @param businessParam
     * @return: java.lang.String
     * @Author: wr
     * @Date: 2024/1/3 11:46
     */
    String appEventExport(DeviceInfoParam.BusinessParam businessParam) throws TemplateException, IOException;
}
