From 5d36e1f987ef21e44ded2e8a1d06c28094ec1e76 Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期六, 19 四月 2025 12:39:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 zhitan-system/src/main/resources/mapper/comprehensivestatistics/YearComprehensiveMapper.xml |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/zhitan-system/src/main/resources/mapper/comprehensivestatistics/YearComprehensiveMapper.xml b/zhitan-system/src/main/resources/mapper/comprehensivestatistics/YearComprehensiveMapper.xml
index e36e03c..7aabc8e 100644
--- a/zhitan-system/src/main/resources/mapper/comprehensivestatistics/YearComprehensiveMapper.xml
+++ b/zhitan-system/src/main/resources/mapper/comprehensivestatistics/YearComprehensiveMapper.xml
@@ -27,6 +27,7 @@
         SELECT
             aa.index_id,
             aa.index_name,
+            aa.unit_id,
             <foreach item="item" index="index" collection="dataList">
                 COALESCE ( MAX ( CASE WHEN data_time = #{item.dataTime} THEN "value" END ), null ) AS ${item.value},
             </foreach>
@@ -37,6 +38,7 @@
             SELECT
                 ni.index_id,
                 ei."name" AS "index_name",
+                ei.unit_id,
                 di."value",
                 di.data_time,
                 di.time_type,
@@ -51,12 +53,12 @@
                 AND di.data_time >= #{beginTime}
                 AND di.data_time &lt;= #{endTime}
                 AND di.time_type = #{timeType}
-            <if test="indexStorageId !='' and indexStorageId !=null">
-                and ei.energy_id=#{indexStorageId}
-            </if>
+                <if test="indexStorageId !='' and indexStorageId !=null">
+                    and ei.energy_id=#{indexStorageId}
+                </if>
         ) aa
-        GROUP BY aa.index_id, aa.index_name, aa.time_type, aa.order_num
-        ORDER BY aa.order_num ASC
+            GROUP BY aa.index_id, aa.index_name, aa.unit_id, aa.time_type, aa.order_num
+            ORDER BY aa.order_num ASC
     </select>
 
     <select id="getListChart" resultMap="dataItemMap">

--
Gitblit v1.9.3