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