From 2edad88369de5469474619b48755ebc2560b1a45 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期五, 30 一月 2026 15:53:46 +0800
Subject: [PATCH] bug修改

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

diff --git a/ruoyi-system/src/main/resources/mapper/system/DeviceUsageMapper.xml b/ruoyi-system/src/main/resources/mapper/system/DeviceUsageMapper.xml
index f0299d1..369ddb4 100644
--- a/ruoyi-system/src/main/resources/mapper/system/DeviceUsageMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/DeviceUsageMapper.xml
@@ -124,7 +124,7 @@
     <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
-        ,t6.state as state
+        ,IF(t6.state  is null,0,t6.state) 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
@@ -174,7 +174,7 @@
     <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
-        ,t6.state as state
+        ,IF(t6.state  is null,0,t6.state) 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
@@ -218,7 +218,7 @@
     <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
-        ,t6.state as state
+        ,IF(t6.state  is null,0,t6.state) 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

--
Gitblit v1.7.1