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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex;
import org.apache.ibatis.annotations.Param;

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

/**
 *  Mapper 接口
 *
 * @author system_generator
 * @date 2023-08-15
 */
public interface IdxBizPvHealthIndexMapper extends BaseMapper<IdxBizPvHealthIndex> {

    List<Map<String,Object>> queryForLeftTableListByEquip(String STATION, String SUBARRAY, String HEALTHLEVEL, String EQUIPMENTNAME, Integer current, Integer size);

    Map<String,Object> queryForLeftTableListByEquipNum(String STATION, String SUBARRAY, String HEALTHLEVEL, String EQUIPMENTNAME);
     Map<String,Object> queryForLeftTableListByPointNum(String STATION, String SUBARRAY, String HEALTHLEVEL, String EQUIPMENTNAME,String POINTNAME);

    int queryForLeftTableListByEquipCount(String STATION, String SUBARRAY, String HEALTHLEVEL, String EQUIPMENTNAME);

    List<Map<String,Object>> queryForLeftTableListByPoint(String STATION, String SUBARRAY, String HEALTHLEVEL, String EQUIPMENTNAME,String POINTNAME,Integer current,Integer size);

    int queryForLeftTableListByPointCount(String STATION, String SUBARRAY, String HEALTHLEVEL, String EQUIPMENTNAME,String POINTNAME);


    List<IdxBizPvWarningRecord> warningData(String STATION, String SUBARRAY, String EQUIPMENTNAME);
    Integer pointNum(String STATION, String SUBARRAY, String EQUIPMENTNAME);
    List<Map<String,Object>>  selectPointByANALYSISTYPE(String STATION, String HEALTHLEVEL,String EQUIPMENTNAME,String POINTNAME,String SUBARRAY,String startTime,String endTime);


    int saveBatchHealthIndexLatestInfo(@Param("list") List<FanHealthIndex> list);

    void deleteAllDataByTableName(@Param("tableName") String tableName, @Param("analysisType") String analysisType);

    int saveBatchHealthIndexLatestInfoPv(@Param("list") List<PvHealthIndex> list);

}
