package com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.FanHealthIndexDto;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvWarningRecord;
import org.apache.ibatis.annotations.Param;

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

public interface PvWaringRecordMapper extends BaseMapper<PvWarningRecord> {

    int saveBatchWarningRecords(@Param("list") List<PvWarningRecord> list);

    public List<PvWarningRecord> warningData(String STATION,String EQUIPMENTNAME,String SUBARRAY);

    public List<Map<String,Object>> selectFanWarningNum(String station, @Param("gatewayIds") List<String> gatewayIds);

    List<PvWarningRecord> selectWarningPoint(String STATION, String EQUIPMENTNAME, String SUBARRAY,Integer current,Integer size, @Param("gatewayIds") List<String> gatewayIds);
    int selectWarningPointTotal(String STATION, String EQUIPMENTNAME, String SUBARRAY, @Param("gatewayIds") List<String> gatewayIds);

    Map<String, Object> selectEquipWarningTotal(String STATION, String EQUIPMENTNAME, String SUBARRAY, @Param("gatewayIds") List<String> gatewayIds);


    List<PvWarningRecord> getInfoByPage(@Param("dto") FanHealthIndexDto dto);

    Integer getInfoByPageTotal(@Param("dto") FanHealthIndexDto dto);

    PvWarningRecord getInfoByTs(@Param("ts") Long ts);

    int updateStatusByTs(@Param("list") List<PvWarningRecord> list);

    List<Map<String, Object>> getAllEquipAlarmInfo();
}
