From 5958047737ebeaf5c52b8ba16c79ddac992eafeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E4=BF=8A=E6=9D=B0?= <9463626+zhou-junjiezjj@user.noreply.gitee.com> Date: Sat, 9 Sep 2023 14:07:40 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=B7=B7=E6=96=99=E5=8C=BA=E6=9D=A1?= =?UTF-8?q?=E7=A0=81=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lnsh/lnsh_station/LnshStationDeviceDriver.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java index 357aaa6..5fc5fdc 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java @@ -605,9 +605,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements if (resp.getCode() == 200) { this.writing(200); this.setRequireSucess(true); + message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求成功" + resp.getMessage(); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(resp))); } else { this.writing(400); - message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求失败" + resp.getMessage();; + message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求失败" + resp.getMessage(); + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(resp))); } return true; } else { @@ -656,7 +659,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements * @param */ public synchronized boolean apply_take_full_vehicle() { - if(move > 0) { + if(move > 0&& barcode>0) { ApplyTaskRequest request = new ApplyTaskRequest(); request.setDevice_code(this.getDevice_code()); request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName()); @@ -689,11 +692,14 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(resp))); } return true; - } else { + } else if(move==0) { message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 设备无货未请求LMS..."; lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message)); - return false; + }else if(barcode<=0){ + message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 设备条码不正确未请求LMS..."; + lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message)); } + return false; } /**