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

import java.util.List;

/**
 * @author hongawen
 * @version 1.0.0
 * @date 2022年02月14日 14:02
 */
@FeignClient(value = ServerInfo.DEVICE, path = "/pmsDeviceInfo", contextId = "pmsDeviceInfo", fallbackFactory = PmsGeneralDeviceInfoClientFallbackFactory.class)
public interface PmsGeneralDeviceInfoClient {


    /***
     * 获取指定组织下台账综合信息
     * @author hongawen
     * @date 2022/10/18 10:12
     * @param pmsDeviceInfoParam 查询条件
     * @return HttpResult<List < PmsGeneralDeviceDTO>> 统计结果
     */
    @PostMapping("/getPmsDeviceInfoWithInOrg")
    HttpResult<List<PmsGeneralDeviceDTO>> getPmsDeviceInfoWithInOrg(@RequestBody PmsDeviceInfoParam pmsDeviceInfoParam);

    /***
     * 获取配网指定组织下台账综合信息
     * @author cdf
     * @date 2022/10/18 10:12
     * @param pmsDeviceInfoParam 查询条件
     * @return HttpResult<List < PmsGeneralDeviceDTO>> 统计结果
     */
    @PostMapping("/getPwPmsDeviceInfoWithOrgId")
    HttpResult<List<PmsGeneralDeviceDTO>> getPwPmsDeviceInfoWithOrgId(@RequestBody PmsDeviceInfoParam pmsDeviceInfoParam);


    @PostMapping("/getPwPmsMonitorIds")
    HttpResult<List<String>> getPwPmsMonitorIds(@RequestBody PwPmsMonitorParam pwPmsMonitorParam);
}
