From 75f043dfa6660716364e66ee0b3cf99f44255686 Mon Sep 17 00:00:00 2001
From: DYL0109 <dn18191638832@163.com>
Date: 星期三, 16 四月 2025 19:20:36 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/develop1.0' into dyl_dev

---
 zhitan-system/src/main/java/com/zhitan/statisticalAnalysis/service/impl/StatisticalAnalysisServiceImpl.java |   56 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/zhitan-system/src/main/java/com/zhitan/statisticalAnalysis/service/impl/StatisticalAnalysisServiceImpl.java b/zhitan-system/src/main/java/com/zhitan/statisticalAnalysis/service/impl/StatisticalAnalysisServiceImpl.java
index 257f890..d0ea2f0 100644
--- a/zhitan-system/src/main/java/com/zhitan/statisticalAnalysis/service/impl/StatisticalAnalysisServiceImpl.java
+++ b/zhitan-system/src/main/java/com/zhitan/statisticalAnalysis/service/impl/StatisticalAnalysisServiceImpl.java
@@ -6,7 +6,7 @@
 import com.zhitan.common.constant.TimeTypeConst;
 import com.zhitan.common.enums.TimeType;
 import com.zhitan.dataitem.service.IDataItemService;
-import com.zhitan.model.domain.vo.ModelNodeIndexInfor;
+import com.zhitan.model.domain.vo.ModelNodeIndexInfo;
 import com.zhitan.model.service.IModelNodeService;
 import com.zhitan.realtimedata.domain.DataItem;
 import com.zhitan.statisticalAnalysis.domain.dto.DataAnalysisMoMDTO;
