package com.njcn.event.mapper.majornetwork;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.device.pq.pojo.vo.AllDataVO;
import com.njcn.device.pq.pojo.vo.EventVO;
import com.njcn.device.pq.pojo.vo.MiddleChildVO;
import com.njcn.device.pq.pojo.vo.MiddleLimitRateVO;
import com.njcn.harmonic.pojo.po.PQSComAssesPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * @version 1.0.0
 * @author: zbj
 * @date: 2023/03/31
 */
@Mapper
public interface LargeScreenMapper {

    Integer selectDownCount(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<Map<String, Object>> selectLoadTypeCount(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<Map<String, Object>> getTimeCount(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<EventVO> eventLists(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("typeId") String typeId);

    AllDataVO getFlagCount(@Param("lineIds") List<String> lineIds);

    Map<String, Object> getDownCount (@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Page<EventVO> getMiddleDown (Page<EventVO> page,@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<EventVO> getMiddleDownChind (@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Page<MiddleChildVO> getMiddleTerminal (Page<MiddleChildVO> page,@Param("deviceIds") List<String> deviceIds, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<MiddleChildVO> getMiddleTerminalChild (@Param("deviceIds") List<String> deviceIds, @Param("startTime") String startTime, @Param("endTime") String endTime);

    Page<MiddleLimitRateVO> getMiddleLimitRate (Page<MiddleLimitRateVO> page,@Param("lineIds") List<String> deviceIds, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<MiddleLimitRateVO> getMiddleLimitRateChild (@Param("lineIds") List<String> deviceIds, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<Map<String,Object>> getHomeostasisArea (@Param("indexIds") List<String> indexIds, @Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
     * 统计综合评估平均值
     * @param lineIndexes
     * @param searchBeginTime
     * @param searchEndTime
     * @return
     */
    List<PQSComAssesPO> getAvgCount(@Param("ids") List<String> lineIndexes,
                                    @Param("statTime") String searchBeginTime,
                                    @Param("endTime") String searchEndTime);
}
