From 802796c22d7d21a6d572cd4c11844e6865521666 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期一, 22 六月 2026 11:53:05 +0800
Subject: [PATCH] 新增库存,采购入库关联供应商,外协入库关联厂家
---
src/main/java/com/ruoyi/stock/service/impl/StockInRecordServiceImpl.java | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/ruoyi/stock/service/impl/StockInRecordServiceImpl.java b/src/main/java/com/ruoyi/stock/service/impl/StockInRecordServiceImpl.java
index 6c7722e..e6fb860 100644
--- a/src/main/java/com/ruoyi/stock/service/impl/StockInRecordServiceImpl.java
+++ b/src/main/java/com/ruoyi/stock/service/impl/StockInRecordServiceImpl.java
@@ -281,8 +281,12 @@
setBatchNo(stockInRecord.getBatchNo());
setRemark(stockInRecord.getRemark());
setWarnNum(stockInRecord.getWarnNum());
- setManufacturerId(stockInRecord.getManufacturerId());
setSource(stockInRecord.getSource());
+ if (StockInventorySourceEnum.PURCHASE_RECEIPT.getCode().equals(stockInRecord.getSource())) {
+ setSupplierId(stockInRecord.getSupplierId());
+ } else if (StockInventorySourceEnum.OUTSOURCED_RECEIPT.getCode().equals(stockInRecord.getSource())) {
+ setManufacturerId(stockInRecord.getManufacturerId());
+ }
setVersion(1);
}});
} else {
@@ -297,7 +301,6 @@
stockUninventoryDto.setBatchNo(stockInRecord.getBatchNo());
stockUninventoryDto.setQualitity(finalStockInNum);
stockUninventoryDto.setRemark(stockInRecord.getRemark());
- stockUninventoryDto.setManufacturerId(stockInRecord.getManufacturerId());
stockUninventoryDto.setSource(stockInRecord.getSource());
stockUninventoryDto.setType(uninventoryType);
if (stockUninventory == null) {
@@ -307,7 +310,6 @@
setBatchNo(stockInRecord.getBatchNo());
setType(uninventoryType);
setRemark(stockInRecord.getRemark());
- setManufacturerId(stockInRecord.getManufacturerId());
setSource(stockInRecord.getSource());
setVersion(1);
}});
@@ -355,8 +357,12 @@
stockInventoryDto.setBatchNo(stockInRecord.getBatchNo());
stockInventoryDto.setQualitity(stockInRecord.getStockInNum());
stockInventoryDto.setRemark(stockInRecord.getRemark());
- stockInventoryDto.setManufacturerId(stockInRecord.getManufacturerId());
stockInventoryDto.setSource(stockInRecord.getSource());
+ if (StockInventorySourceEnum.PURCHASE_RECEIPT.getCode().equals(stockInRecord.getSource())) {
+ stockInventoryDto.setSupplierId(stockInRecord.getSupplierId());
+ } else if (StockInventorySourceEnum.OUTSOURCED_RECEIPT.getCode().equals(stockInRecord.getSource())) {
+ stockInventoryDto.setManufacturerId(stockInRecord.getManufacturerId());
+ }
return stockInventoryDto;
}
--
Gitblit v1.9.3