From 47806d9e390ee00e1d29ad1da8c1aa908882a758 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 11 八月 2026 14:43:59 +0800
Subject: [PATCH] 用河南鹤壁代码覆盖山西长治

---
 src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml b/src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml
index f4d6284..8b23627 100644
--- a/src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml
+++ b/src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml
@@ -44,7 +44,6 @@
                 AND A.apply_date BETWEEN #{req.startDate} AND #{req.endDate}
             </if>
         </where>
-        order by A.id desc
     </select>
 
     <select id="getInboundBatchesBySupplier"
@@ -88,14 +87,12 @@
     </select>
 
     <select id="existsByStockInRecordId" resultType="java.lang.Boolean">
-        SELECT COUNT(*) > 0
+         SELECT COUNT(*) > 0
         FROM account_payment_application
-        WHERE status != 2
-        AND (
-            <foreach collection="stockInRecordIds" item="id" separator=" OR ">
-                FIND_IN_SET(#{id}, stock_in_record_ids) > 0
-            </foreach>
-        )
+        WHERE  status != 2
+        <foreach collection="stockInRecordIds" item="id" open="(" separator=" OR " close=")">
+            FIND_IN_SET(#{id}, stock_in_record_ids)
+        </foreach>
     </select>
 
 </mapper>

--
Gitblit v1.9.3