package com.zcxk.charge.web.service;

import com.zcxk.charge.api.dto.generalview.*;
import com.zcxk.charge.api.dto.query.ChartReportDto;
import com.zcxk.charge.api.dto.query.MonitorDataChartQueryDto;
import com.zcxk.charge.api.dto.query.MonitorDataCompareQueryDto;
import com.zcxk.charge.api.vo.DeviceWaterSupplyVo;
import com.zcxk.charge.api.vo.MonitorDataChartReportDeviceVo;
import com.zcxk.charge.api.vo.SceneAlarmVo;
import com.zcxk.charge.api.vo.SceneNormalRateVo;
import com.zcxk.charge.core.entity.DeviceEntity;
import com.zcxk.charge.core.entity.MonitorDataEntity;
import com.zcxk.core.oauth2.pojo.LoginUser;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @description
 * @author  wangli
 * @data 2020/12/7 20:22
 */
public interface MonitorDataReportService {

    /**
    * 日报
    * @author Andy
    * @date 17:53 2021/8/13
    * @param chartDto:
    * @return java.util.List<com.zcxk.charge.api.vo.MonitorDataChartReportDeviceVo>
    **/
    List<MonitorDataChartReportDeviceVo> monitorDataChartReportByDay(ChartReportDto chartDto);

    /**
    * 月报
    * @author Andy
    * @date 11:42 2021/8/17
    * @param chartDto:
    * @return java.util.List<com.zcxk.charge.api.vo.MonitorDataChartReportDeviceVo>
    **/
    List<MonitorDataChartReportDeviceVo> monitorDataChartReportByMonth(ChartReportDto chartDto);

    /**
    * 年报
    * @author Andy
    * @date 11:42 2021/8/17
    * @param chartDto:
    * @return java.util.List<com.zcxk.charge.api.vo.MonitorDataChartReportDeviceVo>
    **/
    List<MonitorDataChartReportDeviceVo> monitorDataChartReportByYear(ChartReportDto chartDto);

    /**
    * 月报
    * @author Andy
    * @date 11:42 2021/8/17
    * @param chartDto:
    * @return java.util.List<com.zcxk.charge.api.vo.MonitorDataChartReportDeviceVo>
    **/
    List<MonitorDataChartReportDeviceVo> monthMonitorData(ChartReportDto chartDto);

    /**
    * 报警次数
    * @author Andy
    * @date 18:50 2021/8/16
    * @param queryDto:
    * @return java.util.List<com.zcxk.charge.api.vo.MonitorDataChartReportDeviceVo>
    **/
    List<MonitorDataChartReportDeviceVo> deviceAlarmReport(MonitorDataCompareQueryDto queryDto);

    /**
    * 水质对比
    * @author Andy
    * @date 18:39 2021/8/16
    * @param queryDto:
    * @return java.util.List<com.zcxk.charge.api.vo.MonitorDataChartReportDeviceVo>
    **/
    List<MonitorDataChartReportDeviceVo> monitorDataQualityReport(MonitorDataCompareQueryDto queryDto);

    /**
    * 能耗对比
    * @author Andy
    * @date 18:08 2021/8/16
    * @param queryDto:
    * @return java.util.List<com.zcxk.charge.api.vo.MonitorDataChartReportDeviceVo>
    **/
    List<MonitorDataChartReportDeviceVo> monitorDataEnergyReport(MonitorDataCompareQueryDto queryDto);

    /**
    * 水电耗
    * @author Andy
    * @date 11:41 2021/8/17
    * @param queryDto:
    * @return java.util.List<com.zcxk.charge.api.vo.MonitorDataChartReportDeviceVo>
    **/
    List<MonitorDataChartReportDeviceVo> monitorWaterPowerConsumptionReport(MonitorDataCompareQueryDto queryDto);

    /**
    * 获取设备
    * @author Andy
    * @date 11:41 2021/8/17
    * @param sceneTypeName:
    * @return java.util.List<com.zcxk.charge.core.entity.DeviceEntity>
    **/
    List<DeviceEntity> getDeviceBySceneTypeName(String sceneTypeName);

    /**
    * 设备报表
    * @author Andy
    * @date 11:41 2021/8/17
    * @param dto:
    * @return java.util.List<com.zcxk.charge.api.vo.MonitorDataChartReportDeviceVo>
    **/
    List<MonitorDataChartReportDeviceVo> monitorDataDeviceReport(MonitorDataChartQueryDto dto);

    /**
    * 概览页所有数据
    * @author Andy
    * @date 11:41 2021/8/17
    * @param :
    * @return com.zcxk.charge.api.dto.generalview.GeneralViewResults
    **/
    GeneralViewResults monitorDataGeneralView();

