From 1cf91e355038837f30f2d727507b2229263d7de7 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期二, 27 一月 2026 17:49:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New' into dev_New
---
src/main/java/com/ruoyi/procurementrecord/utils/StockUtils.java | 34 +++++++++++++++++-----------------
1 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/main/java/com/ruoyi/procurementrecord/utils/StockUtils.java b/src/main/java/com/ruoyi/procurementrecord/utils/StockUtils.java
index f9a21d6..a42e43b 100644
--- a/src/main/java/com/ruoyi/procurementrecord/utils/StockUtils.java
+++ b/src/main/java/com/ruoyi/procurementrecord/utils/StockUtils.java
@@ -29,19 +29,19 @@
private final StockInRecordService stockInRecordService;
// 鑾峰彇鍟嗗搧鍏ュ簱鏁伴噺,鍑哄簱鏁伴噺,鍓╀綑搴撳瓨
- public Map<String, BigDecimal> getStockQuantity(Long productModelId) {
- // 鍏ュ簱鏁伴噺
- BigDecimal sumQuantity = procurementRecordMapper.getSumQuantity(productModelId);
- // 鍑哄簱鏁伴噺
- BigDecimal outQuantity = procurementRecordOutMapper.getSumQuantity(productModelId);
- // 鍓╀綑搴撳瓨
- BigDecimal stockQuantity = outQuantity.compareTo(sumQuantity) > 0 ? BigDecimal.ZERO : sumQuantity.subtract(outQuantity);
- Map<String, BigDecimal> stockMap = new HashMap<>();
- stockMap.put("inboundNum", sumQuantity);
- stockMap.put("outboundNum", outQuantity);
- stockMap.put("stockQuantity", stockQuantity);
- return stockMap;
- }
+// public Map<String, BigDecimal> getStockQuantity(Long productModelId) {
+// // 鍏ュ簱鏁伴噺
+// BigDecimal sumQuantity = procurementRecordMapper.getSumQuantity(productModelId);
+// // 鍑哄簱鏁伴噺
+// BigDecimal outQuantity = procurementRecordOutMapper.getSumQuantity(productModelId);
+// // 鍓╀綑搴撳瓨
+// BigDecimal stockQuantity = outQuantity.compareTo(sumQuantity) > 0 ? BigDecimal.ZERO : sumQuantity.subtract(outQuantity);
+// Map<String, BigDecimal> stockMap = new HashMap<>();
+// stockMap.put("inboundNum", sumQuantity);
+// stockMap.put("outboundNum", outQuantity);
+// stockMap.put("stockQuantity", stockQuantity);
+// return stockMap;
+// }
/**
* 涓嶅悎鏍煎叆搴�
@@ -50,7 +50,7 @@
* @param recordType
* @param recordId
*/
- public void addUnStock(Long productModelId, BigDecimal quantity, Integer recordType,Long recordId) {
+ public void addUnStock(Long productModelId, BigDecimal quantity, String recordType,Long recordId) {
StockUninventoryDto stockUninventoryDto = new StockUninventoryDto();
stockUninventoryDto.setRecordId(recordId);
stockUninventoryDto.setRecordType(String.valueOf(recordType));
@@ -82,7 +82,7 @@
* @param recordType
* @param recordId
*/
- public void addStock(Long productModelId, BigDecimal quantity, Integer recordType,Long recordId) {
+ public void addStock(Long productModelId, BigDecimal quantity, String recordType,Long recordId) {
StockInventoryDto stockInventoryDto = new StockInventoryDto();
stockInventoryDto.setRecordId(recordId);
stockInventoryDto.setRecordType(String.valueOf(recordType));
@@ -98,7 +98,7 @@
* @param recordType
* @param recordId
*/
- public void substractStock(Long productModelId, BigDecimal quantity, Integer recordType,Long recordId) {
+ public void substractStock(Long productModelId, BigDecimal quantity, String recordType,Long recordId) {
StockInventoryDto stockInventoryDto = new StockInventoryDto();
stockInventoryDto.setRecordId(recordId);
stockInventoryDto.setRecordType(String.valueOf(recordType));
@@ -108,7 +108,7 @@
}
//涓嶅悎鏍煎簱瀛樺垹闄�
- public void deleteStockRecord(Long recordId, Integer recordType) {
+ public void deleteStockRecord(Long recordId, String recordType) {
StockInRecord one = stockInRecordService.getOne(new QueryWrapper<StockInRecord>()
.lambda().eq(StockInRecord::getRecordId, recordId)
.eq(StockInRecord::getRecordType, recordType));
--
Gitblit v1.9.3