package com.zcxk.client;

import com.zcxk.config.FeignConfig;
import com.zcxk.dto.WorkOrderManageByAlarmDto;
import org.springframework.cloud.openfeign.FeignClient;
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;

/**
 * @description 服务调用(运维管理)
 * @auto wangli
 * @data 2021/1/15 10:57
 */
@FeignClient(value = "operation-manager",configuration={FeignConfig.class})
public interface OperationManagerClient {

    /**
     * 报警信息生产工单信息
     * @param workOrderManages
     * @return
     */
    @PostMapping("/order/workOrderManage/saveByAlarms")
    Integer saveByAlarms(@RequestBody List<WorkOrderManageByAlarmDto> workOrderManages);

    @PostMapping("/order/workOrderManage/batchDeleteByAlarms")
    Integer batchDeleteByAlarms(@RequestParam List<Long> deviceIds);

    @PostMapping("/order/workOrderManage/updateByAlarms")
    void updateByAlarms(@RequestBody List<WorkOrderManageByAlarmDto> workOrderManages);

    @PostMapping("/order/workOrderManage/findWorkOrderByDeviceIds")
    List<WorkOrderManageByAlarmDto> findWorkOrderByDeviceIds(@RequestParam List<Long> deviceIds);


}
