From 5021933fce5edf8947d172299d21a9f083a44e42 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 20 一月 2026 11:20:05 +0800
Subject: [PATCH] fix: 修复传入参数未接收、库存查询中当日库存与累计库存统计不一致
---
src/main/java/com/ruoyi/sales/controller/ShipmentApprovalController.java | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/ruoyi/sales/controller/ShipmentApprovalController.java b/src/main/java/com/ruoyi/sales/controller/ShipmentApprovalController.java
index ee7f721..63f417b 100644
--- a/src/main/java/com/ruoyi/sales/controller/ShipmentApprovalController.java
+++ b/src/main/java/com/ruoyi/sales/controller/ShipmentApprovalController.java
@@ -89,19 +89,21 @@
// 瀹℃壒閫氳繃
if (req.getApproveStatus() == 3) {
- // 鏌ヨ閲囪喘鍏ュ簱璁板綍
- LambdaQueryWrapper<ProcurementRecordStorage> lambdaQueryWrapper = new LambdaQueryWrapper<ProcurementRecordStorage>()
- .eq(ProcurementRecordStorage::getSalesLedgerProductId, req.getSalesLedgerProductId());
- ProcurementRecordStorage procurementRecordStorage = procurementRecordStorageService.getOne(lambdaQueryWrapper);
-
- if (procurementRecordStorage == null) {
- // 淇濊瘉鍓嶉潰鐨勪慨鏀瑰叏閮ㄥ洖婊�
- throw new ServiceException("閲囪喘璁板綍涓嶅瓨鍦紝瀹℃壒鍥炴粴");
- }
+// // 鏌ヨ閲囪喘鍏ュ簱璁板綍
+// LambdaQueryWrapper<ProcurementRecordStorage> lambdaQueryWrapper = new LambdaQueryWrapper<ProcurementRecordStorage>()
+// .eq(ProcurementRecordStorage::getSalesLedgerProductId, req.getSalesLedgerProductId());
+// ProcurementRecordStorage procurementRecordStorage = procurementRecordStorageService.getOne(lambdaQueryWrapper);
+//
+// if (procurementRecordStorage == null) {
+// // 淇濊瘉鍓嶉潰鐨勪慨鏀瑰叏閮ㄥ洖婊�
+// throw new ServiceException("閲囪喘璁板綍涓嶅瓨鍦紝瀹℃壒鍥炴粴");
+// }
// 鐢熸垚鍑哄簱璁板綍
ProcurementRecordOutAdd procurementRecordOutAdd = new ProcurementRecordOutAdd();
- procurementRecordOutAdd.setId(procurementRecordStorage.getId());
+// procurementRecordOutAdd.setId(procurementRecordStorage.getId());
+ procurementRecordOutAdd.setId(0);
+ procurementRecordOutAdd.setProductModelId(salesLedgerProduct.getProductModelId());
procurementRecordOutAdd.setSalesLedgerProductId((long) Math.toIntExact(salesLedgerProduct.getId()));
procurementRecordOutAdd.setType(2);
procurementRecordOutAdd.setUserId(Math.toIntExact(getUserId()));
--
Gitblit v1.9.3