From 7e51076a4cccc27df31bcdd98ca14c2f9d4928e9 Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期四, 09 五月 2024 07:27:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml b/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
index ceff2b1..d903fed 100644
--- a/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
+++ b/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
@@ -4,20 +4,20 @@
 
     <select id="performanceShiftPage" resultType="map">
         SELECT
-            s.id,
-            if(u.department is not null and u.department != '', CONCAT(u.name, '锛�', u.department, '锛�'), u.name) name,
-            GROUP_CONCAT(s.work_time, '锛�', s.shift SEPARATOR ';') AS shiftTime
+        if(u.department is not null and u.department != '', CONCAT(u.name, '锛�', u.department, '锛�'), u.name) name,
+        GROUP_CONCAT(s.work_time, '锛�', s.shift, '锛�', s.id order by s.work_time SEPARATOR ';') AS shiftTime
         FROM performance_shift s
-                 LEFT JOIN user u on u.id = s.user_id
-        GROUP BY u.id
+        LEFT JOIN user u on u.id = s.user_id
         <where>
             <if test="time != null and time != ''">
-                and s.work_time in DATE_FORMAT(#{time}, '%Y-%m-%d')
+                and DATE_FORMAT(s.work_time, '%Y-%m') = DATE_FORMAT(#{time}, '%Y-%m' )
             </if>
             <if test="userName != null and userName != ''">
-                and s.name concat('%', #{userName}, '%')
+                and u.name like concat('%', #{userName}, '%')
             </if>
-            <if test="laboratory != null and laboratory != ''"></if>
+            <if test="laboratory != null and laboratory != ''">
+            </if>
         </where>
+        GROUP BY u.id
     </select>
 </mapper>

--
Gitblit v1.9.3