diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestEOMapper.xml
index 5489a0d02..5ff89355a 100644
--- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestEOMapper.xml
+++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsManifestEOMapper.xml
@@ -64,6 +64,7 @@
from params_manifest pm left join params_template pt on pm.params_template_id = pt.id
) tmp_tb
+ order by create_time desc
\ No newline at end of file
diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ocr/controller/OcrRestfulController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ocr/controller/OcrRestfulController.java
index 5b1758c41..56565b83b 100644
--- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ocr/controller/OcrRestfulController.java
+++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ocr/controller/OcrRestfulController.java
@@ -2,6 +2,7 @@ package com.jero.modules.ocr.controller;
import cn.hutool.core.util.ObjectUtil;
import com.jero.common.api.vo.Result;
+import com.jero.common.constant.enums.CutEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.modules.ocr.entity.OcrRecordEO;
import com.jero.modules.ocr.enums.ResultContentEnum;
@@ -165,12 +166,24 @@ public class OcrRestfulController{
String fileOriPath = ossFile.getUrl();
String oriName = ossFile.getFileName();
File pdfFile = new File(fileOriPath);
- FileInputStream fileInputStream = new FileInputStream(pdfFile);
- MultipartFile multipartFile = new MockMultipartFile(oriName, oriName,
- ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
- return ocrRestfulService.handleFile(multipartFile,multipartFile.getOriginalFilename(),ocrRecordEO,"add");
+ try {
+ FileInputStream fileInputStream = new FileInputStream(pdfFile);
+ MultipartFile multipartFile = new MockMultipartFile(oriName, oriName,
+ ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
+ return ocrRestfulService.handleFile(multipartFile,multipartFile.getOriginalFilename(),ocrRecordEO,"add");
+ } catch (FileNotFoundException fileNotFoundException) { // 系统找不到指定的文件
+ if (CutEnum.CN.getValue().equals(ocrRecordEO.getCut())) {
+ return Result.error("无法找到该文件");
+ } else {
+ return Result.error("File not found");
+ }
+ }
} else {
- return Result.error("无法找到该文件");
+ if (CutEnum.CN.getValue().equals(ocrRecordEO.getCut())) {
+ return Result.error("无法找到该文件");
+ } else {
+ return Result.error("File not found");
+ }
}
}