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.FanHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import org.apache.ibatis.annotations.Select;

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

public interface FanWaringRecordMapper  extends BaseMapper<FanWarningRecord> {

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


 public List<FanWarningRecord> warningData(String STATION,String EQUIPMENTNAME,String SUBSYSTEM);

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

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

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

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

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

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

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

 int updateStatusByTs(@Param("list") List<FanWarningRecord> list);
 Integer getEquipWarningInfoByPageCount(@Param("arae") String arae,
                                        @Param("station") String station,
                                        @Param("stationType") String stationType,
                                        @Param("warningName") String warningName,
                                        @Param("stationId") String stationId,
                                        @Param("startDate") String startDate,
                                        @Param("endDate") String endDate,@Param("syzGatewayId") String syzGatewayId,
                                        @Param("disposotionState")String disposotionState);

 List<FanWarningRecord> getEquipWarningInfoByPage(String arae, String station, String stationType, Integer current, Integer size, String warningName, String stationId, String startDate, String endDate,@Param("syzGatewayId") String syzGatewayId,@Param("disposotionState")String disposotionState);

 List<Map<String, Object>> getAllEquipAlarmInfoAnalysisByArea(String araeCode, String stationType);

 List<Map<String, Object>> getAllEquipAlarmInfoByStation(String area);
}
