From 849648e82e5dec96f9f30fcc9c9bd799268b1f4c Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期四, 09 四月 2026 10:40:44 +0800
Subject: [PATCH] 新增资金流水导入

---
 service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableBillManagementServiceImpl.java |   77 ++++++++++++++++++++++++++++++++++++--
 1 files changed, 73 insertions(+), 4 deletions(-)

diff --git a/service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableBillManagementServiceImpl.java b/service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableBillManagementServiceImpl.java
index a38fcb9..1e6a475 100644
--- a/service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableBillManagementServiceImpl.java
+++ b/service/src/main/java/com/ruoyi/cwgl/service/impl/ReceivableBillManagementServiceImpl.java
@@ -7,9 +7,8 @@
 
 import com.ruoyi.cwgl.domain.*;
 import com.ruoyi.cwgl.domain.vo.ReceivableBillAgingAnalysisVo;
-import com.ruoyi.cwgl.mapper.AgingLogMapper;
-import com.ruoyi.cwgl.mapper.ReceivableBillManagementLogMapper;
-import com.ruoyi.cwgl.mapper.ReceivableFeeManagementMapper;
+import com.ruoyi.cwgl.domain.vo.ReceivableBillAccountAnalysisVo;
+import com.ruoyi.cwgl.mapper.*;
 import com.ruoyi.cwgl.service.IAgingLogService;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.stereotype.Service;
@@ -22,7 +21,6 @@
 import com.ruoyi.common.enums.DataSourceType;
 import com.ruoyi.common.core.service.BaseService;
 
-import com.ruoyi.cwgl.mapper.ReceivableBillManagementMapper;
 import com.ruoyi.cwgl.service.IReceivableBillManagementService;
 import com.ruoyi.common.core.text.Convert;
 import com.ruoyi.common.exception.ServiceException;
@@ -48,6 +46,8 @@
     private ReceivableBillManagementLogMapper receivableBillManagementLogMapper;
     @Resource
     private AgingLogMapper agingLogMapper;
+    @Resource
+    private AccountLogMapper accountLogMapper;
 
 
     /**
@@ -104,6 +104,41 @@
         super.export(ReceivableBillManagement.class,exportKey,"receivableBillManagementData",(pageNum)->{
             PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE);
             return selectReceivableBillManagementList(receivableBillManagement);
+        });
+    }   /**
+     * 鏌ヨ搴旀敹璐﹀崟绠$悊鍒楄〃 寮傛 瀵煎嚭
+     *
+     * @param receivableBillManagement 搴旀敹璐﹀崟绠$悊
+     * @param exportKey 瀵煎嚭鍔熻兘鐨勫敮涓�鏍囪瘑
+     * @return 搴旀敹璐﹀崟绠$悊闆嗗悎
+     */
+    @DataSource(DataSourceType.SLAVE)
+    @Async
+    @Override
+    public void customerSummaryExport(ReceivableBillManagement receivableBillManagement,String exportKey) {
+
+        super.export2(ReceivableBillCustomerSummary.class,exportKey,"搴旀敹璐︽鍒嗘瀽绠$悊",(pageNum)->{
+            PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE);
+            return selectReceivableBillCustomerSummaryList(receivableBillManagement);
+        });
+    }  @DataSource(DataSourceType.SLAVE)
+    @Async
+    @Override
+    public void agingAnalysisExport(ReceivableBillManagement receivableBillManagement,String exportKey) {
+
+        super.export2(ReceivableBillAgingAnalysisVo.class,exportKey,"搴旀敹璐︽鍒嗘瀽绠$悊",(pageNum)->{
+            PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE);
+            return selectReceivableBillAgingAnalysisList(receivableBillManagement);
+        });
+    }
+
+    @Async
+    @Override
+    public void accountAnalysisExport(ReceivableBillManagement receivableBillManagement,String exportKey) {
+
+        super.export2(ReceivableBillAccountAnalysisVo.class,exportKey,"搴旀敹璐︽鍒嗘瀽绠$悊",(pageNum)->{
+            PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE);
+            return selectReceivableBillAccountAnalysisList(receivableBillManagement);
         });
     }
 
@@ -171,6 +206,24 @@
             log.setCreateTime(DateUtils.getNowDate());
             log.setOperation("缂栬緫璐﹂緞鍒嗘瀽淇℃伅");
             agingLogMapper.insertAgingLog(log);
+        }
+
+        return result;
+    }
+    @Override
+    public int account(ReceivableBillManagement receivableBillManagement)
+    {
+        receivableBillManagement.setUpdateTime(DateUtils.getNowDate());
+        int result = receivableBillManagementMapper.updateReceivableBillManagement(receivableBillManagement);
+
+        // 璁板綍鎿嶄綔鏃ュ織
+        if (result > 0) {
+            AccountLog log = new AccountLog();
+            log.setHeadId(receivableBillManagement.getId());
+            log.setCreateBy(SecurityUtils.getUsername());
+            log.setCreateTime(DateUtils.getNowDate());
+            log.setOperation("缂栬緫璐︽鍒嗘瀽淇℃伅");
+            accountLogMapper.insertAccountLog(log);
         }
 
         return result;
@@ -329,4 +382,20 @@
     {
         return receivableBillManagementMapper.batchUpdateAgingAnalysisData();
     }
+
+    /**
+     * 鏌ヨ搴旀敹璐﹀崟璐︽鍒嗘瀽鍒楄〃
+     *
+     * @param receivableBillManagement 鏌ヨ鏉′欢
+     * @return 搴旀敹璐﹀崟璐︽鍒嗘瀽鍒楄〃
+     */
+    @DataSource(DataSourceType.SLAVE)
+    @Override
+    public List<ReceivableBillAccountAnalysisVo> selectReceivableBillAccountAnalysisList(ReceivableBillManagement receivableBillManagement)
+    {
+        // 鐩存帴鏌ヨ鏁版嵁搴撲腑鐨勮处娆惧垎鏋愭暟鎹�
+        List<ReceivableBillAccountAnalysisVo> result = receivableBillManagementMapper.selectReceivableBillAccountAnalysisList(receivableBillManagement);
+        
+        return result;
+    }
 }

--
Gitblit v1.8.0