From 82a0d121b3581b3634887850e0bded5874afc85d Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期一, 26 十月 2026 11:03:15 +0800
Subject: [PATCH] 接口按service_donatebaseinfo表ReportTime 字段倒序

---
 ruoyi-project/src/main/resources/mapper/project/ServiceDonatemaintenanceMapper.xml |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/ruoyi-project/src/main/resources/mapper/project/ServiceDonatemaintenanceMapper.xml b/ruoyi-project/src/main/resources/mapper/project/ServiceDonatemaintenanceMapper.xml
index 8a6b42c..19eef7b 100644
--- a/ruoyi-project/src/main/resources/mapper/project/ServiceDonatemaintenanceMapper.xml
+++ b/ruoyi-project/src/main/resources/mapper/project/ServiceDonatemaintenanceMapper.xml
@@ -70,12 +70,11 @@
         FROM
         service_donatebaseinfo sd
         LEFT JOIN service_donatemaintenance sdm ON sd.ID = sdm.InfoID
-        AND sd.del_flag = 0
         AND sdm.del_flag = 0
         and sdm.ID is not null
         left join service_deathinfo sdt on sd.ID = sdt.infoID and sdt.del_flag=0 and sdt.ID is not null
         <where>
-            sd.termination_case = 0
+            sd.del_flag = 0 and sd.termination_case = 0
             <if test="infoid != null ">and sd.ID = #{infoid}</if>
             <if test="inpatientno != null ">and sd.InpatientNo = #{inpatientno}</if>
             <if test="caseNo != null  and caseNo != ''">and case_no = #{caseNo}</if>
@@ -92,7 +91,7 @@
             <if test="id != null ">and sdt.id = #{id}</if>
             <if test="state != null  and state != ''">and sdm.state = #{state}</if>
         </where>
-        order by sd.InpatientNo desc
+        order by sd.ReportTime desc
         <if test="pageNum != null and pageSize != null">limit #{pageNum},#{pageSize}</if>
 
     </select>

--
Gitblit v1.9.3