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 fa6c4da2..78d30cf7 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 @@ -488,6 +488,19 @@ public class DetectionServiceImpl { .collect(Collectors.toList()); if (CollUtil.isNotEmpty(checkData)) { List phaseValue = map.get(phase); + if (ResultUnitEnum.ANGLE.getCode().equals(type)) { + phaseValue = phaseValue.stream().map(x -> { + // 原始误差值 + double originDiff = x - checkData.get(0).getValue(); + // 转换误差值 + double translateDiff = Math.abs(originDiff) - 360; + if (Math.abs(translateDiff) <= 10) { + return Math.abs(x); + } else { + return x; + } + }).collect(Collectors.toList()); + } // 注意:如果map中不存在该phase的键,phaseValue可能为null,需确保map包含该键 DetectionData detectionData = rangeComparisonList(phaseValue, isQualified, pqErrSysDtls, fData, checkData.get(0).getValue(), dataRule, scale); resultFlag.add(detectionData); diff --git a/storage/src/main/java/com/njcn/gather/util/StorageUtil.java b/storage/src/main/java/com/njcn/gather/util/StorageUtil.java index b7d1e37c..0f332932 100644 --- a/storage/src/main/java/com/njcn/gather/util/StorageUtil.java +++ b/storage/src/main/java/com/njcn/gather/util/StorageUtil.java @@ -120,6 +120,8 @@ public class StorageUtil { */ case "VA": case "IA": + case "U1A": + case "I1A": unit = "°"; break; /**