package cn.cecep.talroad.mapper;

import cn.cecep.talroad.domain.AmVideoDevFi;
import cn.cecep.talroad.vo.AmVideoDevFiVo;
import cn.cecep.talroad.vo.export.AmVideoDevFiExport;
import cn.cecep.talroad.vo.homepage.OverviewVideoMonitorsVo;
import cn.cecep.talroad.vo.homepage.ProportionVideoMonitorsVo;
import cn.cecep.talroad.vo.homepage.VideoMonitoringIssuesVo;
import cn.cecep.talroad.vo.query.EffectiveMonitoringRateQuery;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigInteger;
import java.util.List;

/**
 * 视频监控Mapper接口
 *
 * @author szhpt
 * @date 2023-01-10*/
@Mapper
public interface AmVideoDevFiMapper extends BaseMapper<AmVideoDevFi>
{
    /**
     * 查询视频监控列表
     *
     * @param amVideoDevFi 视频监控
     * @return 视频监控集合
     */
    List<AmVideoDevFi> selectAmVideoDevFiList(AmVideoDevFi amVideoDevFi);

    List<AmVideoDevFiExport> selectAmVideoDevFiExportList(AmVideoDevFi amVideoDevFi);

    List<AmVideoDevFiExport> selectAmVideoDevFiSelectList(@Param("ew") QueryWrapper<AmVideoDevFi> queryWrapper);

    List<AmVideoDevFiExport> selectAmVideoDevFiSelectXkList(@Param("ew") QueryWrapper<AmVideoDevFi> queryWrapper);

    void updateStatusBatch(@Param("updateList") List<AmVideoDevFi> updateList);

    IPage<AmVideoDevFiExport> selectDeviceNameById(Page<AmVideoDevFi> page, @Param("ew") QueryWrapper<AmVideoDevFi> queryWrapper);

    AmVideoDevFiExport getByExport(@Param("id") BigInteger id);

    String overviewVideoMonitors(@Param("type") String type, @Param("regionCodes") List<String> regionCodes);

    ProportionVideoMonitorsVo proportionExitTypes(EffectiveMonitoringRateQuery query);

    List<OverviewVideoMonitorsVo> trendsVehicleEmissionTypes(EffectiveMonitoringRateQuery query);

    List<VideoMonitoringIssuesVo> videoMonitoringIssues(@Param("regionCodes") List<String> regionCodes);

    List<VideoMonitoringIssuesVo> otherEnterpriseMonitoringVideos(@Param("regionCodes") List<String> regionCodes);

    List<AmVideoDevFiVo> selectByOutletAndDeviceIds(@Param("outletId") String outletId, @Param("deviceIds") List<String> deviceIds);
}
