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 e7becb3..550944a 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 @@ -360,6 +360,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic if(device.getDeviceDriver() instanceof ConveyorBarcodeDeviceDriver){ conveyorBarcodeDeviceDriver = (ConveyorBarcodeDeviceDriver) device.getDeviceDriver(); if (conveyorBarcodeDeviceDriver.getMode() == 2 + && conveyorBarcodeDeviceDriver.getMove() == 1 ) { inst.setExecute_status("1"); instructionService.update(inst); @@ -879,7 +880,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic if(device.getDeviceDriver() instanceof ConveyorBarcodeDeviceDriver){ conveyorBarcodeDeviceDriver = (ConveyorBarcodeDeviceDriver) device.getDeviceDriver(); conveyorBarcodeDeviceDriver.writing(4); - if (conveyorBarcodeDeviceDriver.getMode() == 2){ + if (conveyorBarcodeDeviceDriver.getMode() == 2 + && conveyorBarcodeDeviceDriver.getMove() == 0 + ){ inst.setExecute_status("3"); instructionService.update(inst); data = AgvService.sendAgvOneModeInst(phase, index, 0); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java b/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java index f321b78..5a10c40 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java @@ -407,23 +407,24 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC Object obj = accessor_value.getValue(relate); sb.append("key:" + relate + "value:" + obj + ";"); } - log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value, sb}); + log.info("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value, sb}); // 存在上次点位值为null情况 则不记录日志 - if((ObjectUtil.equal(his,"null") || ObjectUtil.isEmpty(his)) || (ObjectUtil.equal(value,"null") || ObjectUtil.isEmpty(value)) ){ - //lucene.deviceExecuteLog(new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1), String.valueOf(his), String.valueOf(value))); - - } else { - lucene.deviceExecuteLog(new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1), String.valueOf(his), String.valueOf(value))); + if (!itemDto.getItem_code().endsWith("heartbeat") && !itemDto.getItem_code().endsWith("time")) { + if((ObjectUtil.equal(his,"null") || ObjectUtil.isEmpty(his)) || (ObjectUtil.equal(value,"null") || ObjectUtil.isEmpty(value)) ){ + //lucene.deviceExecuteLog(new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1), String.valueOf(his), String.valueOf(value))); + } else { + lucene.deviceExecuteLog(new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1), String.valueOf(his), String.valueOf(value))); + } } - } else { - log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value}); + log.info("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(), itemId, his, value}); // 存在上次点位值为null情况 则不记录日志 - if((ObjectUtil.equal(his,"null") || ObjectUtil.isEmpty(his)) || (ObjectUtil.equal(value,"null") || ObjectUtil.isEmpty(value)) ){ - //lucene.deviceExecuteLog(new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1), String.valueOf(his), String.valueOf(value))); - - } else { - lucene.deviceExecuteLog(new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1), String.valueOf(his), String.valueOf(value))); + if (!itemDto.getItem_code().endsWith("heartbeat") && !itemDto.getItem_code().endsWith("time")) { + if((ObjectUtil.equal(his,"null") || ObjectUtil.isEmpty(his)) || (ObjectUtil.equal(value,"null") || ObjectUtil.isEmpty(value)) ){ + //lucene.deviceExecuteLog(new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1), String.valueOf(his), String.valueOf(value))); + } else { + lucene.deviceExecuteLog(new LuceneLogDto(itemDto.getOpc_server_code(), itemDto.getOpc_plc_code(), itemDto.getDevice_code(), itemDto.getItem_code().substring(itemDto.getItem_code().lastIndexOf(".") + 1), String.valueOf(his), String.valueOf(value))); + } } } }