From 3d72b2af4a598e4265f61d3517212409d854e4a4 Mon Sep 17 00:00:00 2001 From: zhouhuang Date: Thu, 5 Dec 2024 11:28:59 +0800 Subject: [PATCH 1/2] stand --- das-dn/third_party/AdsLib/AdsDef.h | 2 +- das-dn/third_party/AdsLib/AdsLib.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/das-dn/third_party/AdsLib/AdsDef.h b/das-dn/third_party/AdsLib/AdsDef.h index b71b507f..dac52270 100644 --- a/das-dn/third_party/AdsLib/AdsDef.h +++ b/das-dn/third_party/AdsLib/AdsDef.h @@ -8,7 +8,7 @@ #if defined(USE_TWINCAT_ROUTER) #include "TwinCAT/AdsDef.h" #else -#include "standalone/AdsDef.h" +#include "Standalone/AdsDef.h" #endif #include diff --git a/das-dn/third_party/AdsLib/AdsLib.h b/das-dn/third_party/AdsLib/AdsLib.h index 4883c192..e6469a29 100644 --- a/das-dn/third_party/AdsLib/AdsLib.h +++ b/das-dn/third_party/AdsLib/AdsLib.h @@ -8,7 +8,7 @@ #if defined(USE_TWINCAT_ROUTER) #include "TwinCAT/AdsLib.h" #else -#include "standalone/AdsLib.h" +#include "Standalone/AdsLib.h" #endif #include "Sockets.h" From 144a66f47a3c0bac6b287ede27452f0db4569684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=B7=E6=88=90=E4=BC=9F?= Date: Thu, 5 Dec 2024 11:50:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=BC=93=E5=AD=98BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/EquipmentCacheImpl.java | 2 +- .../calc/functions/FunctionSaveCalcData.java | 23 ------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/das/src/main/java/com/das/modules/cache/service/impl/EquipmentCacheImpl.java b/das/src/main/java/com/das/modules/cache/service/impl/EquipmentCacheImpl.java index 1c784d47..e08ce6fc 100644 --- a/das/src/main/java/com/das/modules/cache/service/impl/EquipmentCacheImpl.java +++ b/das/src/main/java/com/das/modules/cache/service/impl/EquipmentCacheImpl.java @@ -87,7 +87,7 @@ public class EquipmentCacheImpl implements EquipmentCache { } else{ deviceInfoCaches.add(deviceInfoCache); - index = deviceInfoCaches.size(); + index = deviceInfoCaches.size() - 1; deviceCodeIndex.put(deviceInfoCache.getDeviceCode(),index); deviceIdIndex.put(equipment.getId(),index); } diff --git a/das/src/main/java/com/das/modules/calc/functions/FunctionSaveCalcData.java b/das/src/main/java/com/das/modules/calc/functions/FunctionSaveCalcData.java index 73de903e..cd88c7ee 100644 --- a/das/src/main/java/com/das/modules/calc/functions/FunctionSaveCalcData.java +++ b/das/src/main/java/com/das/modules/calc/functions/FunctionSaveCalcData.java @@ -35,29 +35,6 @@ public class FunctionSaveCalcData extends AbstractVariadicFunction { return "save"; } -// @Override -// public AviatorObject call(Map env, AviatorObject deviceCode, AviatorObject attributes) { -// //设备Code -// String code = (String)deviceCode.getValue(env); -// DeviceInfoCache deviceInfoCache = cacheService.getDeviceInfoCache(code); -// //属性列表 -// List list = (List)attributes.getValue(env); -// List attrs = list.stream().map(String::toLowerCase).toList(); -// SnapshotValueQueryParam snapshotValueQueryParam = new SnapshotValueQueryParam(); -// snapshotValueQueryParam.setDeviceId(String.valueOf(deviceInfoCache.getDeviceId())); -// snapshotValueQueryParam.setAttributes(attrs); -// Map> stringMapMap = dataService.querySnapshotValues(List.of(snapshotValueQueryParam)); -// Map data = stringMapMap.get(String.valueOf(deviceInfoCache.getDeviceId())); -// log.info("{}", data); -// Map result = new HashMap<>(list.size()); -// for (String s : list) { -// String key = s.toLowerCase(); -// Object value = data.get(key); -// result.put(s, value); -// } -// return AviatorRuntimeJavaType.valueOf(result); -// } - @SneakyThrows @Override public AviatorObject variadicCall(Map env, AviatorObject... args) {