package com.njcn.device.pq.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.pq.api.fallback.TerminalBaseClientFallbackFactory;
import com.njcn.device.pq.pojo.param.SyncTerminalParam;
import com.njcn.device.pq.pojo.po.Line;
import io.swagger.annotations.ApiOperation;
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 = "/device", fallbackFactory = TerminalBaseClientFallbackFactory.class, contextId = "device")
public interface TerminalBaseClient {


    /**
     * 功能描述:根据变电站id获取变电站详情
     *
     * @param list
     * @return
     * @author xy
     * @date 2022/2/21 18:53
     */
    @PostMapping("/getSubstationById")
    HttpResult<List<Line>> getSubstationById(@RequestBody List<String> list);

    /**
     * 冀北技术监督台账同步
     */
    @ApiOperation("终端/母线/监测点同步操作")
    @PostMapping("terminalSync")
    HttpResult<String> terminalSync( @RequestBody SyncTerminalParam syncTerminalParam);

    /**
     * 监测点和装置同步成运行状态
     */
    @GetMapping("/terminalSyncRunFly")
    HttpResult<Boolean> terminalSyncRunFly(@RequestParam("lineId") String lineId);

    /**
     * 监测点信息删除
     */
    @GetMapping("/terminalSyncDeleteFly")
    HttpResult<Boolean> terminalSyncDeleteFly(@RequestParam("lineId") String lineId);
}
