selectByMPointID/Code
This commit is contained in:
@ -138,7 +138,7 @@ public class MqttServiceImpl implements MqttService {
|
|||||||
key = device + "_" + key;
|
key = device + "_" + key;
|
||||||
}
|
}
|
||||||
System.out.println("标准 key=" + key + " value=" + data.getString(key));
|
System.out.println("标准 key=" + key + " value=" + data.getString(key));
|
||||||
// 获取点位信息
|
// 获取点位信息 通过MPointID
|
||||||
MPoint mPoint = getMPointCacheOrES(bizId, key);
|
MPoint mPoint = getMPointCacheOrES(bizId, key);
|
||||||
if (mPoint == null) {
|
if (mPoint == null) {
|
||||||
boolean inNotFound = notFoundKeys.contains(key);
|
boolean inNotFound = notFoundKeys.contains(key);
|
||||||
@ -154,7 +154,7 @@ public class MqttServiceImpl implements MqttService {
|
|||||||
// 处理ES数据
|
// 处理ES数据
|
||||||
MPointES esPoint = buildEsPoint(mPoint, value, date);
|
MPointES esPoint = buildEsPoint(mPoint, value, date);
|
||||||
redisList.add(esPoint);
|
redisList.add(esPoint);
|
||||||
String tableName = "tb_mp_" + key;
|
String tableName = "tb_mp_" + mPoint.getMpointcode(); // 建表使用code,确保表名唯一
|
||||||
MPointHistory mPointHistory = new MPointHistory();
|
MPointHistory mPointHistory = new MPointHistory();
|
||||||
mPointHistory.setMeasuredt(date);
|
mPointHistory.setMeasuredt(date);
|
||||||
mPointHistory.setParmvalue(value);
|
mPointHistory.setParmvalue(value);
|
||||||
|
|||||||
Reference in New Issue
Block a user