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 | 111 ++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 97 insertions(+), 14 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 7fe2305..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
@@ -1,18 +1,17 @@
package com.ruoyi.cwgl.service.impl;
-import java.math.BigDecimal;
-import java.util.Date;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import javax.annotation.Resource;
-import com.ruoyi.cwgl.domain.ReceivableBillCustomerSummary;
+import com.ruoyi.cwgl.domain.*;
import com.ruoyi.cwgl.domain.vo.ReceivableBillAgingAnalysisVo;
-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;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -22,13 +21,7 @@
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.core.service.BaseService;
-import com.ruoyi.cwgl.mapper.ReceivableBillManagementMapper;
-import com.ruoyi.cwgl.domain.ReceivableBillManagement;
-import com.ruoyi.cwgl.domain.ReceivableFeeManagement;
-import com.ruoyi.cwgl.domain.ReceivableBillManagementLog;
-import com.ruoyi.cwgl.service.IReceivableBillManagementLogService;
import com.ruoyi.cwgl.service.IReceivableBillManagementService;
-import com.ruoyi.cwgl.service.IReceivableFeeManagementService;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
@@ -50,7 +43,11 @@
private ReceivableFeeManagementMapper receivableFeeManagementMapper;
@Resource
- private IReceivableBillManagementLogService receivableBillManagementLogService;
+ private ReceivableBillManagementLogMapper receivableBillManagementLogMapper;
+ @Resource
+ private AgingLogMapper agingLogMapper;
+ @Resource
+ private AccountLogMapper accountLogMapper;
/**
@@ -108,6 +105,41 @@
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);
+ });
}
@@ -156,9 +188,44 @@
log.setCreateBy(SecurityUtils.getUsername());
log.setCreateTime(DateUtils.getNowDate());
log.setOperation("淇敼搴旀敹璐﹀崟锛岃处鍗曠紪鍙凤細" + receivableBillManagement.getSystemNo());
- receivableBillManagementLogService.insertReceivableBillManagementLog(log);
+ receivableBillManagementLogMapper.insertReceivableBillManagementLog(log);
}
+ return result;
+ } @Override
+ public int aging(ReceivableBillManagement receivableBillManagement)
+ {
+ receivableBillManagement.setUpdateTime(DateUtils.getNowDate());
+ int result = receivableBillManagementMapper.updateReceivableBillManagement(receivableBillManagement);
+
+ // 璁板綍鎿嶄綔鏃ュ織
+ if (result > 0) {
+ AgingLog log = new AgingLog();
+ log.setHeadId(receivableBillManagement.getId());
+ log.setCreateBy(SecurityUtils.getUsername());
+ 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;
}
@@ -256,7 +323,7 @@
log.setCreateBy(SecurityUtils.getUsername());
log.setCreateTime(DateUtils.getNowDate());
log.setOperation("浣滃簾搴旀敹璐﹀崟锛岃处鍗曠紪鍙凤細" + billManagement.getSystemNo());
- receivableBillManagementLogService.insertReceivableBillManagementLog(log);
+ receivableBillManagementLogMapper.insertReceivableBillManagementLog(log);
}
return result;
@@ -315,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