From 3eb2736edbff7990a17f4b095bd5c40cddb56ff5 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Thu, 22 Jan 2026 11:26:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detection/service/impl/DetectionServiceImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java b/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java index 103f243a..3ff90ad8 100644 --- a/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java @@ -42,7 +42,6 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.RequiredArgsConstructor; import org.apache.commons.collections4.CollectionUtils; -import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.lang.reflect.Field; @@ -88,8 +87,8 @@ public class DetectionServiceImpl { private static final Integer INHARMONIC_FLAG = 1; private static final Integer HARMONIC_FLAG = 2; - @Value("${error.removeCount:14}") - private Integer removeErrorValueCount; +// @Value("${error.removeCount:14}") +// private Integer removeErrorValueCount; @Data @AllArgsConstructor @@ -2583,7 +2582,7 @@ public class DetectionServiceImpl { } List idxErrorValueList = DetectionUtil.sort(errorValueList, false); - int removeCount = idxErrorValueList.size() > removeErrorValueCount ? removeErrorValueCount : idxErrorValueList.size() / 5; + int removeCount = idxErrorValueList.size() > 20 ? (idxErrorValueList.size() / 20) * 7 : (idxErrorValueList.size() / 5) * 3; List newArray = DetectionUtil.getNewArray(value, idxErrorValueList.subList(removeCount, idxErrorValueList.size())); value.clear(); value.addAll(newArray);