From 189fe18f9aaabc39cc4bb4cc00f531bc43fe152e Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期二, 09 六月 2026 16:20:30 +0800
Subject: [PATCH] 新增台账时增加库存类型

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

diff --git a/src/main/resources/mapper/staff/StaffLeaveMapper.xml b/src/main/resources/mapper/staff/StaffLeaveMapper.xml
index 8bc9607..fef5c81 100644
--- a/src/main/resources/mapper/staff/StaffLeaveMapper.xml
+++ b/src/main/resources/mapper/staff/StaffLeaveMapper.xml
@@ -35,6 +35,7 @@
         <if test="c.staffName != null and c.staffName != '' ">
             AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%')
         </if>
+        order by staff_leave.create_time desc
     </select>
     <select id="staffLeaveList" resultType="com.ruoyi.staff.dto.StaffLeaveDto">
         SELECT
@@ -61,10 +62,12 @@
         sys_post sp ON sp.post_id = soj.sys_post_id
         LEFT JOIN
         sys_dept sd ON sd.dept_id = soj.sys_dept_id
-        where 1=1
-        <if test="c.staffName != null and c.staffName != '' ">
-            AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%')
-        </if>
+        <where>
+            <if test="c.staffName != null and c.staffName != '' ">
+                AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%')
+            </if>
+        </where>
+        order by staff_leave.create_time desc
     </select>
 
     <select id="staffLeaveReasonAnalytics" resultType="com.ruoyi.staff.dto.StaffLeaveDto">

--
Gitblit v1.9.3