From 4c49f69aa57535b9bb81ec0434f9bcc255d1d475 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: Mon, 26 Jan 2026 14:58:07 +0800 Subject: [PATCH] =?UTF-8?q?agv=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gaotao/common/utils/AgvClientUtil.java | 50 ++++++++++++++++--- .../impl/WcsIntegrationServiceImpl.java | 9 ++++ 2 files changed, 53 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gaotao/common/utils/AgvClientUtil.java b/src/main/java/com/gaotao/common/utils/AgvClientUtil.java index 2b85b48..93eb19f 100644 --- a/src/main/java/com/gaotao/common/utils/AgvClientUtil.java +++ b/src/main/java/com/gaotao/common/utils/AgvClientUtil.java @@ -82,9 +82,9 @@ public class AgvClientUtil { } Long logId = null; + String requestJson = JSONObject.toJSONString(request); try { // 记录接口调用日志 - String requestJson = JSONObject.toJSONString(request); logId = interfaceCallLogService.logInterfaceCall( "AgvClientUtil", "createTask", @@ -121,6 +121,14 @@ public class AgvClientUtil { if (logId != null) { interfaceCallLogService.updateCallResult(logId, null, "FAILED", e.getMessage(), null); } + ErrorLogUtils.logInterface("55", + "AGV接口", + "下达AGV任务", + "AGV", + "/rpc/createTask", + taskId, + requestJson, + e.getMessage(),e.getMessage()); throw new RuntimeException(e.getMessage()); } } @@ -129,12 +137,11 @@ public class AgvClientUtil { Map request = new HashMap<>(); request.put("taskId", taskId); request.put("target", target); - + String requestJson = JSONObject.toJSONString(request); Long logId = null; try { // 记录接口调用日志 - String requestJson = JSONObject.toJSONString(request); logId = interfaceCallLogService.logInterfaceCall( "AgvClientUtil", "modifyPutPoint", @@ -168,6 +175,14 @@ public class AgvClientUtil { if (logId != null) { interfaceCallLogService.updateCallResult(logId, null, "FAILED", e.getMessage(), null); } + ErrorLogUtils.logInterface("55", + "AGV接口", + "修改AGV任务目标点", + "AGV", + "/rpc/modifyPutPoint", + taskId, + requestJson, + e.getMessage(),e.getMessage()); throw new RuntimeException(e.getMessage()); } } @@ -179,11 +194,10 @@ public class AgvClientUtil { String url = agvUrl + "/rpc/continueTask"; Map request = new HashMap<>(); request.put("taskId", taskId); - + String requestJson = JSONObject.toJSONString(request); Long logId = null; try { // 记录接口调用日志 - String requestJson = JSONObject.toJSONString(request); logId = interfaceCallLogService.logInterfaceCall( "AgvClientUtil", "continueTask", @@ -210,6 +224,14 @@ public class AgvClientUtil { if (logId != null) { interfaceCallLogService.updateCallResult(logId, null, "FAILED", e.getMessage(), null); } + ErrorLogUtils.logInterface("55", + "AGV接口", + "AGV继续任务", + "AGV", + "/rpc/continueTask", + taskId, + requestJson, + e.getMessage(),e.getMessage()); throw new RuntimeException(e.getMessage()); } } @@ -224,9 +246,9 @@ public class AgvClientUtil { request.put("taskId", taskId); Long logId = null; + String requestJson = JSONObject.toJSONString(request); try { // 记录接口调用日志 - String requestJson = JSONObject.toJSONString(request); logId = interfaceCallLogService.logInterfaceCall( "AgvClientUtil", "cancelTask", @@ -253,6 +275,14 @@ public class AgvClientUtil { if (logId != null) { interfaceCallLogService.updateCallResult(logId, null, "FAILED", e.getMessage(), null); } + ErrorLogUtils.logInterface("55", + "AGV接口", + "AGV取消任务", + "AGV", + "/rpc/cancelTask", + taskId, + requestJson, + e.getMessage(),e.getMessage()); throw new RuntimeException(e.getMessage()); } } @@ -322,6 +352,14 @@ public class AgvClientUtil { // 返回数据部分 return jsonNode.get("data"); } catch (Exception e) { + ErrorLogUtils.logInterface("55", + "AGV接口", + "获取在线小车状态", + "AGV", + "/rpc/getOnlineRobot", + "", + "", + e.getMessage(),e.getMessage()); throw new RuntimeException(e.getMessage()); } } 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 a1a7040..1c4e070 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 @@ -2,6 +2,7 @@ package com.gaotao.modules.automatedWarehouse.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.gaotao.common.utils.CountModeChecker; +import com.gaotao.common.utils.ErrorLogUtils; import com.gaotao.modules.api.apiData.CheckInventoryExistsRequest; import com.gaotao.modules.api.entity.*; import com.gaotao.modules.api.service.WcsApiService; @@ -2857,6 +2858,14 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { log.error("获取WCS分拣明细失败", e); logStatus = "ERROR"; errorMsg = e.getMessage(); + ErrorLogUtils.logInterface(site, + "立库接口", + "查询手工分拣清单", + "WCS", + "query-auto-sorting-info", + devCode, + jsonBody, + e.getMessage(),e.getMessage()); // 失败时返回空列表,不抛异常 - rqrq } finally { // rqrq - 记录接口调用日志(调用后只保存1次)