From 1d6120ca20b086dff4ebe5ec99c8ee5bcd7ea29d Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Fri, 16 Oct 2026 16:23:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89InventoryStock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/OtherOutboundServiceImpl.java | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/main/java/com/gaotao/modules/other/service/impl/OtherOutboundServiceImpl.java b/src/main/java/com/gaotao/modules/other/service/impl/OtherOutboundServiceImpl.java index a175aa52..168497a1 100644 --- a/src/main/java/com/gaotao/modules/other/service/impl/OtherOutboundServiceImpl.java +++ b/src/main/java/com/gaotao/modules/other/service/impl/OtherOutboundServiceImpl.java @@ -53,9 +53,6 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { @Autowired private HandlingUnitService handlingUnitService; - @Autowired - private InventoryStockService inventoryStockService; - @Autowired private IfsApiIssueAndReturnService ifsApiIssueAndReturnService; @@ -69,7 +66,7 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { List handlingUnits = validateHandlingUnits(dto); // 2. 验证库存是否足够 - validateInventoryStock(handlingUnits); + //validateInventoryStock(handlingUnits); // 3. 构建OtherOutboundTransRequestDto OtherOutboundTransRequestDto transRequest = buildOtherOutboundTransRequest(dto, currentUser); @@ -177,31 +174,6 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { return handlingUnits; } - /** - * 验证库存是否足够 - */ - private void validateInventoryStock(List handlingUnits) { - for (HandlingUnit hu : handlingUnits) { - // 查询当前库存 - InventoryStock stock = inventoryStockService.lambdaQuery() - .eq(InventoryStock::getSite, hu.getSite()) - .eq(InventoryStock::getWarehouseId, hu.getWarehouseId()) - .eq(InventoryStock::getPartNo, hu.getPartNo()) - .eq(InventoryStock::getBatchNo, hu.getBatchNo()) - .eq(InventoryStock::getLocationId, hu.getLocationId()) - .one(); - - if (stock == null) { - throw new XJException("库存不存在,无法出库: " + hu.getPartNo() + " 批次:" + hu.getBatchNo()); - } - - // 检查库存数量是否足够 - if (stock.getQtyOnHand().compareTo(hu.getQty()) < 0) { - throw new XJException("库存不足,无法出库: " + hu.getPartNo() + - " 当前库存:" + stock.getQtyOnHand() + " 需要出库:" + hu.getQty()); - } - } - } /** * 构建OtherOutboundTransRequestDto