取redis点位数据最新值,没有就是0,时间

This commit is contained in:
Timer
2026-03-09 22:10:13 +08:00
parent fbd2186aaf
commit 29a836ce68

View File

@ -598,6 +598,7 @@ public class MPointController {
String[] str = map_redis_data.get(id).split(";"); String[] str = map_redis_data.get(id).split(";");
if (str.length >= 3 && str[1] != null && !str[1].isEmpty() && !"null".equals(str[1])) { if (str.length >= 3 && str[1] != null && !str[1].isEmpty() && !"null".equals(str[1])) {
mPoint.setParmvalue(new BigDecimal(str[1])); mPoint.setParmvalue(new BigDecimal(str[1]));
mPoint.setMeasuredt(str[2]);
} else { } else {
mPoint.setParmvalue(BigDecimal.ZERO); mPoint.setParmvalue(BigDecimal.ZERO);
} }