From 9a80341dd5ae0d0b1e16d1a5ca36df4c8a6dba62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E6=9C=A8c?= <857448963@qq.com> Date: Tue, 28 Feb 2023 16:22:41 +0800 Subject: [PATCH] =?UTF-8?q?pms=E5=8F=B0=E8=B4=A6bug=E6=8F=90=E4=BA=A4,?= =?UTF-8?q?=E5=8F=B0=E8=B4=A6=E6=97=A5=E5=BF=97=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../distribution/Impl/PwRmpEventDetailServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pqs-event/event-boot/src/main/java/com/njcn/event/service/distribution/Impl/PwRmpEventDetailServiceImpl.java b/pqs-event/event-boot/src/main/java/com/njcn/event/service/distribution/Impl/PwRmpEventDetailServiceImpl.java index 9e0688a8b..ea8ce447d 100644 --- a/pqs-event/event-boot/src/main/java/com/njcn/event/service/distribution/Impl/PwRmpEventDetailServiceImpl.java +++ b/pqs-event/event-boot/src/main/java/com/njcn/event/service/distribution/Impl/PwRmpEventDetailServiceImpl.java @@ -22,6 +22,7 @@ import org.springframework.stereotype.Service; import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.function.Function; import java.util.stream.Collectors; /** @@ -63,6 +64,8 @@ public class PwRmpEventDetailServiceImpl implements PwRmpEventDetailService { if (CollectionUtil.isEmpty(pwPmsMonitorDTOList)) { return Collections.emptyList(); } + + // 获取配网暂态事件明细 List rmpEventDetailsPO = pwRmpEventDetailMapper.getPwRmpEventDetail(param, pwPmsMonitorDTOList.stream().map(PwPmsMonitorDTO::getMonitorId).collect(Collectors.toList())); @@ -72,7 +75,7 @@ public class PwRmpEventDetailServiceImpl implements PwRmpEventDetailService { // 查询检测点类型字典 List lineSortList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_SORT.getCode()).getData(); // 将单位信息转为map集合 key: 单位id value: 单位实体 - Map pwPmsMonitorDTOMap = pwPmsMonitorDTOList.stream().collect(Collectors.toMap(PwPmsMonitorDTO::getMonitorId, PwPmsMonitorDTO -> PwPmsMonitorDTO)); + Map pwPmsMonitorDTOMap = pwPmsMonitorDTOList.stream().collect(Collectors.toMap(PwPmsMonitorDTO::getMonitorId, PwPmsMonitorDTO -> PwPmsMonitorDTO, (oldValue, newValue) -> oldValue)); // 属性赋值 return rmpEventDetailsPO.stream().map(po -> { PwRmpEventDetailVO vo = new PwRmpEventDetailVO(); @@ -109,4 +112,4 @@ public class PwRmpEventDetailServiceImpl implements PwRmpEventDetailService { }).collect(Collectors.toList()); } -} \ No newline at end of file +}