ocr 识别 bug fix

This commit is contained in:
gong
2025-12-22 10:15:12 +08:00
parent 94baf2e587
commit 931b7805fe

View File

@@ -43,7 +43,7 @@ public class ConsStockFlowController {
*/
@PostMapping("/ocr")
public CzgResult<Integer> ocr(@RequestBody OcrDTO ocrDTO) throws Exception {
URI uri = new URI("https://example.com/path");
URI uri = new URI(ocrDTO.getUrl());
URL url = uri.toURL();
InputStream stream = URLUtil.getStream(url);
return CzgResult.success(consStockFlowService.ocr(FileUtil.getName(ocrDTO.getUrl()), stream));