From 2e770d5ad27afd5cec0ea8759ca37504a883b42f Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期三, 08 五月 2024 14:50:25 +0800
Subject: [PATCH] 2024-5-8 绩效管理-班次后端开发完成

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

diff --git a/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml b/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
index a1c5d61..cc7e1d4 100644
--- a/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
+++ b/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
@@ -8,15 +8,16 @@
         GROUP_CONCAT(s.work_time, '锛�', s.shift, '锛�', s.id SEPARATOR ';') AS shiftTime
         FROM performance_shift s
         LEFT JOIN user u on u.id = s.user_id
-        GROUP BY u.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