From 11f1dd9e4729bec36c49c0c72c96efa9a2998003 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 02 二月 2026 13:19:11 +0800
Subject: [PATCH] 新增不同日期时间段的培训课程编号都是同一编号

---
 src/main/resources/mapper/safe/SafeTrainingMapper.xml |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/safe/SafeTrainingMapper.xml b/src/main/resources/mapper/safe/SafeTrainingMapper.xml
index 1ae5159..b45878c 100644
--- a/src/main/resources/mapper/safe/SafeTrainingMapper.xml
+++ b/src/main/resources/mapper/safe/SafeTrainingMapper.xml
@@ -38,11 +38,12 @@
         left join safe_training_details std on std.safe_training_id = st.id
         left join sys_user su on st.assessment_user_id = su.user_id
         where  st.state = #{c.state}
+        GROUP BY st.id
         <if test="c.placeTraining != null and c.placeTraining != ''">
             and st.place_training like concat('%', #{c.placeTraining}, '%')
         </if>
-        <if test="c.trainingDate != null and c.trainingDate != ''">
-            and st.training_date = #{c.trainingDate}
+        <if test="c.trainingDate != null ">
+            and st.training_date = date_format(#{c.trainingDate},'%Y%m%d')
         </if>
     </select>
     <select id="getSafeTraining" resultType="com.ruoyi.safe.dto.SafeTrainingDto">

--
Gitblit v1.9.3