package cn.cecep.talroad.mapper;

import cn.cecep.talroad.domain.AmProblemFi;
import cn.cecep.talroad.domain.BMainThreeSupervisionEnforc;
import cn.cecep.talroad.domain.analysis.SRaFactoryTransferRateAnalysis;
import cn.cecep.talroad.domain.analysis.SRaSelfMonitoringData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

/**
 * @className: EnvironmentalCodingMapper
 * @description: TODO 类描述
 * @author: Mr.Yanghongtao
 * @date: 2023/04/08 1:48 PM
 * @Company: Copyright© [2023/04/08 1:48 PM] by [Mr.Yanghongtao]
 **/
@Mapper
public interface EnvironmentalCodingMapper {

    /**
     * @Author: Mr.Yanghongtao
     * @data: 2023/4/8 1:50 PM
     * @Deseription: 查询三级联动系统的内容
     * @Params: null
     * @Return:
     * @Throws:
     */
    List<BMainThreeSupervisionEnforc> selectListByTime(@Param("startTime") Timestamp startTime,
                                                       @Param("endTime") Timestamp endTime,
                                                       @Param("taskName") List<String> taskName);

    /**
     * @Author: Mr.Yanghongtao
     * @data: 2023/4/8 7:10 PM
     * @Deseription: 查询三级联动表
     * @Params: null
     * @Return:
     * @Throws:
     */
    BMainThreeSupervisionEnforc selectBMainThreeSupervisionEnforcById(@Param("taskId") String taskId);


    /**
     * @Author: Mr.Yanghongtao
     * @data: 2023/4/8 7:10 PM
     * @Deseription: 查询三级联动表
     * @Params: null
     * @Return:
     * @Throws:
     */
    AmProblemFi selectMamProblemFiById(@Param("id") String id);

    /**
     * @Author: Mr.Yanghongtao
     * @data: 2023/4/8 5:21 PM
     * @Deseription: 查询分表计电预警数据
     * @Params: problemType  002002 - 启停问题
     * @Params: problemSources  = 1
     * @Return:
     * @Throws:
     */
    List<AmProblemFi> selectMamProblemFiList(@Param("startTime") Timestamp startTime,
                                       @Param("endTime") Timestamp endTime,
                                       @Param("problemType") String problemType,
                                       @Param("problemSources") String problemSources
    );

    List<AmProblemFi> selectMamProblemFiListNew(@Param("startTime") Timestamp startTime,
                                       @Param("endTime") Timestamp endTime,
                                       @Param("problemType") List<String> problemType,
                                       @Param("problemSources") String problemSources
    );

    /**
     * 查询 排污单位自行监测数据超标 数据
     * @param startTime
     * @param endTime
     * @return
     */
    List<SRaSelfMonitoringData> selectSRaSelfMonitoringDataList(@Param("startTime") Timestamp startTime,
                                                                @Param("endTime") Timestamp endTime
    );

    /**
     * @Author: Mr.Yanghongtao
     * @Date: 2023/6/28 17:55
     * @Deseription: 查询 每日数据传输率低于75%的企业
     * @Params: null
     * @Return:
     * @Throws:
     */
    List<SRaFactoryTransferRateAnalysis> selectSRaFactoryTransferRateAnalysisList(@Param("time") String time);

    /**
     * 查询 排污单位自行监测数据超标 企业监测点-污染物-当前时间不超标的数据
     *
     * @param selfMonitorsIds
     * @param startTime
     * @param endTime
     * @return
     */
    List<SRaSelfMonitoringData> selectSRaSelfMonitoringDataListByParams(@Param("selfMonitorsIds") List<String> selfMonitorsIds, @Param("startTime") Timestamp startTime, @Param("endTime") Timestamp endTime);
}
