Commit 501bbca5 authored by 刘林's avatar 刘林

fix(equip):装备代码集成influxDB,版本1.0

parent 27b684b6
...@@ -657,7 +657,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -657,7 +657,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
fieldsMap.put("isAlarm", equipmentSpeIndex.getIsAlarm().toString()); fieldsMap.put("isAlarm", equipmentSpeIndex.getIsAlarm().toString());
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
fieldsMap.put("createdTime", simpleDateFormat.format(new Date())); fieldsMap.put("createdTime", simpleDateFormat.format(new Date()));
fieldsMap.put("equipment", JSON.toJSONString(equipmentSpeIndex)); fieldsMap.put("equipmentIndex", JSON.toJSONString(equipmentSpeIndex));
influxDbConnection.insert("iot_data", tagsMap, fieldsMap); influxDbConnection.insert("iot_data", tagsMap, fieldsMap);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment