From 134ef8858210a09d34567b5ef0b8d29b6c8bf38d Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期一, 23 九月 2024 16:20:05 +0800
Subject: [PATCH] 大屏设备运行率bug

---
 ycl-server/src/main/resources/mapper/zgyw/CheckScoreMapper.xml |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ycl-server/src/main/resources/mapper/zgyw/CheckScoreMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/CheckScoreMapper.xml
index 45b4d2f..bd47211 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/CheckScoreMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/CheckScoreMapper.xml
@@ -207,15 +207,15 @@
     </select>
 
     <select id="dashboard" resultType="com.ycl.platform.domain.entity.CheckScore">
-        select s.*,d.area as deptName from t_check_score s
+        select avg(s.score) as score,d.area as deptName from t_check_score s
         left join sys_dept d on s.dept_id = d.dept_id
         <where>
+            s.create_time between #{startTime} and #{endTime}
             <if test="dataScope == 1">
                 AND s.examine_tag = 1
             </if>
         </where>
-        ORDER BY
-        s.create_time DESC
-        LIMIT 7
+        GROUP BY s.dept_id
+        ORDER BY s.create_time DESC
     </select>
 </mapper>

--
Gitblit v1.8.0