From 72e7a136c8eb93b5b98ffe6b9b9004a80061ebef 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: Tue, 23 Jun 2026 11:39:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/api/service/WcsApiService.java | 2 +- .../api/service/impl/WcsApiServiceImpl.java | 68 ------------------- 2 files changed, 1 insertion(+), 69 deletions(-) diff --git a/src/main/java/com/gaotao/modules/api/service/WcsApiService.java b/src/main/java/com/gaotao/modules/api/service/WcsApiService.java index 1705593..bd0d103 100644 --- a/src/main/java/com/gaotao/modules/api/service/WcsApiService.java +++ b/src/main/java/com/gaotao/modules/api/service/WcsApiService.java @@ -15,7 +15,7 @@ public interface WcsApiService { void pushZuPanApi(PushPalletDetailDto inData); void pushNotifyToWcsApi(NotifyDataToWcs inData); - void pushAgvFeedbackToWcs(AgvFeedBackToWcs inData); + String callPallet(CallPalletRequest inData); String checkEmptyPalletType(CheckInventoryExistsRequest inData); diff --git a/src/main/java/com/gaotao/modules/api/service/impl/WcsApiServiceImpl.java b/src/main/java/com/gaotao/modules/api/service/impl/WcsApiServiceImpl.java index 31d8866..ffd609a 100644 --- a/src/main/java/com/gaotao/modules/api/service/impl/WcsApiServiceImpl.java +++ b/src/main/java/com/gaotao/modules/api/service/impl/WcsApiServiceImpl.java @@ -136,74 +136,6 @@ public class WcsApiServiceImpl implements WcsApiService { } } - @Override - public void pushAgvFeedbackToWcs(AgvFeedBackToWcs inData){ - -// 通常这个 bean 由 Spring 管理,也可以手动创建 - ObjectMapper objectMapper2 = new ObjectMapper(); - -// 将对象直接转为 Map - Map request = objectMapper2.convertValue(inData, new TypeReference>() {}); - - - Long logId = null; - String url = wcsUrl+"agv-feedback"; - String requestJson = JSONObject.toJSONString(request); - try { - // 记录接口调用日志 - - logId = interfaceCallLogService.logInterfaceCall( - "PushAgvFeedbackToWcs", - "AGV回传给WCS", - requestJson, - "55", - null, - "AGV回传给WCS" - ); - //调用wcs接口 - ObjectMapper objectMapper = new ObjectMapper(); - String jsonBody = objectMapper.writeValueAsString(request); - String ifsResponse = HttpUtils.doPost(url,jsonBody,null); - - ObjectMapper mapper = new ObjectMapper(); - JsonNode jsonNode = mapper.readTree(ifsResponse); - - int code = jsonNode.get("resCode").asInt(); - String msg = jsonNode.get("resMsg").asText(); - if(code!=200){ - throw new RuntimeException("AGV回传给WCS,错误码:"+code+",错误信息:"+msg); - } - if (logId != null) { - interfaceCallLogService.updateCallResult(logId, null, "Success", msg, null); - } - // 调用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; - - } catch (Exception e) { - // 更新接口日志错误信息 - if (logId != null) { - interfaceCallLogService.updateCallResult(logId, null, "FAILED", e.getMessage(), null); - } - ErrorLogUtils.logInterface("55", - "立库接口", - "AGV回传给WCS", - "WCS", - "agv-feedback", - inData.getPalletId(), - requestJson, - e.getMessage(),e.getMessage()); - throw new RuntimeException(e.getMessage()); - } - - }