模拟数据上报修改
This commit is contained in:
parent
3eb790acdb
commit
8187ffe3a5
@ -238,6 +238,7 @@ public class NodeMessageServiceImpl extends TextWebSocketHandler implements Node
|
||||
@Override
|
||||
public void handleData(TerminalMessage data) {
|
||||
JsonNode jsonNode = data.getData();
|
||||
log.info("收到消息:{}",data.getData());
|
||||
String deviceId = jsonNode.get("deviceId").asText();
|
||||
JsonNode values = jsonNode.get("values");
|
||||
JsonNode archiveValues = jsonNode.get("archiveValues");
|
||||
@ -256,6 +257,7 @@ public class NodeMessageServiceImpl extends TextWebSocketHandler implements Node
|
||||
String key = String.format("RT:%s:%s", deviceId, fieldName.toLowerCase());
|
||||
keyValueMap.put(key, values.get(fieldName));
|
||||
}
|
||||
log.info("values解析成功");
|
||||
Iterator<String> archiveKeys = archiveValues.fieldNames();
|
||||
while (archiveKeys.hasNext()) {
|
||||
String fieldName = archiveKeys.next();
|
||||
@ -268,6 +270,7 @@ public class NodeMessageServiceImpl extends TextWebSocketHandler implements Node
|
||||
lowSpeedValueMap.put(fieldName, values.get(fieldName));
|
||||
}
|
||||
}
|
||||
log.info("archive解析成功");
|
||||
//更新td
|
||||
if (!highSpeedValueMap.isEmpty()) {
|
||||
List<RTData> highSpeedData = new ArrayList<>();
|
||||
|
Loading…
Reference in New Issue
Block a user