package cn.cecep.talroad.mapper;

import cn.cecep.talroad.domain.SEnvWaterMonHour;
import cn.cecep.talroad.vo.SEnvWaterMonHourVo;
import cn.cecep.talroad.vo.analysis.FactoryOutletStaticsVo;
import cn.cecep.talroad.vo.query.SEnvWaterMonHourQuery;
import cn.cecep.talroad.vo.query.analysis.SRaWaterPermittedOnlineQuery;
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 java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

    List<SEnvWaterMonHourVo> selectSEnvWaterMonHourListGroupByYear(@Param("monitoringStartTime") String monitoringStartTime, @Param("monitoringEndTime") String monitoringEndTime, @Param("industry") String industry, @Param("regionCodes") List<String> regionCodes);

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

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

    List<SEnvWaterMonHour> selectSRaWaterPermittedOnlineListBy(SRaWaterPermittedOnlineQuery lambdaQueryWrapper);

    List<SEnvWaterMonHour> selectSRaWaterSourceListBy(SRaWaterPermittedOnlineQuery lambdaQueryWrapper);

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

    List<SEnvWaterMonHour> selectManualSRaWaterPermittedOnlineListBy(SRaWaterPermittedOnlineQuery lambdaQueryWrapper);

    List<SEnvWaterMonHour> selectManualSRaWaterSourceListBy(SRaWaterPermittedOnlineQuery lambdaQueryWrapper);
}
