package com.tofly.api;

import com.tofly.common.core.entity.ResultRespone;
import com.tofly.pojo.FeignGdInfoDto;
import com.tofly.pojo.GdglinfoExtendDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author BZ-DJJ
 */
@FeignClient(name = "tofly-xrtymis",contextId="GdglinfoClient")
public interface GdglinfoClient {

    /**
     * 转入维修调用工单接口工单
     * @param id 抢维修工单id
     * @param type 工单状态1:归档；0:驳回
     * @return
     */
    @GetMapping("/gdglinfo/gdGdUpdateState")
    ResultRespone<Boolean> gdGdUpdateState(@RequestParam(value = "id") String id,@RequestParam(value = "type") Integer type);

    /**
     * 工单登记
     * @param extend
     * @return
     */
    @PostMapping("/gdglinfo/saveFeign")
    ResultRespone saveGdglInfo(@RequestBody GdglinfoExtendDto extend);
    /**
     * 工单登记（带附件）
     * @param extend
     * @return
     */
    @PostMapping("/gdglinfo/saveAnnexFeign")
    ResultRespone saveAnnexFeign(@RequestParam(value = "fileList",required = false) List<MultipartFile> fileList, GdglinfoExtendDto extend);

    @PostMapping("/gdglinfo/saveGdglInfo2")
    ResultRespone saveGdglInfo2(@RequestParam("extend") FeignGdInfoDto extend);


    @GetMapping("/gdglinfo/{id}")
    ResultRespone getById(@PathVariable("id") Long id);
}
