解决查询空指针报错问题

This commit is contained in:
zq
2026-01-22 14:17:07 +08:00
parent ecc4799afd
commit b4f867f796

View File

@ -564,7 +564,7 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
for (Map<String, Object> clusterDevice : clusterIds) {
BMSBatteryClusterVo bmsBatteryClusterVo = new BMSBatteryClusterVo();
bmsBatteryClusterVo.setDeviceName(clusterDevice.get("deviceName").toString());
bmsBatteryClusterVo.setParentDeviceName(clusterDevice.get("parentDeviceName").toString());
bmsBatteryClusterVo.setParentDeviceName(clusterDevice.get("parentDeviceName") == null ? null : clusterDevice.get("parentDeviceName").toString());
// 从redis取单个簇详细数据
String clusterId = clusterDevice.get("id").toString();
EmsBatteryCluster clusterData = redisCache.getCacheObject(RedisKeyConstants.CLUSTER +siteId+"_"+clusterId);