package com.njcn.device.pms.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.pms.api.fallback.StatationStatClientFallbackFactory;
import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO;
import com.njcn.device.pms.pojo.param.PmsBaseParam;
import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
import com.njcn.device.pms.pojo.po.StatationStat;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author yzh
 * @date 2022/10/18
 */
@FeignClient(value = ServerInfo.DEVICE,
        path = "/pms/statationStat",
        contextId = "pms/statationStat",
        fallbackFactory = StatationStatClientFallbackFactory.class)
public interface StatationStatClient {

    /**
     * 获取指定的变电站信息
     *
     * @param pmsStatationStatInfoParam 变电站详情数据入参
     * @return 指定的变电站信息
     */
    @PostMapping("/getStatationStat")
    HttpResult<List<PmsStatationStatInfoDTO>> getStatationStatInfo(@RequestBody PmsStatationStatInfoParam pmsStatationStatInfoParam);

    /**
     * 获取变电站信息
     *
     * @param param 条件参数
     * @return com.njcn.common.pojo.response.HttpResult<java.util.List < com.njcn.device.pms.pojo.po.PmsStatationStat>>
     * @author yzh
     * @date 2022/11/21
     */
    @PostMapping("/getPowerInfo")
    HttpResult<List<StatationStat>> getPowerInfo(@RequestBody PmsStatationStatInfoParam param);


    @PostMapping("/getstatationStatList")
    HttpResult<List<StatationStat>> getstatationStatList(@RequestBody PmsBaseParam pmsBaseParam);


}
