package org.springblade.thirdparty.ocr.feign;

import org.springblade.thirdparty.ocr.config.OCRFeignClientConfig;
import org.springblade.thirdparty.ocr.pojo.dto.OCRBigCommonCardBatchDTO;
import org.springblade.thirdparty.ocr.pojo.dto.OCRBigCommonCardDTO;
import org.springblade.thirdparty.ocr.pojo.dto.OCRSingleDTO;
import org.springblade.thirdparty.ocr.pojo.vo.OCRBigCommonCardVO;
import org.springblade.thirdparty.ocr.pojo.vo.OCRResultVO;
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.RequestHeader;

import java.util.List;

/**
 *  ocr接口 磅单接口
 * @author bfhuange
 * @date 2024/11/4
 */
@FeignClient(name = "OCR", url = "${thirdParty.ocr.baseUrl}", configuration = OCRFeignClientConfig.class)
public interface IOCRClient {

    /**
     *  批量磅单卡证识别(⼀个⽂件夹的数据)功能接⼝说明
     * @param param
     * @param code
     */
    @PostMapping("/BigCommonCardBatch")
    OCRResultVO<List<OCRResultVO<OCRBigCommonCardVO>>> batchRecognition(@RequestBody OCRBigCommonCardBatchDTO param, @RequestHeader(value = "code", required = false) String code);

    /**
     *  磅单卡证识别功能接⼝
     * @param param
     */
    @PostMapping("/BigCommonCard")
    OCRResultVO<OCRBigCommonCardVO> singleRecognition(@RequestBody OCRBigCommonCardDTO param, @RequestHeader(value = "code", required = false) String code);

    /**
     *  磅单单独识别功能接⼝
     * @param param
     */
    @PostMapping("/logisticRec")
    OCRResultVO<OCRBigCommonCardVO> poundRecognition(@RequestBody OCRSingleDTO param, @RequestHeader(value = "code", required = false) String code);

    /**
     *  ⻋牌识别单独接⼝
     * @param param
     */
    @PostMapping("/CLPR")
    OCRResultVO<OCRBigCommonCardVO> plateNoRecognition(@RequestBody OCRSingleDTO param, @RequestHeader(value = "code", required = false) String code);

}
