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} +