From 733d48f803a002033c5f1d6c22dcc799bf1b724c Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: Tue, 23 Sep 2025 14:09:20 +0800
Subject: [PATCH] 功能改造

---
 gkhy-system/src/main/resources/mapper/system/DailySafetyInspectionMapper.xml |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/gkhy-system/src/main/resources/mapper/system/DailySafetyInspectionMapper.xml b/gkhy-system/src/main/resources/mapper/system/DailySafetyInspectionMapper.xml
index e573dcc..d525dbe 100644
--- a/gkhy-system/src/main/resources/mapper/system/DailySafetyInspectionMapper.xml
+++ b/gkhy-system/src/main/resources/mapper/system/DailySafetyInspectionMapper.xml
@@ -15,6 +15,7 @@
         <result column="rectification_measures" property="rectificationMeasures" />
         <result column="examination_results" property="examinationResults" />
         <result column="re_check_user_id" property="reCheckUserId" />
+        <result column="check_user" property="checkUser" />
         <result column="re_check_user" property="reCheckUser" />
         <result column="re_check_date" property="reCheckDate" />
         <result column="remark" property="remark" />
@@ -25,7 +26,7 @@
         <result column="update_time" property="updateTime" />
         <result column="check_type" property="checkType" />
 
-        <collection  property="dailySafetyInspectionUsers"   ofType="com.gkhy.system.domain.DailySafetyInspectionUser"  column="id = id" select="selectDailySafetyInspectionUsers" />
+<!--        <collection  property="dailySafetyInspectionUsers"   ofType="com.gkhy.system.domain.DailySafetyInspectionUser"  column="id = id" select="selectDailySafetyInspectionUsers" />-->
 
     </resultMap>
 
@@ -59,19 +60,22 @@
             AND date_format(a.check_date,'%Y%m%d') &lt;= date_format(#{checkEndDate},'%Y%m%d')
         </if>
         <if test="haveMainHazard != null and haveMainHazard == 0 ">
-            and (main_hazard = '无' or main_hazard = ' ')
+            and (a.main_hazard = '无' or a.main_hazard = ' ')
         </if>
         <if test="haveMainHazard != null and haveMainHazard == 1 ">
-            and (main_hazard != '无' and main_hazard != ' ')
+            and (a.main_hazard != '无' and a.main_hazard != ' ')
         </if>
-        <if test="searchCheckUserIds != null and !searchCheckUserIds.isEmpty()">
-            and a.id in (
-            select distinct daily_safety_inspection_id from daily_safety_inspection_user
-            where check_user_id in    <foreach collection="searchCheckUserIds" item="group" open="(" separator="," close=")">
-            #{group}
-        </foreach>
-            )
+        <if test="checkUser != null and checkUser != ''">
+            and a.check_user like concat('%',#{checkUser},'%')
         </if>
+<!--        <if test="searchCheckUserIds != null and !searchCheckUserIds.isEmpty()">-->
+<!--            and a.id in (-->
+<!--            select distinct daily_safety_inspection_id from daily_safety_inspection_user-->
+<!--            where check_user_id in    <foreach collection="searchCheckUserIds" item="group" open="(" separator="," close=")">-->
+<!--            #{group}-->
+<!--        </foreach>-->
+<!--            )-->
+<!--        </if>-->
         order by a.create_time desc
     </select>
 

--
Gitblit v1.9.2