package com.kym.service.admin;

import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.github.yulichang.base.MPJBaseService;
import com.kym.common.annotation.DynamicCache;
import com.kym.entity.admin.ConnectorInfo;
import com.kym.entity.admin.EquipmentInfo;
import com.kym.entity.admin.Station;
import com.kym.entity.admin.queryParams.StationQueryParam;
import com.kym.entity.admin.vo.LocalStationVo;
import com.kym.entity.admin.vo.StationVo;
import com.kym.entity.enplus.EnStationStatsInfo;
import com.kym.entity.enplus.EnStationStatusInfo;

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

/**
 * <p>
 * 充电站信息 服务类
 * </p>
 *
 * @author skyline
 * @since 2023-08-12
 */
public interface StationService extends MPJBaseService<Station> {

    List<StationVo> queryEnStationInfo(int pageNum, int pageSize) throws JsonProcessingException;

    @DynamicCache
    Map<String,List<EquipmentInfo>> getCachedEquipmentMap();

    @DynamicCache
    Map<String,List<ConnectorInfo>> getCachedConnectorMap();

    //    @DynamicCache // 方法的返回结果加一层方法缓存，5分钟内不变
    List<LocalStationVo> queryLocalStationInfo(int pageNum, int pageSize);

    List<EnStationStatusInfo> stationStatus(String[] ids);

    EnStationStatsInfo stationStats(String stationId, String startTime, String endTime);

    void pullEnStationInfos(String stationId);

    void modifyStation(Station station);

    void importStation(JSONObject data);

    List<Station> listStation(StationQueryParam params);
}
