From f4cbbc97d350b527b7e83a0413870f207a4d4b14 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期一, 02 二月 2026 11:52:48 +0800
Subject: [PATCH] yys  付款流水增加分组

---
 src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java |    8 ++++----
 src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml                 |    1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java b/src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java
index 4c775ec..7fe6012 100644
--- a/src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java
+++ b/src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java
@@ -164,11 +164,11 @@
                     productRecord.setSaleLedgerProjectId(salesLedgerProduct.getId());
                     productRecord.setId(null);
                     productRecord.setType("2");
-                     insert = productRecordMapper.insert(productRecord);
+                    insert += productRecordMapper.insert(productRecord);
                 }
-                if (insert <= 0) {
-                    throw new RuntimeException("浜у搧寮�绁ㄦ暟閮戒负0锛岃妫�鏌�");
-                }
+            }
+            if (insert <= 0) {
+                throw new RuntimeException("浜у搧寮�绁ㄦ暟閮戒负0锛岃妫�鏌�");
             }
         }
         // 杩佺Щ涓存椂鏂囦欢鍒版寮忕洰褰�
diff --git a/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml b/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml
index 8e8cf1c..d85caf3 100644
--- a/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml
+++ b/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml
@@ -183,6 +183,7 @@
                 AND t4.purchase_contract_number LIKE CONCAT('%',#{params.purchaseContractNumber},'%')
             </if>
         </where>
+        GROUP BY T1.id
         ORDER BY T1.payment_date,T1.create_time DESC
     </select>
 

--
Gitblit v1.9.3