From 77110f5ffa1d15da51da5f9548426df4df455d4b Mon Sep 17 00:00:00 2001 From: shuliYao <1397940314@qq.com> Date: Sun, 31 Mar 2024 22:30:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9B=BE=E5=AE=A1=E7=9B=B8=E4=BC=BC?= =?UTF-8?q?=E5=BA=A6=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=9B=B8=E4=BC=BC=E5=BA=A6=E5=88=86=E7=BB=84=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OcrCheckDuplicateController.java | 1 + .../dataobject/OcrCheckDuplicateResult.java | 4 ++- .../impl/OcrCheckDuplicateServiceImpl.java | 36 +++++++++++++++---- .../mapper/oa/OcrTaskchildPictureMapper.xml | 2 +- 4 files changed, 34 insertions(+), 9 deletions(-) diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrCheckDuplicateController.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrCheckDuplicateController.java index 8828f0d6..4f4b9dcd 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrCheckDuplicateController.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrCheckDuplicateController.java @@ -84,6 +84,7 @@ public class OcrCheckDuplicateController { queryWrapper.eq("tenant_id", tenantId); queryWrapper.eq("suspiciousfile", "0"); + queryWrapper.orderBy(true,true,"submit_date_timestamp"); List pageList = ocrPictureService.listPage(queryWrapper); if (null != pageList && !pageList.isEmpty()) { if (pageList.size() == 1) { diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/dataobject/OcrCheckDuplicateResult.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/dataobject/OcrCheckDuplicateResult.java index e3a1eae7..e67df8d6 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/dataobject/OcrCheckDuplicateResult.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/dataobject/OcrCheckDuplicateResult.java @@ -16,7 +16,7 @@ import lombok.experimental.Accessors; /** *

- * + * *

* * @author author @@ -50,5 +50,7 @@ public class OcrCheckDuplicateResult implements Serializable { @ApiModelProperty(value = "当前图片在当前任务包下比对最高阈值") private Double maxSimilarity; + @ApiModelProperty(value = "阈值分组排序值,数值越低排序越靠前,") + private Integer similarityGroupOrder; } diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/impl/OcrCheckDuplicateServiceImpl.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/impl/OcrCheckDuplicateServiceImpl.java index cf6c2c00..1e8f8bd1 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/impl/OcrCheckDuplicateServiceImpl.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/impl/OcrCheckDuplicateServiceImpl.java @@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.fasterxml.jackson.databind.ObjectMapper; +import io.swagger.annotations.ApiModelProperty; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; import org.slf4j.Logger; @@ -184,7 +185,10 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl similarityGroupOrderMap = new HashMap<>(); //1.开启比对任务 for (OcrPicture ocrPicture : ocrPictureList) { @@ -247,12 +251,27 @@ public class OcrCheckDuplicateServiceImpl extends ServiceImpl - order by t1.max_similarity ${oderType},t2.submit_date_timestamp ${oderType} + order by t1.max_similarity ${oderType},t1.similarity_group_order asc,t2.submit_date_timestamp ${oderType} order by t2.create_time ${oderType} -- 2.39.3