fix(controller): 修正库存筛选及设置库位位置

- 修正库存筛选条件中物料编号匹配的错误,改用二维码主表的物料编码进行匹配
- 添加设置库存DTO中的库位字段,确保库位信息正确传递
- 优化库存数据处理逻辑,提升准确性和规范性
This commit is contained in:
曹鹏飞 2026-05-13 16:55:28 +08:00
parent cf746ceb00
commit af1a0f53aa
1 changed files with 2 additions and 1 deletions

View File

@ -474,7 +474,7 @@ public class NormalPGIController extends BaseController {
.forEach(qrCodeMaster -> {
// 库存
InventoryInDTO inventoryDTO = inventories.stream()
.filter(inventoriesDTO -> inventoriesDTO.getMaterialNo().equals(item.getItemCode())
.filter(inventoriesDTO -> inventoriesDTO.getMaterialNo().equals(qrCodeMaster.getMaterialCode())
&& inventoriesDTO.getBatchNo().equals(qrCodeMaster.getBatchNo())
&& inventoriesDTO.getSerialNo().equals(qrCodeMaster.getSerialNo())
&& inventoriesDTO.getFactoryNo().equals(qrCodeMaster.getFactoryCode())
@ -489,6 +489,7 @@ public class NormalPGIController extends BaseController {
.setWarehouseNo(qrCodeMaster.getStorageLocation())
.setBatchNo(qrCodeMaster.getBatchNo())
.setSerialNo(qrCodeMaster.getSerialNo())
.setBinLocation(qrCodeMaster.getBinLocation())
.setNum(qrCodeMaster.getQuantity());
inventories.add(inventoryDTO);
} else {