This commit is contained in:
caozehui
2026-01-22 11:26:25 +08:00
parent 8c3eba9224
commit 3eb2736edb

View File

@@ -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<Integer> 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<Double> newArray = DetectionUtil.getNewArray(value, idxErrorValueList.subList(removeCount, idxErrorValueList.size()));
value.clear();
value.addAll(newArray);