From 851af57dc2956f94b9598c3034f4fe8b1c3bf878 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: Sat, 25 Oct 2025 15:47:31 +0800 Subject: [PATCH] gx --- .../gaotao/common/utils/AgvClientUtil.java | 25 ++++++++----------- .../impl/WcsIntegrationServiceImpl.java | 10 +++++--- .../task/WcsTaskScheduler.java | 6 ++--- .../impl/InventoryMoveServiceImpl.java | 5 +++- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/gaotao/common/utils/AgvClientUtil.java b/src/main/java/com/gaotao/common/utils/AgvClientUtil.java index d300c86..2b85b48 100644 --- a/src/main/java/com/gaotao/common/utils/AgvClientUtil.java +++ b/src/main/java/com/gaotao/common/utils/AgvClientUtil.java @@ -108,13 +108,13 @@ public class AgvClientUtil { // 调用AGV接口 // ResponseData response = HttpClientUtil.doPostByRaw(url, request); // - // // 更新接口日志结果 - // if (logId != null) { - // String responseJson = response != null ? JSONObject.toJSONString(response) : "null"; - // interfaceCallLogService.updateCallResult(logId, responseJson, "SUCCESS", null, null); - // } - // - // return response; + // 更新接口日志结果 + if (logId != null) { + String responseJson = msg != null ? msg: "null"; + interfaceCallLogService.updateCallResult(logId, responseJson, "SUCCESS", null, null); + } + + } catch (Exception e) { // 更新接口日志错误信息 @@ -158,13 +158,10 @@ public class AgvClientUtil { // 调用AGV接口 // ResponseData response = HttpClientUtil.doPostByRaw(url, request); // - // // 更新接口日志结果 - // if (logId != null) { - // String responseJson = response != null ? JSONObject.toJSONString(response) : "null"; - // interfaceCallLogService.updateCallResult(logId, responseJson, "SUCCESS", null, null); - // } - // - // return response; + if (logId != null) { + String responseJson = msg != null ? msg: "null"; + interfaceCallLogService.updateCallResult(logId, responseJson, "SUCCESS", null, null); + } } catch (Exception e) { // 更新接口日志错误信息 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 2bde4bb..d1c5f6d 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 @@ -428,6 +428,8 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { //初始化的时候用 一开始栈板是没有位置的 按照第一个入栈的标签来给虚拟位置 后期不需要处理 if("TEMP".equals(labelWarehouseId)){ wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "TEMP"); + }else if("AS".equals(labelLocationId)){ + wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "Virtual_AS"); }else if("W01".equals(labelWarehouseId)){ wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "W01"); }else if("L01".equals(labelWarehouseId)){ @@ -436,8 +438,6 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "Q01"); }else if("W02".equals(labelWarehouseId)){ wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "W02"); - }else if("AS".equals(labelLocationId)){ - wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "Virtual_AS"); }else { throw new Exception("栈板不在运输点位,无法进行打托操作"); } @@ -1883,7 +1883,6 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { if (palletInfo == null) { throw new RuntimeException("栈板不存在"); } - // 生成入库任务编号 - rqrq TransNoControl transData = transNoService.getTransNo(site, "WOT", 10); Date currentTime = new Date(); @@ -1941,6 +1940,11 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { scheduleDeliveryTask.setToArea("Z103"); scheduleDeliveryTask.setUsername(currentUser.getUsername()); autoTaskService.scheduleDeliveryTask(scheduleDeliveryTask); + }else { + Pallet pallet = wcsIntegrationMapper.getPalletByCode(site, palletId); + if (pallet.getLocationCode()== null||pallet.getLocationCode().isEmpty()) { + pallet.setLocationCode("Virtual_AS"); + } } // 调用空托盘推送方法(只推送托盘数据,cargoInfos为null)- rqrq pushEmptyPalletDetail(site, palletId, orderTask.getTaskNo(), orderTask.getItemNo()); diff --git a/src/main/java/com/gaotao/modules/automatedWarehouse/task/WcsTaskScheduler.java b/src/main/java/com/gaotao/modules/automatedWarehouse/task/WcsTaskScheduler.java index 2a5dc72..a096a42 100644 --- a/src/main/java/com/gaotao/modules/automatedWarehouse/task/WcsTaskScheduler.java +++ b/src/main/java/com/gaotao/modules/automatedWarehouse/task/WcsTaskScheduler.java @@ -52,9 +52,9 @@ public class WcsTaskScheduler { @Scheduled(cron = "5/10 * * * * ?") public void scheduleWcsTaskProcessing() { // 检查定时任务开关 - if (!enabled) { - return; - } + // if (!enabled) { + // return; + // } log.info("=== 开始处理WCS入库/出库相关业务 ==="); diff --git a/src/main/java/com/gaotao/modules/other/service/impl/InventoryMoveServiceImpl.java b/src/main/java/com/gaotao/modules/other/service/impl/InventoryMoveServiceImpl.java index 0fd8d17..5efe5a9 100644 --- a/src/main/java/com/gaotao/modules/other/service/impl/InventoryMoveServiceImpl.java +++ b/src/main/java/com/gaotao/modules/other/service/impl/InventoryMoveServiceImpl.java @@ -492,7 +492,10 @@ public class InventoryMoveServiceImpl implements InventoryMoveService { params.put("locationNo", group.sourceLocationNo); // 原库位 params.put("destLocationNo", group.destLocationNo); // 目标库位 params.put("lotBatchNo", group.lotBatchNo); - + if(group.sourceLocationNo.equals(group.destLocationNo)){ + log.info("此物料ifs中没有库位变更,跳过-----"+group.partNo+group.lotBatchNo); + return; + } // 添加过期日期参数 if (group.expiredDate != null) { params.put("expiryDate", new SimpleDateFormat("yyyy-MM-dd").format(group.expiredDate));