From aec3b24ea8e16ed59eb7d9312d7f4494fc28a018 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: Thu, 25 Sep 2025 16:30:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/entity/WareHouseTransferRequest.java | 2 +- .../api/service/impl/AgvMessageServiceImpl.java | 8 ++------ .../api/service/impl/WmsMessageServiceImpl.java | 16 ++++++++-------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/gaotao/modules/api/entity/WareHouseTransferRequest.java b/src/main/java/com/gaotao/modules/api/entity/WareHouseTransferRequest.java index 26b255a..1bcf097 100644 --- a/src/main/java/com/gaotao/modules/api/entity/WareHouseTransferRequest.java +++ b/src/main/java/com/gaotao/modules/api/entity/WareHouseTransferRequest.java @@ -37,7 +37,7 @@ public class WareHouseTransferRequest { * 业务类型描述 */ private String businessType; - + private String toStation; /** * 备注 */ diff --git a/src/main/java/com/gaotao/modules/api/service/impl/AgvMessageServiceImpl.java b/src/main/java/com/gaotao/modules/api/service/impl/AgvMessageServiceImpl.java index 67d8833..5f7b828 100644 --- a/src/main/java/com/gaotao/modules/api/service/impl/AgvMessageServiceImpl.java +++ b/src/main/java/com/gaotao/modules/api/service/impl/AgvMessageServiceImpl.java @@ -163,7 +163,7 @@ public class AgvMessageServiceImpl implements AgvMessageService { transferRequest.setToLocationId(toLocationId); transferRequest.setBusinessType("AGV移库"); transferRequest.setRemark("AGV任务完成自动移库"); - + transferRequest.setToStation(transportTask.getToLocation()); // 调用移库方法 wmsMessageService.doWareHouseForPallet(transferRequest); log.info("移库操作执行成功"); @@ -191,14 +191,10 @@ public class AgvMessageServiceImpl implements AgvMessageService { if (pallet == null) { throw new RuntimeException("栈板不存在:" + transportTask.getPalletId()); } - - // 获取目标站点信息 - Map toStationInfo = getStationInfo(transportTask.getToLocation()); - String toWarehouseId = (String) toStationInfo.get("warehouseCode"); + // 更新栈板位置信息(复用doWareHouseForPallet中的逻辑) pallet.setLocationCode(transportTask.getToLocation()); - pallet.setWarehouseId(toWarehouseId); palletService.updateById(pallet); log.info("栈板{}位置已更新到目标站点{}", transportTask.getPalletId(), transportTask.getToLocation()); diff --git a/src/main/java/com/gaotao/modules/api/service/impl/WmsMessageServiceImpl.java b/src/main/java/com/gaotao/modules/api/service/impl/WmsMessageServiceImpl.java index db44e28..9ed8c01 100644 --- a/src/main/java/com/gaotao/modules/api/service/impl/WmsMessageServiceImpl.java +++ b/src/main/java/com/gaotao/modules/api/service/impl/WmsMessageServiceImpl.java @@ -138,7 +138,7 @@ public class WmsMessageServiceImpl implements WmsMessageService { request.setToLocationId(toLocationId); request.setBusinessType("立库" + inData.getTransTypeDesc()); request.setRemark("WCS立库" + inData.getTransTypeDesc() + "操作"); - + request.setToStation("*");//立库内的站点都为* // 5. 调用通用移库方法 String result = doWareHouseForPallet(request); @@ -293,14 +293,14 @@ public class WmsMessageServiceImpl implements WmsMessageService { // 11. 更新托盘位置信息 // 需要查询目标站点 - AgvStation targetStation = getAgvStationByWarehouseAndLocation( - request.getToWarehouseId(), request.getToLocationId()); - - if (targetStation != null) { - pallet.setLocationCode(targetStation.getStationCode()); - pallet.setWarehouseId(request.getToWarehouseId()); + // AgvStation targetStation = getAgvStationByWarehouseAndLocation( + // request.getToWarehouseId(), request.getToLocationId()); + //------------------------------------------------------------------- + // if (targetStation != null) { + pallet.setLocationCode(request.getToStation()); + palletService.updateById(pallet); - } + // } String result = "移库操作完成,出库事务号:" + stoTransNo + ",入库事务号:" + stiTransNo;