package com.weather.modules.weather.station.service;

import com.weather.common.page.PageData;
import com.weather.common.service.CrudService;
import com.weather.modules.weather.station.dto.WeatherStationDTO;
import com.weather.modules.weather.station.dto.WeatherStationInfoSimpleDto;
import com.weather.modules.weather.station.entity.WeatherStationEntity;

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

/**
 * 气象站点表
 *
 * @author Mark 123
 * @since 1.0.0 2026-03-05
 */
public interface WeatherStationService extends CrudService<WeatherStationEntity, WeatherStationDTO> {
    /**
     * 分页查询 站点信息
     * @param params 查询条件
     * @return 站点信息
     */
    PageData<WeatherStationDTO> page(Map<String, Object> params);

    WeatherStationDTO getByStationCode(Long stationCode);

    /**
     * 批量查询站点信息，避免 N+1 问题
     */
    Map<Long, WeatherStationDTO> getByStationCodes(Set<Long> stationCodes);

    List<WeatherStationInfoSimpleDto> getStationByDeptId();

    List<WeatherStationInfoSimpleDto> getStationByStationName();
}