From 873ae0982569ef10899cdd265d6e8b755d41b3b1 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 01 六月 2026 13:02:33 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_新疆马铃薯pro' into dev_新疆马铃薯pro
---
src/main/java/com/ruoyi/stock/service/impl/StockInventoryServiceImpl.java | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/ruoyi/stock/service/impl/StockInventoryServiceImpl.java b/src/main/java/com/ruoyi/stock/service/impl/StockInventoryServiceImpl.java
index a45359f..fa76bc7 100644
--- a/src/main/java/com/ruoyi/stock/service/impl/StockInventoryServiceImpl.java
+++ b/src/main/java/com/ruoyi/stock/service/impl/StockInventoryServiceImpl.java
@@ -14,6 +14,7 @@
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.domain.R;
+import com.ruoyi.project.system.service.ISysDictDataService;
import com.ruoyi.sales.mapper.SalesLedgerProductMapper;
import com.ruoyi.sales.pojo.SalesLedgerProduct;
import com.ruoyi.stock.dto.StockInRecordDto;
@@ -60,6 +61,7 @@
private final StockUninventoryService stockUninventoryService;
private final SalesLedgerProductMapper salesLedgerProductMapper;
private final ProductModelMapper productModelMapper;
+ private final ISysDictDataService sysDictDataService;
@Override
public IPage<StockInventoryDto> pagestockInventory(Page page, StockInventoryDto stockInventoryDto) {
@@ -171,6 +173,7 @@
stockInRecordDto.setRemark(stockInventoryDto.getRemark());
stockInRecordDto.setWarnNum(stockInventoryDto.getWarnNum());
stockInRecordDto.setCreateTime(stockInventoryDto.getCreateTime());
+ stockInRecordDto.setWarehouse(stockInventoryDto.getWarehouse());
stockInRecordService.add(stockInRecordDto);
return true;
}
@@ -315,6 +318,14 @@
int successCount = 0;
for (StockInventoryExportData dto : list) {
+ // 楠岃瘉浠撳簱鏄惁瀛樺湪浜庡瓧鍏镐腑
+ if (StringUtils.isNotEmpty(dto.getWarehouse())) {
+ String warehouseLabel = sysDictDataService.selectDictLabel("warehouse", dto.getWarehouse());
+ if (StringUtils.isEmpty(warehouseLabel)) {
+ throw new RuntimeException("浠撳簱鍊� " + dto.getWarehouse() + " 涓嶅瓨鍦ㄤ簬瀛楀吀涓�");
+ }
+ }
+
// 鏋勫缓鏌ユ壘閿�
String key = dto.getProductName() + "|" + dto.getModel();
SalesLedgerProduct matchedProduct = productMap.get(key);
@@ -328,6 +339,7 @@
stockInventoryDto.setQualitity(dto.getQualifiedQuantity());
stockInventoryDto.setRemark(dto.getRemark());
stockInventoryDto.setWarnNum(dto.getWarnNum());
+ stockInventoryDto.setWarehouse(dto.getWarehouse());
// 楠岃瘉鍚堟牸鍐荤粨鏁伴噺
if (ObjectUtils.isNotEmpty(dto.getQualifiedLockedQuantity())) {
@@ -351,6 +363,7 @@
stockUninventoryDto.setRecordType(StockInQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_IN.getCode());
stockUninventoryDto.setQualitity(dto.getUnQualifiedQuantity());
stockUninventoryDto.setRemark(dto.getRemark());
+ stockUninventoryDto.setWarehouse(dto.getWarehouse());
// 楠岃瘉涓嶅悎鏍煎喕缁撴暟閲�
if (ObjectUtils.isNotEmpty(dto.getUnQualifiedLockedQuantity())) {
--
Gitblit v1.9.3