From c22d1a652d09fcd5f32f9fef244677df21ee0c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Tue, 9 Dec 2025 10:00:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E4=BD=8D=E7=BB=84=E7=9B=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WcsIntegrationServiceImpl.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java b/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java index 7482ecc..495c3a5 100644 --- a/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java +++ b/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java @@ -22,6 +22,7 @@ import com.gaotao.modules.warehouse.service.HandlingUnitOperationLogService; import com.gaotao.modules.warehouse.service.PalletOperationLogService; import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; @@ -36,6 +37,8 @@ import lombok.extern.slf4j.Slf4j; @Slf4j @Service public class WcsIntegrationServiceImpl implements WcsIntegrationService { + @Value("${custom.warehouse-error-location:1101}") + private String warehouseErrorLocation; @Autowired private WcsIntegrationMapper wcsIntegrationMapper; @Autowired @@ -1331,12 +1334,15 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { if(newDetail.isEmpty()){ throw new Exception("空栈板无法组托!"); } - newDetail.stream() - .filter(detail -> "Y".equals(detail.getReserveFlag())) - .findFirst() - .ifPresent(detail -> { - throw new RuntimeException("标签{" + detail.getSerialNo() + "}已经被预留"); - }); + //---异常区不校验直接组盘是否被预留---!! 如果检验可能会导致单据无法继续 + if(!warehouseErrorLocation.equals(locationCode)){ + newDetail.stream() + .filter(detail -> "Y".equals(detail.getReserveFlag())) + .findFirst() + .ifPresent(detail -> { + throw new RuntimeException("标签{" + detail.getSerialNo() + "}已经被预留"); + }); + } // 生成入库任务编号 TransNoControl transData2 = transNoService.getTransNo(site, "WOT", 10); Date currentTime = new Date();