package digital.laboratory.platform.inspetion.api.feign;

import digital.laboratory.platform.inspetion.api.entity.IdentificationBookDTO;
import digital.laboratory.platform.inspetion.api.feign.factory.RemoteTestToIdentifyServiceFallbackFactory;
import digital.laboratory.platform.common.core.constant.SecurityConstants;
import digital.laboratory.platform.common.core.util.R;
import digital.laboratory.platform.inspetion.api.vo.TestRecordVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author xy
 * @version 1.0
 * @title 检验系统对文书系统提供的接口
 * @description
 * @create 2024/2/26 15:01
 */
@FeignClient(contextId = "remoteTestToIdentifyService", value ="dlp-drugtesting-biz",
        fallbackFactory = RemoteTestToIdentifyServiceFallbackFactory.class)
public interface RemoteTestToIdentifyService {
    /**
     * 提供读取实验数据的接口
     * @param businessId
     * @return
     */
    @GetMapping(value="/identifyBookData/getIdentifyBookDataByBusinessId", headers = SecurityConstants.HEADER_FROM_IN)
    public R getIdentifyBookDataByBusinessId(@RequestParam("businessId") String businessId);

    @PostMapping(value="/identifyBookData/getTestFinishBusinessData", headers = SecurityConstants.HEADER_FROM_IN)
    public R getTestFinishBusinessData(@RequestBody List<String> synedIdList);

    @PostMapping("/testRecord/queryTestRecordInfoByBusinessId")
    @ApiOperation("根据业务id获取实验信息")
    public R<Map<String, TestRecordVo>> queryTestRecordInfoByBusinessId(@RequestBody List<String> businessIds);

}
