From 2ff46cfc9190b26a6f16565f3731f79e6c1cd446 Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Mon, 31 Jul 2023 14:14:54 +0800 Subject: [PATCH] =?UTF-8?q?rev=20=20=E5=8F=96=E6=94=BE=E8=B4=A7=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E5=8F=8D=E9=A6=88=E7=94=B5=E6=B0=94=E4=BF=A1=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agv/server/impl/ZheDaAgvServiceImpl.java | 15 +++++++-- .../LubeiConveyorDeviceDriver.java | 4 ++- .../task/service/impl/TaskServiceImpl.java | 31 ------------------- 3 files changed, 16 insertions(+), 34 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/ZheDaAgvServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/ZheDaAgvServiceImpl.java index 6d2dee6..baa6392 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/ZheDaAgvServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/ZheDaAgvServiceImpl.java @@ -245,9 +245,15 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { JSONObject response=JSONObject.parseObject(result.body()); int responseCode= response.getInteger("responseCode"); if(responseCode == 0) { - is_feedback = true; log.info("请求ZDwcs成功,取货完成 请求结果{}",responseCode); } + lubeiConveyorDeviceDriver.writing(2); + if(lubeiConveyorDeviceDriver.getTo_command() == 2){ + is_feedback = true; + } else { + lubeiConveyorDeviceDriver.writing(2); + } + } else { log.info("设备{} 请求离开,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove()); } @@ -353,9 +359,14 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService { JSONObject response=JSONObject.parseObject(result.body()); int responseCode= response.getInteger("responseCode"); if(responseCode == 0) { - is_feedback = true; log.info("请求ZDwcs成功,放货完成 请求结果{}",responseCode); } + lubeiConveyorDeviceDriver.writing(3); + if(lubeiConveyorDeviceDriver.getTo_command() == 3){ + is_feedback = true; + } else { + lubeiConveyorDeviceDriver.writing(3); + } } else { log.info("设备{} 请求离开,光电信号:{}",addressdevice,lubeiConveyorDeviceDriver.getMove()); } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/lubei_conveyor/LubeiConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/lubei_conveyor/LubeiConveyorDeviceDriver.java index 818505b..85c9c64 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/lubei_conveyor/LubeiConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/lubei_conveyor/LubeiConveyorDeviceDriver.java @@ -71,6 +71,8 @@ public class LubeiConveyorDeviceDriver extends AbstractOpcDeviceDriver implement int move = 0; int task = 0; int action=0; + int to_command = 0; + int last_to_command = 0; int last_mode = 0; int last_error = 0; int last_move = 0; @@ -144,7 +146,7 @@ public class LubeiConveyorDeviceDriver extends AbstractOpcDeviceDriver implement task = this.itemProtocol.getTask(); hasGoods = this.itemProtocol.getMove(); action =this.itemProtocol.getaction(); - + to_command = this.itemProtocol.getToCommand(); if (mode != last_mode) { this.setRequireSucess(false); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java index 637f8fa..e100117 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java @@ -700,37 +700,6 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { if (StrUtil.equals(dto.getTask_status(), "0") || StrUtil.equals(dto.getTask_status(), "1")) { tasks.add(dto); } - // 判断是否为WMS下发的任务,如果是反馈任务状态给WMS - String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue(); - String Type1=entity.getTask_type(); - if(StrUtil.equals(Type1,"定点任务")){ - JSONObject jo = new JSONObject(); - jo.put("taskCode",entity.getTask_code()); - jo.put("carId",""); - jo.put("taskType ",entity.getTask_type()); - jo.put("feedbackStatus","taking"); - log.info("请求参数:{}",jo); - HttpResponse result= acsToWmsZDService.taskFeedback(jo); - JSONObject response=JSONObject.parseObject(result.body()); - int responseCode= response.getInteger("responseCode"); - if(responseCode == 0) { - log.info("请求ZDwcs成功,申请取货 请求结果{}",responseCode); - } - } - if (!StrUtil.startWith(dto.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) { - JSONObject jo = new JSONObject(); - jo.put("taskCode",entity.getTask_code()); - jo.put("carId",""); - jo.put("taskType ",entity.getTask_type()); - jo.put("feedbackStatus","taking"); - log.info("请求参数:{}",jo); - HttpResponse result= acsToWmsZDService.taskFeedback(jo); - JSONObject response=JSONObject.parseObject(result.body()); - int responseCode= response.getInteger("responseCode"); - if(responseCode == 0) { - log.info("请求ZDwcs成功,申请取货 请求结果{}",responseCode); - } - } }