package cn.cecep.talroad.mapper;

import cn.cecep.talroad.domain.SEnvWaterMonReal;
import cn.cecep.talroad.vo.SEnvWaterMonRealVo;
import cn.cecep.talroad.vo.analysis.FactoryOutletStaticsVo;
import cn.cecep.talroad.vo.query.SEnvWaterMonRealQuery;
import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.Date;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 废水监测数据Mapper接口
 *
 * @author szhpt
 * @date 2023-01-10*/
@Mapper
public interface SEnvWaterMonRealMapper extends BaseMapper<SEnvWaterMonReal>
{
    /**
     * 查询废水监测数据列表
     *
     * @param sEnvWaterMonReal 废水监测数据
     * @return 废水监测数据集合
     */
    public List<SEnvWaterMonRealVo> selectSEnvWaterMonRealList(Page<?> page, @Param("sEnvWaterMonReal") SEnvWaterMonRealQuery sEnvWaterMonReal, @Param("ew") Wrapper<SEnvWaterMonReal> queryWrapper);

    List<SEnvWaterMonRealVo> selectSEnvWaterMonRealListGroupByYear(@Param("monitoringStartTime") String monitoringStartTime, @Param("monitoringEndTime") String monitoringEndTime, @Param("industry") String industry, @Param("regionCodes") List<String> regionCodes);

    /**
     * 查询废水数据当前日所有小时平均数据
     * @param dateStr
     * @return
     */
    List<SEnvWaterMonReal> selectAvgDataForDay(@Param("dateStr")String dateStr);

    List<SEnvWaterMonReal> selectLastDayData(@Param("pollutantOutletType") String pollutantOutletType, @Param("lastDayBegin") Date lastDayBegin, @Param("lastDayEnd") Date lastDayEnd);

    List<FactoryOutletStaticsVo> selectLastDayCountData(@Param("lastDayBegin") DateTime queryBeginTime, @Param("lastDayEnd") DateTime queryEndTime);
}
