From 11502c7f9f26edda0733c43a17b5b773ee8447e4 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 20 五月 2026 16:47:47 +0800
Subject: [PATCH] refactor(account): 财务模块更新
---
src/main/java/com/ruoyi/account/service/impl/AccountingServiceImpl.java | 14 +++++++-------
1 files changed, 7 insertions(+), 7 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 7df89e6..ab38285 100644
--- a/src/main/java/com/ruoyi/account/service/impl/AccountingServiceImpl.java
+++ b/src/main/java/com/ruoyi/account/service/impl/AccountingServiceImpl.java
@@ -10,7 +10,7 @@
import com.ruoyi.account.pojo.BorrowInfo;
import com.ruoyi.device.mapper.DeviceLedgerMapper;
import com.ruoyi.device.pojo.DeviceLedger;
-import com.ruoyi.framework.web.domain.R;
+import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.procurementrecord.mapper.CustomStorageMapper;
import com.ruoyi.procurementrecord.mapper.ProcurementRecordMapper;
import com.ruoyi.procurementrecord.mapper.ProcurementRecordOutMapper;
@@ -43,7 +43,7 @@
private final ProcurementRecordMapper procurementRecordMapper;
private final ProcurementRecordOutMapper procurementRecordOutMapper;
- public R<?> total(Integer year) {
+ public AjaxResult total(Integer year) {
Map<String,Object> map = new HashMap<>();
map.put("deprAmount",0); // 鎶樻棫閲戦
map.put("deviceTotal",0); // 璁惧鎬绘暟
@@ -150,7 +150,7 @@
});
}
map.put("inventoryValue",procurementRecordTotal.add(customStorageTotal));
- return R.ok(map);
+ return AjaxResult.success( map);
}
/**
@@ -245,7 +245,7 @@
return totalDepreciation.setScale(2, BigDecimal.ROUND_HALF_UP);
}
- public R<?> deviceTypeDistribution(Integer year) {
+ public AjaxResult deviceTypeDistribution(Integer year) {
// 2. 缁勮杩斿洖VO
DeviceTypeDistributionVO vo = new DeviceTypeDistributionVO();
List<DeviceTypeDetail> details = deviceLedgerMapper.getDeviceTypeDistributionByYear( year);
@@ -265,10 +265,10 @@
.collect(Collectors.toList()));
vo.setTotalCount(vo.getCategories().size());
}
- return R.ok(vo);
+ return AjaxResult.success(vo);
}
- public R<?> calculateDepreciation(Page page, Integer year) {
+ public AjaxResult calculateDepreciation(Page page, Integer year) {
LambdaQueryWrapper<DeviceLedger> deviceLedgerLambdaQueryWrapper = new LambdaQueryWrapper<>();
deviceLedgerLambdaQueryWrapper.like(DeviceLedger::getCreateTime,year)
.eq(DeviceLedger::getIsDepr,1);
@@ -277,6 +277,6 @@
record.setDeprAmount(calculatePreciseDepreciation(record));
record.setNetValue(record.getTaxIncludingPriceTotal().subtract(record.getDeprAmount()));
}
- return R.ok(deviceLedgerIPage);
+ return AjaxResult.success(deviceLedgerIPage);
}
}
--
Gitblit v1.9.3