From 7a022cce2313827bc2525c1e2a5d762885f460b7 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期二, 03 二月 2026 11:03:40 +0800
Subject: [PATCH] yys  协同审批编号重复问题修复

---
 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