package com.njcn.prepare.harmonic.api.liteflow;


import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.prepare.harmonic.api.liteflow.fallback.LiteFlowFeignClientFallbackFactory;
import com.njcn.prepare.harmonic.pojo.bo.BaseParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author xuyang
 */
@FeignClient(
        value = ServerInfo.PREPARE_BOOT,//对应模块名
        path = "/executor",//对应controller请求类
        fallbackFactory = LiteFlowFeignClientFallbackFactory.class//服务降级处理类
)
public interface LiteFlowFeignClient {

    @ApiOperation("监测点算法执行链")
    @PostMapping("/measurementPointExecutor")
    void measurementPointExecutor(@RequestBody BaseParam baseParam);

    @ApiOperation("监测点算法执行链(按小时执行的任务)")
    @PostMapping("/measurementPointExecutorByHour")
    public void measurementPointExecutorByHour(@RequestBody BaseParam baseParam);
    @ApiOperation("单位监测点算法执行链")
    @PostMapping("/orgPointExecutor")
    void orgPointExecutor(@RequestBody BaseParam baseParam);


    @ApiOperation("pms国网上送单位层级算法执行链")
    @PostMapping("/uploadOrgExecutor")
    void uploadOrgExecutor(@RequestBody BaseParam baseParam);

    @ApiOperation("变电站算法执行链")
    @PostMapping("/substationExecutor")
    void substationExecutor(@RequestBody BaseParam baseParam);

    @ApiOperation("装置算法执行链")
    @PostMapping("/deviceExecutor")
    void deviceExecutor(@RequestBody BaseParam baseParam);

    @ApiOperation("pms变电站母线算法执行链")
    @PostMapping("/pmsdimexecutor")
    void pmsDimExecutor(@RequestBody BaseParam baseParam);

    @ApiOperation("母线算法执行链(主网测点)")
    @PostMapping("/generaTrixExecutor")
    void generaTrixExecutor(@RequestBody BaseParam baseParam);

    @ApiOperation("单位变电站算法执行链")
    @PostMapping("/orgSubStationExecutor")
    void orgSubStationExecutor(@RequestBody BaseParam baseParam);
}
