From d9b8d6c13f429a7b4be55ad00ac48a918ab4703b Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期三, 28 一月 2026 17:11:03 +0800
Subject: [PATCH] 新增申请开票代码

---
 service/src/main/java/com/ruoyi/cwgl/service/impl/FundFlowClaimDetailServiceImpl.java |   42 ++++++++++++++++++++++++++++++++++++++----
 1 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/service/src/main/java/com/ruoyi/cwgl/service/impl/FundFlowClaimDetailServiceImpl.java b/service/src/main/java/com/ruoyi/cwgl/service/impl/FundFlowClaimDetailServiceImpl.java
index d7038bc..a2d2646 100644
--- a/service/src/main/java/com/ruoyi/cwgl/service/impl/FundFlowClaimDetailServiceImpl.java
+++ b/service/src/main/java/com/ruoyi/cwgl/service/impl/FundFlowClaimDetailServiceImpl.java
@@ -21,11 +21,13 @@
 import com.ruoyi.cwgl.mapper.FundFlowMapper;
 import com.ruoyi.cwgl.domain.FundFlowClaimDetail;
 import com.ruoyi.cwgl.domain.FundFlow;
+import com.ruoyi.cwgl.domain.FundFlowLog;
 import com.ruoyi.cwgl.domain.ReceivableBillSettlementDetail;
 import com.ruoyi.cwgl.domain.PayableBillSettlementDetail;
 import com.ruoyi.cwgl.domain.ReceivableBillManagement;
 import com.ruoyi.cwgl.domain.PayableBillManagement;
 import com.ruoyi.cwgl.service.IFundFlowClaimDetailService;
+import com.ruoyi.cwgl.service.IFundFlowLogService;
 import com.ruoyi.cwgl.service.IReceivableBillSettlementDetailService;
 import com.ruoyi.cwgl.service.IPayableBillSettlementDetailService;
 import com.ruoyi.cwgl.service.IReceivableBillManagementService;
@@ -62,6 +64,9 @@
     
     @Resource
     private IPayableBillManagementService payableBillManagementService;
+    
+    @Resource
+    private IFundFlowLogService fundFlowLogService;
 
 
     /**
@@ -243,7 +248,17 @@
         // 鍒犻櫎缁撶畻鏄庣粏骞舵洿鏂拌处鍗曠姸鎬�
         deleteSettlementDetailsAndUpdateBillStatus(claimDetail,fundFlow);
         
-        return fundFlowClaimDetailMapper.deleteFundFlowClaimDetailByIds(ids);
+        int result = fundFlowClaimDetailMapper.deleteFundFlowClaimDetailByIds(ids);
+        
+        // 璁板綍鎿嶄綔鏃ュ織
+        if (result > 0) {
+            FundFlowLog log = new FundFlowLog();
+            log.setFlowId(fundFlowId);
+            log.setOperation("鍒犻櫎璐﹀崟璁ら鏄庣粏锛岃处鍗曠紪鍙凤細" + claimDetail.getBillNo() + "锛岃棰嗛噾棰濓細" + deleteAmount + "锛岃祫閲戞祦姘村彿锛�" + fundFlow.getBankFlowNo());
+            fundFlowLogService.insertFundFlowLog(log);
+        }
+        
+        return result;
     }
 
     /**
@@ -314,9 +329,14 @@
         
         // 鏂板锛氬垱寤虹粨绠楁槑缁嗗苟鏇存柊璐﹀崟鐘舵��
         if (insertResult > 0) {
-
             
             createSettlementDetailsAndUpdateBillStatus(claimDetail, fundFlow);
+            
+            // 璁板綍鎿嶄綔鏃ュ織
+            FundFlowLog log = new FundFlowLog();
+            log.setFlowId(fundFlowId);
+            log.setOperation("鏂板璐﹀崟璁ら鏄庣粏锛岃处鍗曠紪鍙凤細" + claimDetail.getBillNo() + "锛岃棰嗛噾棰濓細" + claimAmount + "锛岃祫閲戞祦姘村彿锛�" + fundFlow.getBankFlowNo());
+            fundFlowLogService.insertFundFlowLog(log);
         }
         
         return insertResult;
@@ -397,7 +417,14 @@
                 settlementDetail.setClaimDetailId(claimDetailId); // 璁剧疆璁ら鏄庣粏ID
                 settlementDetail.setReceiptAmount(claimAmount);
                 settlementDetail.setReceiptDate(fundFlow.getTransactionDate());
-                settlementDetail.setSettlementMethod("閾惰杞处"); // 鏍规嵁瀹為檯鎯呭喌璁剧疆
+                settlementDetail.setSettlementMethod("0"); // 鏍规嵁瀹為檯鎯呭喌璁剧疆
+                
+                // 璁剧疆閾惰璐︽埛淇℃伅
+                settlementDetail.setCustomerBank(fundFlow.getOurBankName()); // 瀹㈡埛寮�鎴疯锛堟湰鏂硅处鎴峰紑鎴疯锛�
+                settlementDetail.setCustomerBankAccount(fundFlow.getOurAccount()); // 瀹㈡埛閾惰璐﹀彿锛堟湰鏂硅处鍙凤級
+                settlementDetail.setReceivingBank(fundFlow.getCounterpartyName()); // 鏀舵璐︽埛寮�鎴疯锛堝鏂规埛鍚嶏級
+                settlementDetail.setReceivingBankAccount(fundFlow.getCounterpartyAccount()); // 鏀舵閾惰璐﹀彿锛堝鏂硅处鍙凤級
+                
                 settlementDetail.setCreateBy(SecurityUtils.getUsername());
                 settlementDetail.setCreateTime(DateUtils.getNowDate());
                 
@@ -428,7 +455,14 @@
                 settlementDetail.setClaimDetailId(claimDetailId); // 璁剧疆璁ら鏄庣粏ID
                 settlementDetail.setPaymentAmount(claimAmount);
                 settlementDetail.setPaymentDate(fundFlow.getTransactionDate());
-                settlementDetail.setSettlementMethod("閾惰杞处"); // 鏍规嵁瀹為檯鎯呭喌璁剧疆
+                settlementDetail.setSettlementMethod("0"); // 鏍规嵁瀹為檯鎯呭喌璁剧疆
+                
+                // 璁剧疆閾惰璐︽埛淇℃伅
+                settlementDetail.setPaymentBank(fundFlow.getOurBankName()); // 浠樻璐︽埛寮�鎴疯锛堟湰鏂硅处鎴峰紑鎴疯锛�
+                settlementDetail.setPaymentBankAccount(fundFlow.getOurAccount()); // 浠樻璐︽埛閾惰璐﹀彿锛堟湰鏂硅处鍙凤級
+                settlementDetail.setSupplierReceivingBank(fundFlow.getCounterpartyName()); // 渚涘簲鍟嗘敹娆捐处鎴峰紑鎴疯锛堝鏂规埛鍚嶏級
+                settlementDetail.setSupplierReceivingAccount(fundFlow.getCounterpartyAccount()); // 渚涘簲鍟嗘敹娆鹃摱琛岃处鎴凤紙瀵规柟璐﹀彿锛�
+                
                 settlementDetail.setCreateBy(SecurityUtils.getUsername());
                 settlementDetail.setCreateTime(DateUtils.getNowDate());
                 

--
Gitblit v1.8.0