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.PwMonitorClientFallbackFactory;
import com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO;
import com.njcn.device.pms.pojo.param.PwPmsMonitorParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author yzh
 * @date 2022/10/28
 */

@FeignClient(
        value = ServerInfo.DEVICE,
        path = "/pms/pwMonitor",
        contextId = "pms/pwMonitor",
        fallbackFactory = PwMonitorClientFallbackFactory.class)
public interface PwMonitorClient {

    /**
     * 获取配网所有监测点信息
     * @param pwPmsMonitorParam 参数条件
     * @return 配网所有监测点信息
     */
    @PostMapping("/getPwMonitorList")
    HttpResult<List<PwPmsMonitorDTO>> getPwMonitorList(@RequestBody PwPmsMonitorParam pwPmsMonitorParam);

    /**
     * 获取配网所有监测点信息(新)
     * @param pwPmsMonitorParam 参数条件
     * @return 配网所有监测点信息
     */
    @PostMapping("/getPwNewMonitorList")
    HttpResult<List<PwPmsMonitorDTO>> getPwNewMonitorList(@RequestBody PwPmsMonitorParam pwPmsMonitorParam);

    /**
     * 获取子集配网所有监测点信息
     * @param pwPmsMonitorParam 参数条件
     * @return 配网所有监测点信息
     */
    @PostMapping("/getPwSubsetMonitorList")
    HttpResult<List<PwPmsMonitorDTO>> getPwSubsetMonitorList(@RequestBody PwPmsMonitorParam pwPmsMonitorParam);

    /**
     * 获取分布式光伏配网所有监测点信息
     * @param pwPmsMonitorParam 参数条件
     * @return 配网所有监测点信息
     */
    @PostMapping("/getPwPhotovoltaicMonitorList")
    HttpResult<List<PwPmsMonitorDTO>> getPwPhotovoltaicMonitorList(@RequestBody PwPmsMonitorParam pwPmsMonitorParam);
}
