From bfd03b49505fc0cd35c5f9363f4a53c92f5296d0 Mon Sep 17 00:00:00 2001 From: wr <1754607820@qq.com> Date: Fri, 11 Apr 2025 13:09:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=95=B0=E6=8D=AE=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceimpl/line/SpecialAnalysisServiceImpl.java | 2 +- .../relation/RelationDataLimitRateDetailImpl.java | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/SpecialAnalysisServiceImpl.java b/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/SpecialAnalysisServiceImpl.java index 63a6df5..64c1e1f 100644 --- a/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/SpecialAnalysisServiceImpl.java +++ b/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/SpecialAnalysisServiceImpl.java @@ -212,7 +212,7 @@ public class SpecialAnalysisServiceImpl implements ISpecialAnalysisService { Map> lineP = dataPowerPList.stream().collect(Collectors.groupingBy(DataPowerPDto::getLineId)); //获取用户信息 List userPower = userLedgerFeignClient.getUserReportByIds(new ArrayList<>(objIdMap.values())).getData(); - Map userPowerMap = userPower.stream().collect(Collectors.toMap(NewUserReportVO::getId, NewUserReportVO::getRatePower)); + Map userPowerMap = userPower.stream().filter(x->ObjectUtil.isNotNull(x.getRatePower())).collect(Collectors.toMap(NewUserReportVO::getId, NewUserReportVO::getRatePower)); lineP.forEach((lineId, dtoList) -> { if (objIdMap.containsKey(lineId)) { //根据监测点找到用户,再根据用户找到额定有功功率 diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataLimitRateDetailImpl.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataLimitRateDetailImpl.java index 8b51eb7..043d63f 100644 --- a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataLimitRateDetailImpl.java +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataLimitRateDetailImpl.java @@ -2,6 +2,7 @@ package com.njcn.dataProcess.service.impl.relation; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.DatePattern; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSON; @@ -93,9 +94,9 @@ public class RelationDataLimitRateDetailImpl extends MppServiceImpl