From 315f4d427e150c2067a219ef866e04610b583a37 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: Fri, 10 Oct 2025 16:18:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/WcsIntegrationMapper.java | 1 + .../service/impl/WcsIntegrationServiceImpl.java | 11 +++++++++-- .../automatedWarehouse/WcsIntegrationMapper.xml | 6 ++++++ 3 files changed, 16 insertions(+), 2 deletions(-) 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 fe06f52..b053ee3 100644 --- a/src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java +++ b/src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java @@ -96,6 +96,7 @@ public interface WcsIntegrationMapper { List getOccupiedLayersExcludeSerial(@Param("site") String site, @Param("palletId") String palletId, @Param("position") String position, @Param("excludeSerialNo") String excludeSerialNo); + void updatePalletLocationCode(@Param("site") String site, @Param("palletId") String palletId, @Param("newLocationCode") String newLocationCode); /** * 更新栈板明细位置 - 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 084130f..6924691 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 @@ -408,7 +408,7 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { String inStockFlag = (String) labelInfo.get("inStockFlag"); String labelWarehouseId = (String) labelInfo.get("warehouseId"); - + String labelLocationId = (String) labelInfo.get("locationId"); if (!"Y".equals(inStockFlag)) { throw new Exception("标签不在库状态"); } @@ -416,7 +416,14 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { // 获取栈板当前所在站点 AgvStation nowStation = wcsIntegrationMapper.getNowStation(site, palletId); if (nowStation == null) { - throw new Exception("栈板不在运输点位,无法进行打托操作"); + + if("Temp".equals(labelWarehouseId)){ + wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "Temp"); + }else if("AS".equals(labelLocationId)){ + wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "Virtual_AS"); + }else { + throw new Exception("栈板不在运输点位,无法进行打托操作"); + } } // 校验栈板和物料的仓库是否一致(栈板的仓库通过location_code关联agv_station获取warehouse_code) diff --git a/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml b/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml index 0ded2b0..378c459 100644 --- a/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml +++ b/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml @@ -228,6 +228,12 @@ AND serial_no != #{excludeSerialNo} ORDER BY layer + + update pallet + set location_code = #{newLocationCode} + where site = #{site} + and pallet_id = #{palletId} +