    /**
    * 近30天水量
    * @author Andy
    * @date 11:41 2021/8/17
    * @param :
    * @return java.util.List<com.zcxk.charge.api.vo.DeviceWaterSupplyVo>
    **/
    List<DeviceWaterSupplyVo> deviceWaterSupplie();

    /**
    * 供水详情数据
    * @author Andy
    * @date 11:41 2021/8/17
    * @param :
    * @return com.zcxk.charge.api.dto.generalview.DeviceWaterAmount
    **/
    DeviceWaterAmount deviceWaterAmount();

    /**
    * 实时报警信息
    * @author Andy
    * @date 11:41 2021/8/17
    * @param :
    * @return java.util.List<com.zcxk.charge.api.vo.SceneAlarmVo>
    **/
    List<SceneAlarmVo> sceneAlarms();

    /**
    * 管网水质情况
    * @author Andy
    * @date 11:41 2021/8/17
    * @param :
    * @return java.util.List<com.zcxk.charge.api.vo.SceneNormalRateVo>
    **/
    List<SceneNormalRateVo> sceneNormalRates();

    /**
    * 压力分布区间
    * @author Andy
    * @date 11:42 2021/8/17
    * @param sceneType:
    * @return com.zcxk.charge.api.dto.generalview.SceneWaterPressure
    **/
    SceneWaterPressure sceneWaterPressure(String sceneType);

    /**
    * 水量排行
    * @author Andy
    * @date 11:42 2021/8/17
    * @param :
    * @return java.util.List<com.zcxk.charge.api.dto.generalview.SceneWaterAmount>
    **/
    List<SceneWaterAmount> sceneWaterAmounts();

    /**
    * 对比曲线图
    * @author Andy
    * @date 11:42 2021/8/17
    * @param sceneTypeName:
    * @return java.util.List<com.zcxk.charge.api.dto.generalview.WaterSupplyChart>
    **/
    List<WaterSupplyChart> waterSupplyCharts(String sceneTypeName);

    /**
    * 对比曲线图当月
    * @author Andy
    * @date 11:42 2021/8/17
    * @param sceneTypeName:
    * @param sceneId:
    * @return java.util.List<com.zcxk.charge.api.dto.generalview.WaterSupplyChart>
    **/
    List<WaterSupplyChart> waterSupplyChartsForCurrentMonth(String sceneTypeName, Long sceneId);

    /**
    * waterSupplyChartsByMonth
    * @author Andy
    * @date 11:42 2021/8/17
    * @param sceneTypeName:
    * @param companyOrgId:
    * @return java.util.List<com.zcxk.charge.api.dto.generalview.WaterSupplyChart>
    **/
    List<WaterSupplyChart>  waterSupplyChartsByMonth(String sceneTypeName, Integer companyOrgId);

    /**
    * getIntegerMonitorDataEntityMap
    * @author Andy
    * @date 11:42 2021/8/17
    * @param loginUser:
    * @return java.util.Map<java.lang.Integer,com.zcxk.charge.core.entity.MonitorDataEntity>
    **/
    Map<Integer, MonitorDataEntity> getIntegerMonitorDataEntityMap(LoginUser loginUser);

    /**
    * 获取设备属性
    * @author Andy
    * @date 10:36 2021/8/17
    * @param deviceCode:
    * @param attributeId:
    * @return java.math.BigDecimal
    **/
    BigDecimal getDeviceAttributeValue(String deviceCode, Long attributeId);



    /**
    * 金额统计
    * @author Andy
    * @date 9:53 2021/8/17
    * @param sceneId:
    * @param paramType:
    * @param searchType:
    * @return java.math.BigDecimal
    **/
    BigDecimal getAmountCount(Integer sceneId, Integer paramType, Integer searchType);

    /**
    * 金额统计
    * @author Andy
    * @date 9:53 2021/8/17
    * @param companyOrgId:
    * @param sceneId:
    * @param sceneTypeName:
    * @param paramType:
    * @param searchType:
    * @return java.math.BigDecimal
    **/
    BigDecimal getAmountCount(Integer companyOrgId, Integer sceneId, String sceneTypeName, Integer paramType, Integer searchType);

    /**
    * 获取设备的最后采集时间
    * @author Andy
    * @date 9:59 2021/8/17
    * @param companyOrgId:
    * @param sceneId:
    * @param sceneTypeName:
    * @return java.util.Date
    **/
    Date getLastCollectTime(Integer companyOrgId, Integer sceneId, String sceneTypeName);

    /**
     * 获取用水量
     * @param companyOrgId
     * @param searchType
     * @return 查询类型：1月 2年
     */
    BigDecimal getUseAmount(Integer companyOrgId, Integer searchType);
}




