自动分配添加仓库查询;

This commit is contained in:
王奎兴
2026-02-25 13:48:16 +08:00
parent a42c2fde3f
commit b8732e7139
2 changed files with 2 additions and 1 deletions
@@ -609,10 +609,12 @@ public class StockOutOrderApplicationService {
String sheetRefNo = detail.getSheetRefNo();
String boxPalletNo = detail.getBoxPalletNo();
Long materialBaseInfoId = detail.getMaterialBaseInfoId();
Long warehouseId = detail.getWarehouseId();
List<MaterialInventory> materialInventories = materialInventoryMapper.selectList(new QueryWrapper<MaterialInventory>().lambda()
.eq(MaterialInventory::getBatchRefNo, batchRefNo)
.eq(MaterialInventory::getSheetRefNo, sheetRefNo)
.eq(MaterialInventory::getBoxPalletNo, boxPalletNo)
.eq(MaterialInventory::getWarehouseId, warehouseId)
.eq(MaterialInventory::getMaterialBaseInfoId, materialBaseInfoId));
if (materialInventories == null || materialInventories.isEmpty()) {
throw new ServiceException("库存不存在:" + batchRefNo + " " + sheetRefNo + " " + boxPalletNo);
@@ -302,7 +302,6 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
//分配(修改库存)
xgkc(outMaterialDetailList,outOrderNumber,loginUser);
//保存物料明细信息
//给MaterialDetailList中的每一项的isAllocated赋值为1
outMaterialDetailList.forEach(outMaterialDetail -> {
outMaterialDetail.setIsAllocated("1");
});