diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java index a03524f..75fd74f 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java @@ -456,6 +456,8 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic // String demosub = linkobj.substring(1,linkobj.length()-1); // String demoArray[] = demosub.split(","); // List demoList = Arrays.asList(demoArray); + + json.put("device_code",this.device_code); json.put("material_code",material); json.put("qty",encoder_qty); diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java index 00dbfe6..fbe9e13 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java @@ -363,13 +363,14 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC UnifiedDataAccessor accessor_value = UnifiedDataAccessorFactory.getAccessor(OpcConfig.udw_opc_value_key); accessor_value.setValue(itemId, value); - if (value != null) { - if (log.isTraceEnabled()) { - log.trace("Item {} new value: {}, Timestamp: {}", new Object[]{itemId, itemState.getValue(), itemState.getTimestamp().getTime()}); - } - } else if (log.isInfoEnabled()) { - log.info("Item {} new value: {}, Timestamp: {}, Quality: {}", new Object[]{itemId, itemState.getValue(), itemState.getTimestamp().getTime(), itemState.getQuality()}); - } +// if (value != null) { +// if (log.isTraceEnabled()) { +// log.trace("Item {} new value: {}, Timestamp: {}", new Object[]{itemId, itemState.getValue(), itemState.getTimestamp().getTime()}); +// } +// } else if (log.isInfoEnabled()) { +// log.info("Item {} new value: {}, Timestamp: {}, Quality: {}", new Object[]{itemId, itemState.getValue(), itemState.getTimestamp().getTime(), itemState.getQuality()}); +// } + log.trace("Item {} new value: {}, Timestamp: {}", new Object[]{itemId, itemState.getValue(), itemState.getTimestamp().getTime()}); OpcItemDto itemDto = this.getItem(itemId); // if (Boolean.TRUE.equals(itemDto.getNeed_log())) { @@ -401,7 +402,6 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC log.warn("设备:{}信号{}变更从{}->{};信号快照:{}", new Object[]{itemDto.getDevice_code(),itemId, his, value}); // this.businessLogger.setResource(itemDto.getDevice_code(), itemDto.getDevice_name()).log("信号{}变更从{}->{}", new Object[]{itemId, his, value}); } - } } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/acs/opc/OpcConfig.java b/acs/hd/nladmin-system/src/main/java/org/nl/acs/opc/OpcConfig.java index 66951bf..e16b6f5 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/acs/opc/OpcConfig.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/acs/opc/OpcConfig.java @@ -10,5 +10,5 @@ public class OpcConfig { public static String opc_server_default_group = "group"; public static String resource_code = "opc_sync"; public static String resource_name = "opc同步"; - public static boolean opc_item_read_using_callback = true; + public static boolean opc_item_read_using_callback = false; } diff --git a/acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/DeviceOpcSynchronizeAutoRun.java b/acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/DeviceOpcSynchronizeAutoRun.java index 8edf283..a0d70ca 100644 --- a/acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/DeviceOpcSynchronizeAutoRun.java +++ b/acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/DeviceOpcSynchronizeAutoRun.java @@ -19,7 +19,7 @@ import java.util.concurrent.Executors; public class DeviceOpcSynchronizeAutoRun extends AbstractAutoRunnable { public static boolean isRun = false; - ExecutorService executorService = Executors.newCachedThreadPool(); + ExecutorService executorService; @Autowired private DeviceAppService deviceAppService; @Autowired @@ -39,7 +39,7 @@ public class DeviceOpcSynchronizeAutoRun extends AbstractAutoRunnable { public void autoRun() throws Exception { { isRun = true; - + this.executorService = Executors.newCachedThreadPool(); Map servers = this.opcServerManageService.queryAllServerMap(); Map>> pros; do{ @@ -67,8 +67,12 @@ public class DeviceOpcSynchronizeAutoRun extends AbstractAutoRunnable { //Map>> pros1 = this.deviceAppService.findAllFormatProtocolFromDriver(); //List opcDrivers = this.deviceAppService.findDeviceDriver(DeviceDriver.class); - while (true) { - Thread.sleep(3000L); + while(true) { + try { + Thread.sleep(3600000L); + } catch (InterruptedException var11) { + return; + } } } } diff --git a/acs/qd/src/views/acs/history/udwData/index.vue b/acs/qd/src/views/acs/history/udwData/index.vue index 17f53a1..aa6668d 100644 --- a/acs/qd/src/views/acs/history/udwData/index.vue +++ b/acs/qd/src/views/acs/history/udwData/index.vue @@ -5,15 +5,15 @@
- - + v-model="form.unified_key" + placeholder="unified_key" + class="filter-item" + clearable + filterable + size="small" + @change="crud.toQuery" + > +