package com.huatek.busi.mapper.cable;

import com.huatek.busi.dto.cable.BusiCableCirculationStatisticsDto;
import com.huatek.busi.entity.GisSf6IncreaseRateCache;
import com.huatek.busi.vo.cable.BusiCableCirculationIncreaseRateCacheVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Repository
public interface CableCirculationStatisticsMapper {

   int aveCableCirculationStatistics(@Param("startTime")LocalDateTime startTime, @Param("endTime")LocalDateTime endTime);

   /**
    * 获取最近15天的统计数据
    * @param dto
    * @return
    */
   List<BusiCableCirculationIncreaseRateCacheVo> getHistoryData(BusiCableCirculationStatisticsDto dto);

   /**
    * @param sensorCode
    * @param startTime
    * @param endTime
    * @return
    */
   List<Map<String, Object>> getRecordBySensorCode(@Param("sensorCode") String sensorCode,@Param("startTime") LocalDateTime startTime,
                                                   @Param("endTime") LocalDateTime endTime);

   Map<String, Object> getItem(@Param("sensorCode") String sensorCode, @Param("day") LocalDate day);
}
