package com.yeejoin.amos.boot.module.hygf.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower;
import com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector;
import org.apache.ibatis.annotations.Param;

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

/**
 * 户用光伏监盘采集器表 Mapper 接口
 *
 * @author system_generator
 * @date 2023-09-19
 */
public interface JpCollectorMapper extends BaseMapper<JpCollector> {
   List<Map<String,Object>>  queryCollectorCountStatus(@Param("dto") JpStationDto reviewDto);


   @UserEmpower(field ={"sta.regional_companies_code"} ,dealerField = {"sta.amos_company_code","sta.regional_companies_code"},fieldConditions ={"in","in"} ,relationship="and")
   List<JpCollectorDto>  selectPageData(@Param("dto") JpCollectorDto reviewDto, Integer current, Integer size);

   @UserEmpower(field ={"sta.regional_companies_code"} ,dealerField = {"sta.amos_company_code","sta.regional_companies_code"},fieldConditions ={"in","in"} ,relationship="and")
   int  selectPageDataTota(@Param("dto") JpCollectorDto reviewDto);

    List<Map<String, Object>> selectInverterState(@Param("thirdStationIds") List<String> thirdStationIds);
}
