From 277b5047d00a3e9094bafd5ecb078976fbf6a92d Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期四, 08 一月 2026 18:59:04 +0800
Subject: [PATCH] 华玺砂浆转移-采购代码、发货和发货审核、报修和报修审核、采购模板,查询采购模板接口、财务管理的存货核算数据接口、财务管理的固定资产核算获取台账接口、采购审批,接口、客户分类字段、采购台账字段,实现采购异常记录的添加接口、黑名单,添加资质管理字段,可上传资质文件-至军泰伟业

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

diff --git a/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml b/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml
index be3c392..d720d37 100644
--- a/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml
+++ b/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml
@@ -10,7 +10,13 @@
         <if test="staffJoinLeaveRecord.staffName != null and staffJoinLeaveRecord.staffName != '' ">
             AND staff_name LIKE CONCAT('%',#{staffJoinLeaveRecord.staffName},'%')
         </if>
-
+        <if test="staffJoinLeaveRecord.entryDateStart != null and staffJoinLeaveRecord.entryDateStart != '' ">
+            and contract_start_time like concat('%',#{staffJoinLeaveRecord.entryDateStart},'%')
+        </if>
+        <if test="staffJoinLeaveRecord.entryDateEnd != null and staffJoinLeaveRecord.entryDateEnd != '' ">
+            and contract_end_time like concat('%',#{staffJoinLeaveRecord.entryDateEnd},'%')
+        </if>
+        order by create_time desc
     </select>
     <select id="staffJoinLeaveRecordList" resultType="com.ruoyi.staff.pojo.StaffJoinLeaveRecord">
         SELECT
@@ -22,4 +28,13 @@
             AND staff_name LIKE CONCAT('%',#{staffJoinLeaveRecord.staffName},'%')
         </if>
     </select>
+    <select id="staffOnJobList" resultType="com.ruoyi.staff.pojo.StaffJoinLeaveRecord">
+        select *
+        from (select *,
+                     ROW_NUMBER() over (PARTITION BY staff_no ORDER BY create_time DESC ) as rn
+              from staff_join_leave_record
+              where staff_state = 1) t
+        where rn = 1
+
+    </select>
 </mapper>

--
Gitblit v1.9.3