From 7f616cfc0eeb35dd08cbd070b81661d351386c95 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期四, 19 三月 2026 17:36:56 +0800
Subject: [PATCH] yys

---
 src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml b/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml
index fde6af6..41ccd83 100644
--- a/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml
+++ b/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml
@@ -8,10 +8,13 @@
         FROM staff_join_leave_record t1
         left join dept_position  t2 on t1.dept_position_id = t2.id and t2.type = 2
         where
-        staff_state = #{staffJoinLeaveRecord.staffState}
+        t1.staff_state = #{staffJoinLeaveRecord.staffState}
         <if test="staffJoinLeaveRecord.staffName != null and staffJoinLeaveRecord.staffName != '' ">
             AND t1.staff_name LIKE CONCAT('%',#{staffJoinLeaveRecord.staffName},'%')
         </if>
+        <if test="staffOnJob.deptPositionId != null">
+            AND t1.dept_position_id = #{staffOnJob.deptPositionId}
+        </if>
         <if test="staffJoinLeaveRecord.entryDateStart != null and staffJoinLeaveRecord.entryDateStart != '' ">
             and t1.contract_start_time like concat('%',#{staffJoinLeaveRecord.entryDateStart},'%')
         </if>

--
Gitblit v1.9.3