package com.zcxk.charge.core.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zcxk.charge.api.dto.*;
import com.zcxk.charge.api.vo.DevicePressReportAttributeVo;
import com.zcxk.charge.api.vo.DeviceWaterReportAttributeVo;
import com.zcxk.charge.api.vo.ReportAttributeVo;
import com.zcxk.charge.api.vo.ReportVo;
import com.zcxk.charge.core.entity.MonthReportEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;

/**
 *
 * sms_day_reportDAO接口
 * @author: WYY
 * @date 2020-12-03 16:20
 */
@Mapper
public interface MonthReportMapper extends BaseMapper<MonthReportEntity> {

	/**
	* 自定义分页查询
	* @author Andy
	* @date 9:16 2021/8/18
	* @param page:
	* @param monthReportEntity:
	* @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.zcxk.charge.api.vo.ReportVo>
	**/
    Page<ReportVo> findPage(IPage<ReportDto> page,
                             @Param("monthReport") MonthReportEntity monthReportEntity);

    /**
    * findPageReprot
    * @author Andy
    * @date 9:17 2021/8/18
    * @param page:
    * @param reportPageQueryDto:
    * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.zcxk.charge.api.vo.ReportVo>
    **/
    Page<ReportVo> findPageReprot(IPage<ReportDto> page,
                                   @Param("monthReport") ReportPageQueryDto reportPageQueryDto);

    /**
    * findMonthReportById
    * @author Andy
    * @date 9:17 2021/8/18
    * @param id:
    * @return com.zcxk.charge.core.entity.MonthReportEntity
    **/
    MonthReportEntity findMonthReportById(Serializable id);

    /**
    * findList
    * @author Andy
    * @date 9:17 2021/8/18
    * @param monthReportEntity:
    * @return java.util.List<com.zcxk.charge.core.entity.MonthReportEntity>
    **/
    List<MonthReportEntity> findList(MonthReportEntity monthReportEntity);

    /**
    * findAttributeList
    * @author Andy
    * @date 9:17 2021/8/18
    * @param reportDto:
    * @return java.util.List<com.zcxk.charge.api.vo.ReportAttributeVo>
    **/
    List<ReportAttributeVo> findAttributeList(@Param("report") ReportDto reportDto);

    /**
    * findReport
    * @author Andy
    * @date 9:17 2021/8/18
    * @param item:
    * @return java.util.List<com.zcxk.charge.api.vo.ReportVo>
    **/
    List<ReportVo> findReport(@Param("report") ReportDto item);

    /**
    * findDevicePressPage
    * @author Andy
    * @date 9:17 2021/8/18
    * @param page:
    * @param monthReportEntity:
    * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.zcxk.charge.api.vo.DevicePressReportAttributeVo>
    **/
    Page<DevicePressReportAttributeVo> findDevicePressPage(IPage<DevicePressReportAttributeDto> page, @Param("monthReport") MonthReportEntity monthReportEntity);

    /**
    * findDeviceWaterPage
    * @author Andy
    * @date 9:17 2021/8/18
    * @param page:
    * @param monthReportEntity:
    * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.zcxk.charge.api.vo.DeviceWaterReportAttributeVo>
    **/
    Page<DeviceWaterReportAttributeVo> findDeviceWaterPage(IPage<DeviceWaterReportAttributeDto> page, @Param("monthReport") MonthReportEntity monthReportEntity);

    /**
    * findAmountBySceneIds
    * @author Andy
    * @date 9:17 2021/8/18
    * @param monthReportEntity:
    * @return java.util.List<com.zcxk.charge.core.entity.MonthReportEntity>
    **/
    List<MonthReportEntity> findAmountBySceneIds(@Param("monthReport") MonthReportEntity monthReportEntity);

    /**
    * findAmountTotalBySceneIds
    * @author Andy
    * @date 9:17 2021/8/18
    * @param monthReportEntity:
    * @return java.util.List<com.zcxk.charge.core.entity.MonthReportEntity>
    **/
    List<MonthReportEntity> findAmountTotalBySceneIds(@Param("monthReport") MonthReportEntity monthReportEntity);

    /**
    * findAttributeListForMonth
    * @author Andy
    * @date 9:17 2021/8/18
    * @param reportDto:
    * @return java.util.List<com.zcxk.charge.api.vo.ReportAttributeVo>
    **/
    List<ReportAttributeVo> findAttributeListForMonth(@Param("report") ReportDto reportDto);

    /**
    * findSumValue
    * @author Andy
    * @date 9:17 2021/8/18
    * @param reportDto:
    * @return com.zcxk.charge.api.vo.ReportAttributeVo
    **/
    ReportAttributeVo findSumValue(@Param("report") MonthReportEntity reportDto);
}
