From 7513c94b4149dd61dddbc7bf11fcb587ab6da9ce Mon Sep 17 00:00:00 2001 From: "DESKTOP-DDTUS3E\\yaxin" Date: Mon, 4 Nov 2024 16:07:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E6=A0=87=E5=85=B3=E8=81=94=E5=8E=9F?= =?UTF-8?q?=E5=AD=90=E6=8C=87=E6=A0=87=E6=95=B0=E9=87=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../police/service/impl/ModelIndexServiceImpl.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/supervision/police/service/impl/ModelIndexServiceImpl.java b/src/main/java/com/supervision/police/service/impl/ModelIndexServiceImpl.java index 20f9084..f19fb16 100644 --- a/src/main/java/com/supervision/police/service/impl/ModelIndexServiceImpl.java +++ b/src/main/java/com/supervision/police/service/impl/ModelIndexServiceImpl.java @@ -112,18 +112,17 @@ public class ModelIndexServiceImpl extends ServiceImpl ids = new ArrayList<>(); + Set ids = new HashSet<>(); IndexRule indexRule = index.getIndexRule(); if (indexRule != null) { - Set idSet = new HashSet<>(); List ruleConditionGroupList = indexRule.getRuleConditionGroupList(); for (RuleConditionGroup ruleConditionGroup : ruleConditionGroupList) { List ruleConditionList = ruleConditionGroup.getRuleConditionList(); for (RuleCondition ruleCondition : ruleConditionList) { - idSet.add(ruleCondition.getAtomicIndexId()); + ids.add(ruleCondition.getAtomicIndexId()); } } - List atomicIndexList = modelAtomicIndexService.selectBatchIds(idSet.stream().toList()); + List atomicIndexList = modelAtomicIndexService.selectBatchIds(ids.stream().toList()); index.setAtomicIndexList(atomicIndexList); } else if (StringUtils.isNotEmpty(judgeLogic)) { List logic = JSONUtil.toList(judgeLogic, JudgeLogic.class); @@ -133,7 +132,7 @@ public class ModelIndexServiceImpl extends ServiceImpl atomicIndexList = modelAtomicIndexService.selectBatchIds(ids); + List atomicIndexList = modelAtomicIndexService.selectBatchIds(ids.stream().toList()); index.setAtomicIndexList(atomicIndexList); } index.setAtomicIndexNum(ids.size());