@@ -41,14 +41,14 @@
     public List<DataAnalysisYoYVO> listElectricDataComparisonYoY(DataAnalysisMoMDTO dto) {
         List<DataAnalysisYoYVO> yoyList = new ArrayList<>();
         // 鏌ヨ鐐逛綅涓庣敤鑳藉崟鍏冧俊鎭�
-        List<ModelNodeIndexInfor> nodeInforList = listModelNodeIndexIdRelationInfor(dto.getNodeId());
+        List<ModelNodeIndexInfo> nodeInforList = listModelNodeIndexIdRelationInfor(dto.getNodeId());
         if (CollectionUtils.isEmpty(nodeInforList)) {
             return yoyList;
         }
-        List<String> indexIds = nodeInforList.stream().map(ModelNodeIndexInfor::getIndexId).collect(Collectors.toList());
+        List<String> indexIds = nodeInforList.stream().map(ModelNodeIndexInfo::getIndexId).collect(Collectors.toList());
         // 鎸夌収鐐逛綅杩涜鍒嗙粍
-        Map<String, List<ModelNodeIndexInfor>> nodeIndexMap = nodeInforList.stream().collect(
-                Collectors.groupingBy(ModelNodeIndexInfor::getNodeId));
+        Map<String, List<ModelNodeIndexInfo>> nodeIndexMap = nodeInforList.stream().collect(
+                Collectors.groupingBy(ModelNodeIndexInfo::getNodeId));
         // 鑾峰彇鏌ヨ鏃堕棿
         Date beginTime = dto.getBeginTime();
         Date endTime = dto.getEndTime();
@@ -62,12 +62,12 @@
         BigDecimal multiple = BigDecimal.valueOf(CommonConst.DIGIT_100);
         nodeIndexMap.forEach((key, value) -> {
             DataAnalysisYoYVO yoyVO = new DataAnalysisYoYVO();
-            Optional<ModelNodeIndexInfor> first = value.stream().findFirst();
+            Optional<ModelNodeIndexInfo> first = value.stream().findFirst();
             first.ifPresent(modelNodeIndexInfor -> yoyVO.setEnergyUnitName(modelNodeIndexInfor.getName()));
             // 璧嬪�煎崟浣�
             yoyVO.setUnit("kWh");
             // 鎵惧嚭indexIds
-            List<String> indexIdList = value.stream().map(ModelNodeIndexInfor::getIndexId).collect(Collectors.toList());
+            List<String> indexIdList = value.stream().map(ModelNodeIndexInfo::getIndexId).collect(Collectors.toList());
             // 姹傚拰
             BigDecimal sum = BigDecimal.valueOf(dataItemList.stream().filter(li -> indexIdList.contains(li.getIndexId()))
                     .mapToDouble(DataItem::getValue).sum()).setScale(CommonConst.DIGIT_2, RoundingMode.HALF_UP);
@@ -93,11 +93,11 @@
     public List<DataAnalysisMoMVO> listElectricDataComparisonMoM(DataAnalysisMoMDTO dto) {
         List<DataAnalysisMoMVO> momList = new ArrayList<>();
         // 鏍规嵁id鏌ヨ鐐逛綅淇℃伅
-        List<ModelNodeIndexInfor> nodeIndexInforList = listModelNodeIndexIdRelationInfor(dto.getNodeId());
+        List<ModelNodeIndexInfo> nodeIndexInforList = listModelNodeIndexIdRelationInfor(dto.getNodeId());
         if (CollectionUtils.isEmpty(nodeIndexInforList)) {
             return momList;
         }
-        List<String> indexIds = nodeIndexInforList.stream().map(ModelNodeIndexInfor::getIndexId).collect(Collectors.toList());
+        List<String> indexIds = nodeIndexInforList.stream().map(ModelNodeIndexInfo::getIndexId).collect(Collectors.toList());
         Date beginTime = dto.getBeginTime();
         Date endTime = dto.getEndTime();
         Date lastTime;
@@ -121,8 +121,8 @@
             lastEndTime = DateUtil.offset(endTime, DateField.YEAR, CommonConst.DIGIT_MINUS_1);
         }
         // 鎸夌収鐐逛綅杩涜鍒嗙粍
-        Map<String, List<ModelNodeIndexInfor>> nodeIndexMap = nodeIndexInforList.stream().collect(
-                Collectors.groupingBy(ModelNodeIndexInfor::getNodeId));
+        Map<String, List<ModelNodeIndexInfo>> nodeIndexMap = nodeIndexInforList.stream().collect(
+                Collectors.groupingBy(ModelNodeIndexInfo::getNodeId));
         // 鏍规嵁indexId鏌ヨdataItem
         List<DataItem> dataItemList = dataItemService.getDataItemHourInforByIndexIds(beginTime, endTime, TimeType.HOUR.name(), indexIds);
         List<DataItem> lastDataItemList = dataItemService.getDataItemHourInforByIndexIds(lastTime, lastEndTime, TimeType.HOUR.name(), indexIds);
@@ -130,12 +130,12 @@
         BigDecimal multiple = BigDecimal.valueOf(CommonConst.DIGIT_100);
         nodeIndexMap.forEach((key, value) -> {
             DataAnalysisMoMVO momVO = new DataAnalysisMoMVO();
-            Optional<ModelNodeIndexInfor> first = value.stream().findFirst();
+            Optional<ModelNodeIndexInfo> first = value.stream().findFirst();
             first.ifPresent(modelNodeIndexInfor -> momVO.setEnergyUnitName(modelNodeIndexInfor.getName()));
             // 璧嬪�煎崟浣�
             momVO.setUnit("kWh");
             // 鎵惧嚭indexIds
-            List<String> indexIdList = value.stream().map(ModelNodeIndexInfor::getIndexId).collect(Collectors.toList());
+            List<String> indexIdList = value.stream().map(ModelNodeIndexInfo::getIndexId).collect(Collectors.toList());
             // 姹傚拰
             BigDecimal sum = BigDecimal.valueOf(dataItemList.stream().filter(li -> indexIdList.contains(li.getIndexId()))
                     .mapToDouble(DataItem::getValue).sum()).setScale(CommonConst.DIGIT_2, RoundingMode.HALF_UP);
@@ -161,14 +161,14 @@
     public List<DataAnalysisYoYVO> listWaterDataComparisonYoY(DataAnalysisMoMDTO dto) {
         List<DataAnalysisYoYVO> yoyList = new ArrayList<>();
         // 鏌ヨ鐐逛綅涓庣敤鑳藉崟鍏冧俊鎭�
-        List<ModelNodeIndexInfor> nodeInforList = listModelNodeIndexIdRelationInfor(dto.getNodeId());
+        List<ModelNodeIndexInfo> nodeInforList = listModelNodeIndexIdRelationInfor(dto.getNodeId());
         if (CollectionUtils.isEmpty(nodeInforList)) {
             return yoyList;
         }
-        List<String> indexIds = nodeInforList.stream().map(ModelNodeIndexInfor::getIndexId).collect(Collectors.toList());
+        List<String> indexIds = nodeInforList.stream().map(ModelNodeIndexInfo::getIndexId).collect(Collectors.toList());
         // 鎸夌収鐐逛綅杩涜鍒嗙粍
-        Map<String, List<ModelNodeIndexInfor>> nodeIndexMap = nodeInforList.stream().collect(
-                Collectors.groupingBy(ModelNodeIndexInfor::getNodeId));
+        Map<String, List<ModelNodeIndexInfo>> nodeIndexMap = nodeInforList.stream().collect(
+                Collectors.groupingBy(ModelNodeIndexInfo::getNodeId));
         // 鏃堕棿绫诲瀷
         // 鑾峰彇鏌ヨ鏃堕棿
         Date beginTime = dto.getBeginTime();
@@ -183,12 +183,12 @@
         BigDecimal multiple = BigDecimal.valueOf(CommonConst.DIGIT_100);
         nodeIndexMap.forEach((key, value) -> {
             DataAnalysisYoYVO yoyVO = new DataAnalysisYoYVO();
-            Optional<ModelNodeIndexInfor> first = value.stream().findFirst();
+            Optional<ModelNodeIndexInfo> first = value.stream().findFirst();
             first.ifPresent(modelNodeIndexInfor -> yoyVO.setEnergyUnitName(modelNodeIndexInfor.getName()));
             // 璧嬪�煎崟浣�
             yoyVO.setUnit("m鲁");
             // 鎵惧嚭indexIds
-            List<String> indexIdList = value.stream().map(ModelNodeIndexInfor::getIndexId).collect(Collectors.toList());
+            List<String> indexIdList = value.stream().map(ModelNodeIndexInfo::getIndexId).collect(Collectors.toList());
             // 姹傚拰
             BigDecimal sum = BigDecimal.valueOf(dataItemList.stream().filter(li -> indexIdList.contains(li.getIndexId()))
                     .mapToDouble(DataItem::getValue).sum()).setScale(CommonConst.DIGIT_2, RoundingMode.HALF_UP);
@@ -214,11 +214,11 @@
     public List<DataAnalysisMoMVO> listWaterDataComparisonMoM(DataAnalysisMoMDTO dto) {
         List<DataAnalysisMoMVO> momList = new ArrayList<>();
         // 鏍规嵁id鏌ヨ鐐逛綅淇℃伅
-        List<ModelNodeIndexInfor> nodeIndexInforList = listModelNodeIndexIdRelationInfor(dto.getNodeId());
+        List<ModelNodeIndexInfo> nodeIndexInforList = listModelNodeIndexIdRelationInfor(dto.getNodeId());
         if (CollectionUtils.isEmpty(nodeIndexInforList)) {
             return momList;
         }
-        List<String> indexIds = nodeIndexInforList.stream().map(ModelNodeIndexInfor::getIndexId).collect(Collectors.toList());
+        List<String> indexIds = nodeIndexInforList.stream().map(ModelNodeIndexInfo::getIndexId).collect(Collectors.toList());
         Date beginTime = dto.getBeginTime();
         Date endTime = dto.getEndTime();
         Date lastTime;
@@ -242,8 +242,8 @@
             lastEndTime = DateUtil.offset(endTime, DateField.YEAR, CommonConst.DIGIT_MINUS_1);
         }
         // 鎸夌収鐐逛綅杩涜鍒嗙粍
-        Map<String, List<ModelNodeIndexInfor>> nodeIndexMap = nodeIndexInforList.stream().collect(
-                Collectors.groupingBy(ModelNodeIndexInfor::getNodeId));
+        Map<String, List<ModelNodeIndexInfo>> nodeIndexMap = nodeIndexInforList.stream().collect(
+                Collectors.groupingBy(ModelNodeIndexInfo::getNodeId));
         // 鏌ヨ瀵瑰簲indexIds锛屾壘鍒板搴攄ataItem淇℃伅
         List<DataItem> dataItemList = dataItemService.getDataItemHourInforByIndexIds(beginTime, endTime, TimeType.HOUR.name(), indexIds);
         List<DataItem> lastDataItemList = dataItemService.getDataItemHourInforByIndexIds(lastTime, lastEndTime, TimeType.HOUR.name(), indexIds);
@@ -251,12 +251,12 @@
         BigDecimal multiple = BigDecimal.valueOf(CommonConst.DIGIT_100);
         nodeIndexMap.forEach((key, value) -> {
             DataAnalysisMoMVO momVO = new DataAnalysisMoMVO();
-            Optional<ModelNodeIndexInfor> first = value.stream().findFirst();
+            Optional<ModelNodeIndexInfo> first = value.stream().findFirst();
             first.ifPresent(modelNodeIndexInfor -> momVO.setEnergyUnitName(modelNodeIndexInfor.getName()));
             // 璧嬪�煎崟浣�
             momVO.setUnit("m鲁");
             // 鎵惧嚭indexIds
-            List<String> indexIdList = value.stream().map(ModelNodeIndexInfor::getIndexId).collect(Collectors.toList());
+            List<String> indexIdList = value.stream().map(ModelNodeIndexInfo::getIndexId).collect(Collectors.toList());
             // 姹傚拰
             BigDecimal sum = BigDecimal.valueOf(dataItemList.stream().filter(li -> indexIdList.contains(li.getIndexId()))
                     .mapToDouble(DataItem::getValue).sum()).setScale(CommonConst.DIGIT_2, RoundingMode.HALF_UP);
@@ -278,11 +278,11 @@
     /**
      * 鏌ヨ鐐逛綅涓庣敤鑳藉崟鍏冧俊鎭�
      */
-    private List<ModelNodeIndexInfor> listModelNodeIndexIdRelationInfor(String nodeId) {
-        List<ModelNodeIndexInfor> nodeInforList = modelNodeService.listModelNodeIndexIdRelationInforByParentId(nodeId);
+    private List<ModelNodeIndexInfo> listModelNodeIndexIdRelationInfor(String nodeId) {
+        List<ModelNodeIndexInfo> nodeInforList = modelNodeService.listModelNodeIndexIdRelationInforByParentId(nodeId);
         // 濡傛灉鏄┖瀛樺湪涓ょ鎯呭喌锛�1锛歩d鏈夐棶棰橈紝2锛氭渶搴曞眰
         if (CollectionUtils.isEmpty(nodeInforList)) {
-            List<ModelNodeIndexInfor> inforList = modelNodeService.getModelNodeIndexIdRelationInforByNodeId(nodeId);
+            List<ModelNodeIndexInfo> inforList = modelNodeService.getModelNodeIndexIdRelationInforByNodeId(nodeId);
             if (CollectionUtils.isNotEmpty(inforList)) {
                 nodeInforList.addAll(inforList);
             }

--
Gitblit v1.9.3