From 9ff7e9a2c0e6fc338d8a239566ef9346081fa672 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 21 五月 2026 09:47:41 +0800
Subject: [PATCH] refactor(account): 删除BorrowInfo借款信息相关代码及接口

---
 src/main/java/com/ruoyi/account/service/impl/AccountingServiceImpl.java |   42 ++++++++++--------------------------------
 1 files changed, 10 insertions(+), 32 deletions(-)

diff --git a/src/main/java/com/ruoyi/account/service/impl/AccountingServiceImpl.java b/src/main/java/com/ruoyi/account/service/impl/AccountingServiceImpl.java
index e9a586f..01f5687 100644
--- a/src/main/java/com/ruoyi/account/service/impl/AccountingServiceImpl.java
+++ b/src/main/java/com/ruoyi/account/service/impl/AccountingServiceImpl.java
@@ -4,10 +4,8 @@
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.ruoyi.account.dto.DeviceTypeDetail;
-import com.ruoyi.account.dto.DeviceTypeDistributionVO;
-import com.ruoyi.account.mapper.BorrowInfoMapper;
-import com.ruoyi.account.pojo.BorrowInfo;
+import com.ruoyi.account.bean.dto.DeviceTypeDetail;
+import com.ruoyi.account.bean.dto.DeviceTypeDistributionVO;
 import com.ruoyi.device.mapper.DeviceLedgerMapper;
 import com.ruoyi.device.pojo.DeviceLedger;
 import com.ruoyi.framework.web.domain.AjaxResult;
@@ -17,10 +15,8 @@
 import com.ruoyi.procurementrecord.pojo.CustomStorage;
 import com.ruoyi.procurementrecord.pojo.ProcurementRecordOut;
 import com.ruoyi.procurementrecord.pojo.ProcurementRecordStorage;
-import com.ruoyi.procurementrecord.service.impl.ProcurementRecordOutServiceImpl;
-import com.ruoyi.procurementrecord.service.impl.ProcurementRecordServiceImpl;
+import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
@@ -36,22 +32,13 @@
  */
 @Service
 @Slf4j
+@RequiredArgsConstructor
 public class AccountingServiceImpl {
 
-    @Autowired
-    private DeviceLedgerMapper deviceLedgerMapper;
-
-    @Autowired
-    private BorrowInfoMapper borrowInfoMapper;
-
-    @Autowired
-    private CustomStorageMapper customStorageMapper;
-
-    @Autowired
-    private ProcurementRecordMapper procurementRecordMapper;
-
-    @Autowired
-    private ProcurementRecordOutMapper procurementRecordOutMapper;
+    private final DeviceLedgerMapper deviceLedgerMapper;
+    private final CustomStorageMapper customStorageMapper;
+    private final ProcurementRecordMapper procurementRecordMapper;
+    private final ProcurementRecordOutMapper procurementRecordOutMapper;
 
     public AjaxResult total(Integer year) {
         Map<String,Object> map = new HashMap<>();
@@ -85,17 +72,8 @@
             map.put("netValue",reduce.subtract(total));
         }
         // 璐熷��
-        LambdaQueryWrapper<BorrowInfo> borrowInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
-        borrowInfoLambdaQueryWrapper.like(BorrowInfo::getCreateTime,year)
-                .eq(BorrowInfo::getStatus,1);
-        List<BorrowInfo> borrowInfos = borrowInfoMapper.selectList(borrowInfoLambdaQueryWrapper);
-        if(CollectionUtils.isNotEmpty(borrowInfos)){
-            BigDecimal reduce = borrowInfos.stream()
-                    .map(BorrowInfo::getBorrowAmount)
-                    .filter(Objects::nonNull)
-                    .reduce(BigDecimal.ZERO, BigDecimal::add);
-            map.put("debt",reduce);
-        }
+        map.put("debt",BigDecimal.ZERO);
+
         // 搴撳瓨璧勪骇
         LambdaQueryWrapper<ProcurementRecordStorage> procurementRecordStorageLambdaQueryWrapper = new LambdaQueryWrapper<>();
         procurementRecordStorageLambdaQueryWrapper.like(ProcurementRecordStorage::getCreateTime,year);

--
Gitblit v1.9.3