package com.pqs9900.mapper.linedata;

import com.pqs9900.pojo.linedata.OnlineRateCld;
import com.pqs9900.pojo.linedata.OnlineRateCldParam;
import com.pqs9900.pojo.linedata.OnlineRateCldRVO;
import com.pqs9900.pojo.linedata.TopExceptionParam;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

/**
 * system
 *
 * @author cdf
 * @date 2021/12/16
 */
public interface OnlineRateCldMapper extends Mapper<OnlineRateCld> {

    /**
     * 获取所有在线终端
     * @author cdf
     * @date 2021/12/16
     */
    List<TopExceptionParam> getRunDevList();


    /**
     * 查询pqs_onlinereate表在线为0的
     * @author cdf
     * @date 2021/12/16
     */
    List<OnlineRateCldParam> getOnlineByDevIndex(@Param("timeId")Date timeId, @Param("list")List<Integer> list);

    /**
     * 批量新增
     * @author cdf
     * @date 2021/12/16
     */
    Integer batchAdd(@Param("list")List<OnlineRateCld> list);

    /**
     * 指定日期是否存在数据
     * @author cdf
     * @date 2021/12/16
     */
    Integer getOnlineCount(@Param("startTime")Date startTime);

    /**
     *
     * @author cdf
     * @date 2021/12/16
     */
    List<OnlineRateCldRVO> getOnlineRateCldList(@Param("startTime")Date startTime, @Param("endTime")Date endTime, @Param("lineGrade")Integer lineGrade);

}
