package com.tofly.water.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.scada.entity.Allocation;
import com.tofly.scada.entity.vo.StatisticsScadaVo;
import com.tofly.water.entity.dto.*;
import com.tofly.water.entity.vo.*;

import java.text.ParseException;
import java.util.List;

/**
 * @author HaiQiu
 * @since 2022/11/22
 */
public interface OverviewService {

    /**
     * 查询历史scada数据
     * @param page 分页
     * @param overviewDto 查询条件
     * @return 历史scada数据
     */
    Page<DeviceBusPumpsVo> whole(Page page, OverviewDto overviewDto);


    /**
     * 报警数据
     * @param page 分页
     * @param reportDto 查询条件
     * @return 报警数据
     */
    Page<DeviceBusPumpsVo> alert(Page page, ReportDto reportDto);
    /**
     * 最新数据
     * @param page 分页
     * @param newestDto 查询条件
     * @return 最新数据
     */
    Page<DeviceBusPumpsVo> newest(Page page, NewestDto newestDto);

    Page<StatisticsScadaVo> waterSupply(Page page, OverviewDto overviewDto);

    Page<StatisticsScadaVo> powerSupply(Page page, OverviewDto overviewDto);

    Page<MonitorPumpVo> monitor(Page page, MonitorDto overviewDto);

    Page<MonitorPumpVo> monitorNew(Page page, MonitorDto overviewDto);


    void monitorExport(Page page, MonitorDto overviewDto, boolean exportAll);

    Object monitorReal(Page page, MonitorRealDto dto);

    Object historyReal(Page page, MonitorRealDto dto);

    Object reportReal(Page page, MonitorRealDto dto);

    Object statisticsReal(Page page, StatisticsRealDto dto);

    Object getMapResultRespone(StatisticsRealDto dto, Object o);

    Object getMapResultRespone(StatisticsRealDto dto, Object o,Integer pumpStatisticsType);

    Object reportCount();

    Object runLog(RunLogDto runLogDto, Page page);

    List<Allocation> selectPumpByIndex(List<Long> ids, Integer type);

    /**
     * 水厂月供水量
     * @param yearAndMonth 格式 yyyyMM
     * @return
     */
    Object waterSupplyOneMonth(String waterType,String yearAndMonth,List<String> code);

    /**
     * 水厂今日供水量
     * @return
     */
   List<WaterSupplyVo> waterSupplyDay(List<String> codes);


    /**
     * 水厂今年供水量
     * @return
     */
    List<WaterSupplyVo> waterSupplyYear(List<String> codes) throws ParseException;

    List<PupmSupplyVo> pumpSupplyDay();

    List<PupmSupplyVo> pumpSupplyYear();

    Object waterSupplyWsReport(String startDate, String endDate,String waterSupplyJin,String waterSupplyChu);

    Object waterSupplyReport(String startDate, String endDate,Long waterId,String waterSupplyJin,String waterSupplyChu);

    Object waterSupplyDealInfo(Long waterId, List<String> codes);

    WaterProductionInfoVo waterProductionInfo(String waterType, String codes,String waterSupplyJin,String waterSupplyChu);

    Object waterSupplyReportComm(String startDate, String endDate, Integer dateType, Long waterId, String waterSupplyJinAll, String waterSupplyChuAll);
}
