修复设备缓存BUG
This commit is contained in:
parent
b9cf44d179
commit
144a66f47a
@ -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);
|
||||
}
|
||||
|
@ -35,29 +35,6 @@ public class FunctionSaveCalcData extends AbstractVariadicFunction {
|
||||
return "save";
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public AviatorObject call(Map<String, Object> env, AviatorObject deviceCode, AviatorObject attributes) {
|
||||
// //设备Code
|
||||
// String code = (String)deviceCode.getValue(env);
|
||||
// DeviceInfoCache deviceInfoCache = cacheService.getDeviceInfoCache(code);
|
||||
// //属性列表
|
||||
// List<String> list = (List<String>)attributes.getValue(env);
|
||||
// List<String> attrs = list.stream().map(String::toLowerCase).toList();
|
||||
// SnapshotValueQueryParam snapshotValueQueryParam = new SnapshotValueQueryParam();
|
||||
// snapshotValueQueryParam.setDeviceId(String.valueOf(deviceInfoCache.getDeviceId()));
|
||||
// snapshotValueQueryParam.setAttributes(attrs);
|
||||
// Map<String, Map<String, Object>> stringMapMap = dataService.querySnapshotValues(List.of(snapshotValueQueryParam));
|
||||
// Map<String,Object> data = stringMapMap.get(String.valueOf(deviceInfoCache.getDeviceId()));
|
||||
// log.info("{}", data);
|
||||
// Map<String,Object> 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<String, Object> env, AviatorObject... args) {
|
||||
|
Loading…
Reference in New Issue
Block a user