package com.zcxk.charge.core.dao;

import com.zcxk.charge.core.entity.DayReportEntity;
import com.zcxk.charge.core.entity.MonitorDataEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @description 设备数据
 * @author  wangli
 * @data 2020-12-01 10:12
 */
@Mapper
public interface MonitorDataMapper {

    /**
    * 查找单个
    * @author Andy
    * @date 18:05 2021/8/17
    * @param deviceCode:
    * @return com.zcxk.charge.core.entity.MonitorDataEntity
    **/
    MonitorDataEntity getDeviceMonitorInfoByDeviceCode(@Param("deviceCode") String deviceCode);

    /**
    * 批量插入
    * @author Andy
    * @date 18:06 2021/8/17
    * @param year:
    * @param month:
    * @return void
    **/
    void batchInsertYearReport(@Param("year") Integer year, @Param("month") Integer month);

    /**
    * 批量插入
    * @author Andy
    * @date 18:06 2021/8/17
    * @param year:
    * @param month:
    * @param day:
    * @return void
    **/
    void batchInsertMonthReport(@Param("year") Integer year, @Param("month") Integer month, @Param("day") Integer day);

    /**
    * 批量插入
    * @author Andy
    * @date 18:06 2021/8/17
    * @param dayReportEntities:
    * @return void
    **/
    void batchInsertDayReport(@Param("dayReportEntities") List<DayReportEntity> dayReportEntities);

    /**
    * checkReportDataExit
    * @author Andy
    * @date 18:06 2021/8/17
    * @param year:
    * @param month:
    * @param day:
    * @param hour:
    * @param deviceIds:
    * @return java.util.List<java.lang.Integer>
    **/
    List<Integer> checkReportDataExit(@Param("year") Integer year, @Param("month") Integer month, @Param("day") Integer day, @Param("hour") Integer hour, @Param("deviceIds") List<Integer> deviceIds);
}
