diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/OcrConstant.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/OcrConstant.java index c94a024..5aa473e 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/OcrConstant.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/OcrConstant.java @@ -47,6 +47,6 @@ public class OcrConstant { //目前仅支持的字段 public static List SUPPORTED_FIELDS= Arrays.asList("hospitalName","doctorName","departmentName","time"); //目前仅支持的字段中文名 - public static List SUPPORTED_FIELD_NAMES= Arrays.asList("医院名称","医生名称","科室","时间"); + public static List SUPPORTED_FIELD_NAMES= Arrays.asList("医院名称","医生名称","姓名","科室","时间"); } diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ocr/service/impl/OcrIdentifyServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ocr/service/impl/OcrIdentifyServiceImpl.java index 8e7bbb2..93f5951 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ocr/service/impl/OcrIdentifyServiceImpl.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ocr/service/impl/OcrIdentifyServiceImpl.java @@ -976,6 +976,14 @@ public class OcrIdentifyServiceImpl extends ServiceImpl> resultToPoints = ImageUtils.semanticResultToPoints(semanticResult2); - if (resultToPoints.size() > 0) { + if (CollectionUtils.isNotEmpty(resultToPoints)) { ImageUtils.drawDashedRectangleOnImages(file.getAbsolutePath(), resultToPoints, outputImagePath); imgPath = outputImagePath; }