From ac809deac47603fb874f6b245d3721562fc97072 Mon Sep 17 00:00:00 2001 From: yanps Date: Thu, 21 Dec 2023 21:57:37 +0800 Subject: [PATCH] rev --- .../CasingStationConveyorDeviceDriver.java | 4 ++-- .../IndoorManipulatorDeviceDriver.java | 6 +----- .../PluggingUnpluggingMachineDeviceDriver.java | 8 ++++---- .../acs/ext/wms/service/impl/AcsToWmsServiceImpl.java | 11 +++++++++-- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java index 8594c266a..0caea7515 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java @@ -295,7 +295,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i map.put("to_command", 5); this.writing(map); requireSucess = true; - logServer.deviceExecuteLog(this.device_code, "", "", "申请出纸管,返回参数:" + applyManipulatorActionResponse); + logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴完成反馈完成,返回参数:" + applyManipulatorActionResponse); message = "套轴完成成功"; } else { message = applyManipulatorActionResponse.getMessage(); @@ -304,7 +304,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i this.writing(map); requireSucess = true; message = "套轴失败"; - logServer.deviceExecuteLog(this.device_code, "", "", "申请出纸管,返回参数:" + applyManipulatorActionResponse); + logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴失败,返回参数:" + applyManipulatorActionResponse); } } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java index 17c5cf1ba..8608eef02 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/indoor_manipulator/IndoorManipulatorDeviceDriver.java @@ -449,11 +449,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple feedbackSucess = true; message = "反馈尺寸LMS成功..."; logServer.deviceExecuteLog(this.device_code, "", "", "反馈尺寸成请求成功,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse)); - String is_bushing = task.getIs_bushing(); - String version = task.getVersion(); - String bushing_num = task.getBushing_num(); Map map = new LinkedHashMap<>(); - map.put("inflatableShaftVersion", Integer.parseInt(version)); map.put("to_command", 2); this.writing(map); } else { @@ -484,7 +480,7 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple message = "申请新取货点成功"; } else { feedbackSucess = false; - message = "申请放货点LMS失败," + String.valueOf(applyManipulatorActionResponse); + message = "申请放货点LMS失败," + String.valueOf(applyManipulatorActionResponse.getMessage()); logServer.deviceExecuteLog(this.device_code, "", "", "反馈尺寸成请求失败,响应参数:" + JSON.toJSONString(applyManipulatorActionResponse)); } } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plugging_unplugging_machine/PluggingUnpluggingMachineDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plugging_unplugging_machine/PluggingUnpluggingMachineDeviceDriver.java index c14bb0013..515e1ad4d 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plugging_unplugging_machine/PluggingUnpluggingMachineDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/plugging_unplugging_machine/PluggingUnpluggingMachineDeviceDriver.java @@ -214,7 +214,7 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv map.put("to_command", 5); this.writing(map); requireSucess = true; - logServer.deviceExecuteLog(this.device_code, "", "", "申请出纸管,返回参数:" + applyManipulatorActionResponse); + logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴反馈完成,返回参数:" + applyManipulatorActionResponse); message = "套轴完成成功"; }else{ message = applyManipulatorActionResponse.getMessage(); @@ -223,7 +223,7 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv this.writing(map); requireSucess = true; message = "套轴失败"; - logServer.deviceExecuteLog(this.device_code, "", "", "申请出纸管,返回参数:" + applyManipulatorActionResponse); + logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴反馈失败,返回参数:" + applyManipulatorActionResponse); } } @@ -245,7 +245,7 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv map.put("to_command", 4); this.writing(map); requireSucess = true; - logServer.deviceExecuteLog(this.device_code, "", "", "申请出纸管,返回参数:" + applyManipulatorActionResponse); + logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴成功,返回参数:" + applyManipulatorActionResponse); message = "套轴申请成功"; }else { message = applyManipulatorActionResponse.getMessage(); @@ -254,7 +254,7 @@ public class PluggingUnpluggingMachineDeviceDriver extends AbstractOpcDeviceDriv this.writing(map); requireSucess = true; message = "申请失败"; - logServer.deviceExecuteLog(this.device_code, "", "", "申请出纸管,返回参数:" + applyManipulatorActionResponse); + logServer.deviceExecuteLog(this.device_code, "", "", "申请套轴失败,返回参数:" + applyManipulatorActionResponse); } } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java index a8b5c7019..364b5c542 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java @@ -23,6 +23,7 @@ import org.nl.acs.task.service.dto.TaskDto; import org.nl.modules.system.service.ParamService; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import java.util.concurrent.CompletableFuture; @@ -97,6 +98,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { } @Override +// @Async public HttpResponse feedbackTaskStatusToWms(JSONArray data) { try { @@ -619,16 +621,20 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { public HttpResponse shipDeviceUpdate(JSONObject param) { try { MDC.put(log_file_type, log_type); -// log.info("shipDeviceUpdate-----输入参数{}", param); + log.info("shipDeviceUpdate-----输入参数{}", param); if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) { String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue(); AddressDto addressDto = addressService.findByCode("shipDeviceUpdate"); String methods_url = addressDto.getMethods_url(); String url = wmsUrl + methods_url; - return HttpRequest + + HttpResponse resp = HttpRequest .post(url) .body(param.toString()) .execute(); + log.info("shipDeviceUpdate-----返回参数{}", resp.body()); + + return resp; } } catch (Throwable ignored) { @@ -662,6 +668,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { } @Override +// @Async public void sendDeviceStatus(JSONObject param) { try { MDC.put(log_file_type, log_type);