From 5e55cbc7cf95b0f892ae4066a7699a5f76a0f2f3 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期二, 23 十二月 2025 18:25:31 +0800
Subject: [PATCH] 修改字段,接口

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

diff --git a/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml b/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml
index d720d37..991e1b6 100644
--- a/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml
+++ b/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml
@@ -3,20 +3,22 @@
 <mapper namespace="com.ruoyi.staff.mapper.StaffJoinLeaveRecordMapper">
     <select id="staffJoinLeaveRecordListPage" resultType="com.ruoyi.staff.pojo.StaffJoinLeaveRecord">
         SELECT
-        *
-        FROM staff_join_leave_record
+        t1.*,
+        t2.name as deptPositionName
+        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 staff_name LIKE CONCAT('%',#{staffJoinLeaveRecord.staffName},'%')
+            AND t1.staff_name LIKE CONCAT('%',#{staffJoinLeaveRecord.staffName},'%')
         </if>
         <if test="staffJoinLeaveRecord.entryDateStart != null and staffJoinLeaveRecord.entryDateStart != '' ">
-            and contract_start_time like concat('%',#{staffJoinLeaveRecord.entryDateStart},'%')
+            and t1.contract_start_time like concat('%',#{staffJoinLeaveRecord.entryDateStart},'%')
         </if>
         <if test="staffJoinLeaveRecord.entryDateEnd != null and staffJoinLeaveRecord.entryDateEnd != '' ">
-            and contract_end_time like concat('%',#{staffJoinLeaveRecord.entryDateEnd},'%')
+            and t1.contract_end_time like concat('%',#{staffJoinLeaveRecord.entryDateEnd},'%')
         </if>
-        order by create_time desc
+        order by t1.create_time desc
     </select>
     <select id="staffJoinLeaveRecordList" resultType="com.ruoyi.staff.pojo.StaffJoinLeaveRecord">
         SELECT

--
Gitblit v1.9.3