From b5a5e43e2ea7af773dba1ee99c2194be61515df8 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期四, 05 二月 2026 18:21:59 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/smart_screen

---
 ruoyi-system/src/main/resources/mapper/system/DeviceUsageMapper.xml |   42 +++++++++++++++++++++---------------------
 1 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/DeviceUsageMapper.xml b/ruoyi-system/src/main/resources/mapper/system/DeviceUsageMapper.xml
index 369ddb4..f74dc0b 100644
--- a/ruoyi-system/src/main/resources/mapper/system/DeviceUsageMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/DeviceUsageMapper.xml
@@ -123,8 +123,8 @@
     </select>
     <select id="errorList" resultType="com.ruoyi.system.vo.ErrorListVo">
         select t1.*,t2.project_id,t2.plan_id,t3.`name` as  projectName,t4.`name` as planName
-             ,t5.`name` as problemName,IF(t1.device_id is null ,1,2) as type,t1.create_time as checkTime
-        ,IF(t6.state  is null,0,t6.state) as state
+             ,t5.description as problemName,IF(t1.device_id is null ,1,2) as type,t2.create_time as checkTime
+        ,IF(t6.state  is null,0,t6.state+1) as state
         from record t1
                  LEFT JOIN task t2 on t1.check_task_id = t2.id
                  LEFT JOIN project t3 on t2.project_id = t3.id
@@ -142,17 +142,17 @@
         <if test="query.projectId != null">
             and t2.project_id = #{query.projectId}
         </if>
-        <if test="query.state ==0 ">
-            and t6.state is null
+        <if test="query.state ==4 ">
+            and t1.error_review_id is null
         </if>
         <if test="query.state ==1 ">
-            and t6.state = #{query.state}
+            and t6.state = 0
         </if>
         <if test="query.state ==2 ">
-            and t6.state = #{query.state}
+            and t6.state = 1
         </if>
         <if test="query.state ==3 ">
-            and t6.state = #{query.state}
+            and t6.state = 2
         </if>
         <if test="query.type != null and query.type == 1">
             and t1.device_id is null
@@ -173,8 +173,8 @@
     </select>
     <select id="deviceErrorList" resultType="com.ruoyi.system.vo.ErrorListVo">
         select t1.*,t2.project_id,t2.plan_id,t3.`name` as  projectName,t4.`name` as planName
-        ,t5.`name` as problemName,IF(t1.device_id is null ,1,2) as type,t1.create_time as checkTime
-        ,IF(t6.state  is null,0,t6.state) as state
+        ,t5.description as problemName,IF(t1.device_id is null ,1,2) as type,t1.create_time as checkTime
+        ,IF(t6.state  is null,0,t6.state+1) as state
         from record t1
         LEFT JOIN task t2 on t1.check_task_id = t2.id
         LEFT JOIN project t3 on t2.project_id = t3.id
@@ -192,17 +192,17 @@
         <if test="query.projectId != null">
             and t2.project_id = #{query.projectId}
         </if>
-        <if test="query.state ==0 ">
-            and t6.state is null
+        <if test="query.state ==4 ">
+            and t1.error_review_id is null
         </if>
         <if test="query.state ==1 ">
-            and t6.state = #{query.state}
+            and t6.state = 0
         </if>
         <if test="query.state ==2 ">
-            and t6.state = #{query.state}
+            and t6.state = 1
         </if>
         <if test="query.state ==3 ">
-            and t6.state = #{query.state}
+            and t6.state = 2
         </if>
 
         <if test="query.content!= null and query.content!=''">
@@ -217,8 +217,8 @@
     </select>
     <select id="safetyErrorList" resultType="com.ruoyi.system.vo.ErrorListVo">
         select t1.*,t2.project_id,t2.plan_id,t3.`name` as  projectName,t4.`name` as planName
-        ,t5.`name` as problemName,IF(t1.device_id is null ,1,2) as type,t1.create_time as checkTime
-        ,IF(t6.state  is null,0,t6.state) as state
+        ,t5.description as problemName,IF(t1.device_id is null ,1,2) as type,t1.create_time as checkTime
+        ,IF(t6.state  is null,0,t6.state+1) as state
         from record t1
         LEFT JOIN task t2 on t1.check_task_id = t2.id
         LEFT JOIN project t3 on t2.project_id = t3.id
@@ -236,17 +236,17 @@
         <if test="query.projectId != null">
             and t2.project_id = #{query.projectId}
         </if>
-        <if test="query.state ==0 ">
-            and t6.state is null
+        <if test="query.state ==4 ">
+            and t1.error_review_id is null
         </if>
         <if test="query.state ==1 ">
-            and t6.state = #{query.state}
+            and t6.state = 0
         </if>
         <if test="query.state ==2 ">
-            and t6.state = #{query.state}
+            and t6.state = 1
         </if>
         <if test="query.state ==3 ">
-            and t6.state = #{query.state}
+            and t6.state = 2
         </if>
 
         <if test="query.content!= null and query.content!=''">

--
Gitblit v1.7.1