From aeff817e9cd4cc67fc8df4255367a4e9624c4597 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期二, 30 六月 2026 11:10:57 +0800
Subject: [PATCH] 删除报价和采购对应的全部审批流程

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

diff --git a/src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml b/src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml
index 267de0b..f4d6284 100644
--- a/src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml
+++ b/src/main/resources/mapper/account/purchase/AccountPaymentApplicationMapper.xml
@@ -88,12 +88,14 @@
     </select>
 
     <select id="existsByStockInRecordId" resultType="java.lang.Boolean">
-         SELECT COUNT(*) > 0
+        SELECT COUNT(*) > 0
         FROM account_payment_application
-        WHERE  status != 2
-        <foreach collection="stockInRecordIds" item="id" open="(" separator=" OR " close=")">
-            FIND_IN_SET(#{id}, stock_in_record_ids)
-        </foreach>
+        WHERE status != 2
+        AND (
+            <foreach collection="stockInRecordIds" item="id" separator=" OR ">
+                FIND_IN_SET(#{id}, stock_in_record_ids) > 0
+            </foreach>
+        )
     </select>
 
 </mapper>

--
Gitblit v1.9.3