package com.casic.missiles.modular.system.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.casic.missiles.core.datascope.DataScope;
import com.casic.missiles.modular.system.model.GasDectorDataDto;
import com.casic.missiles.modular.system.model.PantiltDataDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface ThirdPartyDataMapper {

    List<GasDectorDataDto> getGasDectorListPage(@Param("page") Page<GasDectorDataDto> page, @Param("dataScope") DataScope dataScope,
                                                @Param("deptid") Long deptid, @Param("endTime") String endTime,
                                                @Param("beginTime") String beginTime, @Param("keywords") String keyWords);

    List<PantiltDataDto> getPantiltDataListPage(@Param("page") Page<PantiltDataDto> page, @Param("dataScope") DataScope dataScope,
                                                @Param("deptid") Long deptid, @Param("endTime") String endTime,
                                                @Param("beginTime") String beginTime, @Param("keywords") String keyWords);

    Map<String,Object> countRecordsByTime(@Param("dataScope") DataScope dataScope, @Param("beginTime") String beginTime, @Param("endTime") String endTime,
                           @Param("tableName") String tableName);

    String getDeviceType(@Param("deptid")Long deptId);


    int countRecordsToday(@Param("dataScope") DataScope dataScope, @Param("endTime") String endTime,
                          @Param("beginTime") String beginTime);

}
