package com.tofly.api.order;

import com.tofly.common.core.entity.ResultRespone;
import com.tofly.pojo.maintain.dto.RepairorderDto;
import com.tofly.pojo.maintain.vo.datail.RepairOrderDetailVo;
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;

/**
 * @author BZ-DJJ
 */
@FeignClient(name = "tofly-psjc-gps",contextId="carGpsOrderClient")
public interface OrderClient {
    /**
     * 新增抢维修工单
     * @param parDto
     * @return
     */
    @PostMapping("/repairorder/saveFeign")
    ResultRespone<Object> saveRepairOrderFeign(@RequestBody RepairorderDto parDto);

    /**
     * 通过ID查询抢维修工单详情
     * @param id   工单id
     * @param flag 是否展示部门下所有数据 是则填1 个人不填为空
     * @return
     */
    @GetMapping("/repairorder/getPlanRepairOrderDetail")
    ResultRespone<RepairOrderDetailVo> getPlanRepairOrderDetail(@RequestParam(value = "id") Long id,@RequestParam(value = "flag",required = false)String flag);

    /**
     * 终止抢维修工单
     * @param orderId 工单id
     * @return
     */
    @GetMapping("/repairorder/terminationRepairOrder")
    ResultRespone<Boolean> terminationRepairOrder(@RequestParam("orderId") String orderId);
}
