diff --git a/src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java b/src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java index 536ce6e..4ffa31c 100644 --- a/src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java +++ b/src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java @@ -124,6 +124,19 @@ public interface WcsIntegrationMapper { void deletePalletDetail(@Param("site") String site, @Param("palletId") String palletId, @Param("serialNo") String serialNo); + /** + * @Description 检查上层是否有标签 - rqrq + * @param site 工厂编码 + * @param palletId 栈板编码 + * @param position 位置 + * @param layer 当前层数 + * @return 上层标签数量 + * @author rqrq + * @date 2025/11/22 + */ + Integer checkUpperLayerLabels(@Param("site") String site, @Param("palletId") String palletId, + @Param("position") String position, @Param("layer") Integer layer); + /** * 根据条码删除栈板明细(不指定栈板ID,用于从任何栈板中移除条码) - AI制作 */ 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 7dea405..f946964 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 @@ -560,6 +560,14 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { throw new Exception("该条码不在此栈板上"); } + // 检查上层是否有标签 - rqrq + String position = (String) existingPalletInfo.get("position"); + Integer layer = Integer.valueOf(existingPalletInfo.get("layer").toString()); + Integer upperLayerCount = wcsIntegrationMapper.checkUpperLayerLabels(site, palletId, position, layer); + if (upperLayerCount != null && upperLayerCount > 0) { + throw new Exception("该标签上层(位置:" + position + ",第" + (layer + 1) + "层及以上)还有标签,请先移走上层标签"); + } + String username = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername(); wcsIntegrationMapper.deletePalletDetail(site, palletId, serialNo); @@ -2309,6 +2317,9 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { throw new RuntimeException("目标区域不能为空"); } + //1.5 判断下 如果同一个区域已经有3个未完成的call料单据 那么就不让下达新的 + + // 2. 确定目标站点(自动分配或指定站点)- rqrq String finalTargetStation = targetStation; if (finalTargetStation == null || finalTargetStation.trim().isEmpty()) {