From 5b4b756fc31d253cbf7fcf3e70c479622125062f Mon Sep 17 00:00:00 2001 From: hzj <826100833@qq.com> Date: Mon, 25 Nov 2024 20:02:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=B7=E5=8D=97=E5=A4=A7=E5=B1=8Fbug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=9A=82=E6=80=81=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=8A=9F=E8=83=BD=E6=96=B0=E5=A2=9E=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/majornetwork/Impl/TransientServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/TransientServiceImpl.java b/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/TransientServiceImpl.java index 02ce0ac98..ae9a28a3b 100644 --- a/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/TransientServiceImpl.java +++ b/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/TransientServiceImpl.java @@ -296,7 +296,7 @@ public class TransientServiceImpl implements TransientService { List lineList = generalDeviceDTOList.stream().flatMap(dto -> dto.getLineIndexes().stream()).collect(Collectors.toList()); List data = deviceTreeClient.getTerminalTree().getData(); if(!CollectionUtils.isEmpty(transientParam.getSubstationIds())){ - List collect = data.stream().map(TerminalTree::getChildren).flatMap(Collection::stream) + List collect = data.stream().map(TerminalTree::getChildren).flatMap(Collection::stream) .map(TerminalTree::getChildren).flatMap(Collection::stream) .map(TerminalTree::getChildren).flatMap(Collection::stream) .map(TerminalTree::getChildren).flatMap(Collection::stream) @@ -304,12 +304,12 @@ public class TransientServiceImpl implements TransientService { .map(TerminalTree::getChildren).flatMap(Collection::stream) .map(TerminalTree::getChildren).flatMap(Collection::stream) .map(TerminalTree::getChildren).flatMap(Collection::stream) - .collect(Collectors.toList()); + .map(TerminalTree::getId).collect(Collectors.toList()); lineList.retainAll(collect); } if(!CollectionUtils.isEmpty(transientParam.getLineIds())){ - List collect1 = data.stream().map(TerminalTree::getChildren).flatMap(Collection::stream) + List collect1 = data.stream().map(TerminalTree::getChildren).flatMap(Collection::stream) .map(TerminalTree::getChildren).flatMap(Collection::stream) .map(TerminalTree::getChildren).flatMap(Collection::stream) .map(TerminalTree::getChildren).flatMap(Collection::stream) @@ -317,7 +317,7 @@ public class TransientServiceImpl implements TransientService { .map(TerminalTree::getChildren).flatMap(Collection::stream) .map(TerminalTree::getChildren).flatMap(Collection::stream) .filter(temp->transientParam.getLineIds().contains(temp.getId())) - .collect(Collectors.toList()); + .map(TerminalTree::getId).collect(Collectors.toList()); lineList.retainAll(collect1); } if(CollUtil.isEmpty(lineList)){