package com.yuchen.saas.park.api.feign.work;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.yuchen.saas.park.api.vo.work.SaasWorkOrderAutoDispatchVo;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(
        value = AppNameConstant.SAAS_PARK,
        fallbackFactory = WorkOrderAutoDispatchFeignServiceFallback.class
)
public interface WorkOrderAutoDispatchFeignService {


    /**
     * 自动派工人员获取
     * @return 自动派工人员获取Vo
     */
    @GetMapping("/workOrderAutoDispatch/getAutoDispatchUsers/{repairTypeId}")
    R<SaasWorkOrderAutoDispatchVo> getAutoDispatchUsers(@ApiParam(name = "repairTypeId", value = "报修类型ID(维修类型ID、告警类型ID)", required = true) @PathVariable("repairTypeId") Long repairTypeId);



    /**
     * 是否开启自动派工
     * @return true/false
     */
    @GetMapping("/workOrderAutoDispatch/getIsOpenAutoDispatch")
    R<Boolean> getIsOpenAutoDispatch(@ApiParam(name = "workOrderCategory", value = "工单大类(1:报事报修 2:设备报修 3:告警运维)", required = true) @RequestParam("workOrderCategory") Integer workOrderCategory,
                                     @ApiParam(name = "customerId", value = "客户ID", required = true) @RequestParam("customerId") Long customerId);




}
