From f0ffb63cffafec8879a4f5416d999fdb070a25c2 Mon Sep 17 00:00:00 2001 From: xy <748613696@qq.com> Date: Mon, 23 Dec 2024 10:50:01 +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 --- .../njcn/harmonic/service/impl/CustomReportServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/CustomReportServiceImpl.java b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/CustomReportServiceImpl.java index fc5d7eb95..71ffd8f1f 100644 --- a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/CustomReportServiceImpl.java +++ b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/CustomReportServiceImpl.java @@ -1428,7 +1428,7 @@ public class CustomReportServiceImpl implements CustomReportService { // 遍历当前Map的键值对 for (Map.Entry entry : map.entrySet()) { String key = entry.getKey(); - if (!key.equals("time")) { + if (Objects.nonNull(entry.getValue()) && !key.equals("time")) { double value = (double) entry.getValue(); // 检查结果Map中是否已包含该键 if (!resultMap.containsKey(key) || (double) resultMap.get(key) > value) { @@ -1443,7 +1443,7 @@ public class CustomReportServiceImpl implements CustomReportService { // 遍历当前Map的键值对 for (Map.Entry entry : map.entrySet()) { String key = entry.getKey(); - if (!key.equals("time")) { + if (Objects.nonNull(entry.getValue()) && !key.equals("time")) { double value = (double) entry.getValue(); // 检查结果Map中是否已包含该键 if (!resultMap.containsKey(key) || (double) resultMap.get(key) < value) { @@ -1461,7 +1461,7 @@ public class CustomReportServiceImpl implements CustomReportService { // 遍历当前Map的键值对 for (Map.Entry entry : map.entrySet()) { String key = entry.getKey(); - if (!key.equals("time")) { + if (Objects.nonNull(entry.getValue()) && !key.equals("time")) { double value = (double) entry.getValue(); // 更新累计和