From 14c1ee3468182345d905fe3551c5c0bc5800d388 Mon Sep 17 00:00:00 2001 From: xiaoguangbin Date: Mon, 13 Jan 2025 16:04:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=B8=E7=B4=A0=E5=88=86=E6=9E=90?= =?UTF-8?q?=E8=A7=84=E5=88=99=20=E8=A7=A3=E5=86=B3=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E6=A0=B8=E7=B4=A0=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg/modules/redisStream/AnalysisConsumer.java | 13 ++++++++----- .../service/impl/AlarmAnalysisRuleServiceImpl.java | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/redisStream/AnalysisConsumer.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/redisStream/AnalysisConsumer.java index fc1094c1..bacaafdf 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/redisStream/AnalysisConsumer.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/redisStream/AnalysisConsumer.java @@ -132,14 +132,12 @@ public class AnalysisConsumer implements StreamListener names = nuclides.keySet(); List follow = ListUtil.toList(nuclidesStr.split(COMMA)); // 因数据库 Xe核素名称 M大小写不统一,先统一大小写再进行比较 - Collection followLower = follow.stream().map(String::toLowerCase).collect(Collectors.toList()); - Collection namesLower = names.stream().map(String::toLowerCase).collect(Collectors.toList()); + Collection follows = follow.stream().map(f->f.replace("M", "m")).collect(Collectors.toList()); // 推送过来的核素集合与所关注核素集合取交集 - Collection cross = CollectionUtil.intersection(namesLower, followLower); - Collection crossNew = cross.stream().map(f->f.replace("x", "X")).collect(Collectors.toList()); + Collection cross = CollectionUtil.intersection(names, follows); if (CollUtil.isEmpty(cross)) continue; Map nuclidesCross = nuclides.entrySet().stream() - .filter(entry -> crossNew.contains(entry.getKey())) + .filter(entry -> cross.contains(entry.getKey())) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); // 开始对交集中的核素进行条件判断 info.setRuleId(rule.getId()); @@ -221,6 +219,8 @@ public class AnalysisConsumer implements StreamListener