From 75b7a414ef821a07426790cb79c37811ae2f07ac Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 27 一月 2026 10:42:20 +0800
Subject: [PATCH] 浪潮对接单点登录:mis管理系统配置修改

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

diff --git a/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml b/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml
new file mode 100644
index 0000000..d720d37
--- /dev/null
+++ b/src/main/resources/mapper/staff/StaffJoinLeaveRecordMapper.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ruoyi.staff.mapper.StaffJoinLeaveRecordMapper">
+    <select id="staffJoinLeaveRecordListPage" resultType="com.ruoyi.staff.pojo.StaffJoinLeaveRecord">
+        SELECT
+        *
+        FROM staff_join_leave_record
+        where
+        staff_state = #{staffJoinLeaveRecord.staffState}
+        <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
+        *
+        FROM staff_join_leave_record
+        where
+        staff_state = #{staffJoinLeaveRecord.staffState}
+        <if test="staffJoinLeaveRecord.staffName != null and staffJoinLeaveRecord.staffName != '' ">
+            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