package cn.cecep.talroad.mapper.analysis;

import cn.cecep.talroad.domain.EarlyWarning;
import cn.cecep.talroad.domain.GasReleaseRealStatus;
import cn.cecep.talroad.domain.analysis.SRaRealTimeAnalysisCo;
import cn.cecep.talroad.vo.analysis.CoDeviceDiffuseStatusFactoryVO;
import cn.cecep.talroad.vo.analysis.CoDeviceTypeCountVO;
import cn.cecep.talroad.vo.analysis.CoDeviceTypeDiffuseStatusVO;
import cn.cecep.talroad.vo.query.analysis.SRaRealTimeAnalysisCoQuery;
import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * co放散分析Mapper接口
 *
 * @author szhpt
 * @date 2023-03-24*/
@Mapper
public interface SRaRealTimeAnalysisCoMapper extends BaseMapper<SRaRealTimeAnalysisCo>
{
    /**
     * 查询co放散分析列表
     *
     * @param sRaRealTimeAnalysisCo co放散分析
     * @return co放散分析集合
     */
    public List<SRaRealTimeAnalysisCo> selectSRaRealTimeAnalysisCoList(Page<?> page,@Param("sRaRealTimeAnalysisCo") SRaRealTimeAnalysisCoQuery sRaRealTimeAnalysisCo);

    /**
     * 工序options
     * @param industryCategoryCode
     * @return
     */
    List<Map<String, Object>> pullWorkingProcedureOptions(@Param("industryCategoryCode") String industryCategoryCode);

    /**
     * @Author: Mr.Yanghongtao
     * @data: 2023/4/10 3:35 AM
     * @Deseription: 关联分析系统-企业生产过程分析-co放散分析
     * @Params: null
     * @Return: 
     * @Throws: 
     */
    List<GasReleaseRealStatus> selectSRaRealTimeAnalysisCoListByDeviceIdAndTime(@Param("deviceId") String deviceId, @Param("startTime") Timestamp startTime, @Param("endTime") Timestamp endTime);

    List<SRaRealTimeAnalysisCo> selectSRaRealTimeAnalysisCoListPage(Page<?> page, @Param("sRaRealTimeAnalysisCo") SRaRealTimeAnalysisCoQuery sRaRealTimeAnalysisCo);

    String analysisCurveEndTime(@Param("deviceId") String deviceId, @Param("monitoringStartTime") Date monitoringStartTime, @Param("monitoringEndTime") Date monitoringEndTime);

    List<SRaRealTimeAnalysisCo> selectSRaRealTimeAnalysisCoListById(@Param("sRaRealTimeAnalysisCo") SRaRealTimeAnalysisCoQuery sRaRealTimeAnalysisCo, @Param("list") List<String> stringList);

    /**
     * 查询时间段内的设备类型数量
     * @param sRaRealTimeAnalysisCo
     * @return
     */
    CoDeviceTypeCountVO selectDeviceTypeCount(@Param("sRaRealTimeAnalysisCo") SRaRealTimeAnalysisCoQuery sRaRealTimeAnalysisCo);

    /**
     * 查询时间段内的设备状态数量
     * @param sRaRealTimeAnalysisCo
     * @return
     */
    List<CoDeviceTypeDiffuseStatusVO> selectDeviceTypeDiffuseStatusCount(@Param("sRaRealTimeAnalysisCo")SRaRealTimeAnalysisCoQuery sRaRealTimeAnalysisCo);

    /**
     * 查询时间段内的状态企业列表
     * @param sRaRealTimeAnalysisCo
     * @return
     */
    List<CoDeviceDiffuseStatusFactoryVO> selectDeviceDiffuseStatusFactoryList(@Param("sRaRealTimeAnalysisCo")SRaRealTimeAnalysisCoQuery sRaRealTimeAnalysisCo);
}
