From 9b55891e6dd57bc244e6c5654434b32e05c83496 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 25 九月 2024 15:10:25 +0800
Subject: [PATCH] 异常监控排除已经审核过的工单作为状态

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

diff --git a/ycl-server/src/main/resources/mapper/zgyw/CheckScoreMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/CheckScoreMapper.xml
index 0d89d89..15812fe 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/CheckScoreMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/CheckScoreMapper.xml
@@ -206,4 +206,22 @@
         ORDER BY score DESC, tcs.dept_id
     </select>
 
+    <select id="dashboard" resultType="com.ycl.platform.domain.entity.CheckScore">
+        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 = 0
+            </if>
+            <if test="dataScope == 2">
+                AND s.examine_tag = 1
+            </if>
+            <if test="dataScope == 3">
+                AND s.examine_tag = 2
+            </if>
+        </where>
+        GROUP BY s.dept_id
+        ORDER BY s.create_time DESC
+    </select>
 </mapper>

--
Gitblit v1.8.0