package com.huatek.busi.mapper.cable;

import com.github.pagehelper.Page;
import com.huatek.busi.dto.cable.BusiCableCirculationDto;
import com.huatek.busi.dto.cable.BusiCableCirculationFailureStatisticsDto;
import com.huatek.busi.mapper.curve.BaseCurveSensorMapper;
import com.huatek.busi.mapper.monitor.BaseMonitorDataMapper;
import com.huatek.busi.vo.cable.BusiCableCirculationReportVo;
import com.huatek.busi.vo.cable.BusiCableCirculationStatisticsVo;
import com.huatek.busi.vo.cable.BusiCableCirculationVo;
import com.huatek.busi.vo.monitor.BusiMonitorCableDataVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * 电缆环流 mapper
 *
 */
@Repository
public interface CableCirculationMapper extends BaseCurveSensorMapper, BaseMonitorDataMapper {
    /**
     * 查询电缆环流信息
     *
     * @param params
     * @return
     */
    Page<Map<String, Object>> findCACPageData(Map<String, Object> params);

    /**
     * 导出电缆环流信息
     *
     * @param params
     * @return
     */
    List<BusiCableCirculationReportVo> exportCacMonitorData(Map<String, Object> params);

    /**
     * 分组统计时间段内的监测数据的
     *
     * @param startTime
     * @param endTime
     * @return
     */
    List<Map<String, Object>> queryMonitorDataList(@Param("startTime") LocalDateTime startTime,
                                                   @Param("endTime") LocalDateTime endTime);

    /**
     * 分页查询
     *
     * @param dto
     * @return
     */
    List<BusiCableCirculationVo> selectBusiCableCircuPage(BusiCableCirculationDto dto);

    /**
     * 删除
     *
     * @param ids
     * @return
     */
    int deleteBusiCable(@Param("ids") List<String> ids);

    /**
     * 获取时间最近的实时数据
     *
     * @param equipmentId
     * @return
     */
    List<BusiCableCirculationVo> getRealData(@Param("equipmentId") String equipmentId);

    List<BusiCableCirculationStatisticsVo> getListEquInfo(BusiCableCirculationFailureStatisticsDto param);

    List<BusiMonitorCableDataVo> getDaliyReportData(@Param("sensorId") String sensorId , @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    List<BusiCableCirculationVo> getHistoryData(BusiCableCirculationDto dto);


}
