From 33f10cad629124c0c9e0487aab23900793e0781f 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: Thu, 14 Sep 2023 10:55:42 +0800 Subject: [PATCH] =?UTF-8?q?add=20lmstoACS=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agv/ndcone/AgvNdcOneDeviceDriver.java | 4 +++ .../ConveyorBarcodeDeviceDriver.java | 1 + .../wms/service/impl/WmsToAcsServiceImpl.java | 25 +++++++++++-------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index 550944a..b9dddb5 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -333,6 +333,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic agv_message = conveyorPressStationDeviceDriver.getDevice_code() + message; logService.deviceExecuteLog(device_code, "", "", message); log.info("{},{}", device_code,message); + log.info("模式为{} 光电信号{} 取放信号{}",conveyorPressStationDeviceDriver.getMode(),conveyorPressStationDeviceDriver.getMove(),conveyorPressStationDeviceDriver.getIo_action()); lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message)); } } @@ -585,6 +586,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic agv_message = conveyorPressStationDeviceDriver.getDevice_code() + message; logService.deviceExecuteLog(device_code, "", "", message); log.info("{},{}", device_code,message); + log.info("模式为{} 光电信号{} 取放信号{}",conveyorPressStationDeviceDriver.getMode(),conveyorPressStationDeviceDriver.getMove(),conveyorPressStationDeviceDriver.getIo_action()); lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message)); } } @@ -857,6 +859,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic agv_message = conveyorPressStationDeviceDriver.getDevice_code() + message; logService.deviceExecuteLog(device_code, "", "", message); log.info("{},{}", device_code,message); + log.info("模式为{} 光电信号{} 取放信号{}",conveyorPressStationDeviceDriver.getMode(),conveyorPressStationDeviceDriver.getMove(),conveyorPressStationDeviceDriver.getIo_action()); lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message)); } } @@ -1114,6 +1117,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic agv_message = conveyorPressStationDeviceDriver.getDevice_code() + message; logService.deviceExecuteLog(device_code, "", "", message); log.info("{},{}", device_code,message); + log.info("模式为{} 光电信号{} 取放信号{}",conveyorPressStationDeviceDriver.getMode(),conveyorPressStationDeviceDriver.getMove(),conveyorPressStationDeviceDriver.getIo_action()); lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message)); } } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDeviceDriver.java index ce5e6ac..f670f69 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDeviceDriver.java @@ -458,6 +458,7 @@ public class ConveyorBarcodeDeviceDriver extends AbstractOpcDeviceDriver impleme jo.put("isOnline", isonline); jo.put("hasGoods", hasGoods); jo.put("message", message); + jo.put("requireSucess",requireSucess); return jo; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index 815c3da..7f009be 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -276,14 +276,13 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { resp.setMessage("请求成功"); log.info("createFromWms - 返回参数 {}", JSON.toJSON(resp)); -// LuceneLogDto logDto = LuceneLogDto.builder() -// .device_code("LMSTOACS") -// .requestparam(JSON.toJSON(resp).toString()) -// .responseparam(JSON.toJSON(resp).toString()) -// .status_code(String.valueOf(resp.getCode())) -// .method(tasks.getRequest_medthod_code()) -// .build(); -// lucene.interfaceExecuteLog(logDto); + LuceneLogDto logDto = LuceneLogDto.builder() + .requestparam(JSON.toJSON(resp).toString()) + .responseparam(JSON.toJSON(resp).toString()) + .status_code(String.valueOf(resp.getCode())) + .method(tasks.getRequest_medthod_code()) + .build(); + lucene.interfaceExecuteLog(logDto); return (JSONObject) JSON.toJSON(resp); } finally { MDC.remove(log_file_type); @@ -550,6 +549,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { lnshSplitManipulatorDeviceDriver.writing(100); is_flag = true; } + //下发成功后,写入工单信息表记录 // ProduceshiftorderDto dto = new ProduceshiftorderDto(); @@ -578,9 +578,14 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { resp.setRequestNo(request_no); resp.setResponseDate(AgvUtil.getDate()); resp.setMessage("请求成功"); - log.info("createOrder - 返回参数 {}", JSON.toJSON(resp)); + LuceneLogDto logDto = LuceneLogDto.builder() + .requestparam(JSON.toJSON(resp).toString()) + .responseparam(JSON.toJSON(resp).toString()) + .status_code(String.valueOf(resp.getCode())) + .method(orders.getRequest_medthod_code()) + .build(); + lucene.interfaceExecuteLog(logDto); return (JSONObject) JSON.toJSON(resp); - } finally { MDC.remove(log_file_type); }