This commit is contained in:
parent
46b86e9c57
commit
e3f58244be
|
|
@ -335,7 +335,7 @@ public class BufferDeviceImpl implements IBufferDeviceService
|
||||||
.ifPresent(telemetryValue -> dto.setCabinHumidity(telemetryValue.getValue()));
|
.ifPresent(telemetryValue -> dto.setCabinHumidity(telemetryValue.getValue()));
|
||||||
|
|
||||||
// 赋予经纬度
|
// 赋予经纬度
|
||||||
log.info("开始获取经纬度数据,dockerDeviceIotId: {}", dockerDeviceIotId);
|
// log.info("开始获取经纬度数据,dockerDeviceIotId: {}", dockerDeviceIotId);
|
||||||
|
|
||||||
// 纬度
|
// 纬度
|
||||||
attributeMap.get(DeviceAttributes.Latitude)
|
attributeMap.get(DeviceAttributes.Latitude)
|
||||||
|
|
@ -363,7 +363,7 @@ public class BufferDeviceImpl implements IBufferDeviceService
|
||||||
dto.setRainfall(weather.getRainfall());
|
dto.setRainfall(weather.getRainfall());
|
||||||
dto.setEnvironmentTemperature(weather.getEnvironmentTemperature());
|
dto.setEnvironmentTemperature(weather.getEnvironmentTemperature());
|
||||||
dto.setEnvironmentHumidity(weather.getEnvironmentHumidity());
|
dto.setEnvironmentHumidity(weather.getEnvironmentHumidity());
|
||||||
log.info("weather {}",weather);
|
// log.info("weather {}",weather);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -156,19 +156,19 @@ public class SynService {
|
||||||
try {
|
try {
|
||||||
// 按照名字过滤网关设备
|
// 按照名字过滤网关设备
|
||||||
if (shouldExcludeDevice(gatewayInfo.getName())) {
|
if (shouldExcludeDevice(gatewayInfo.getName())) {
|
||||||
log.info("网关 {} 匹配过滤规则,跳过同步", gatewayInfo.getName());
|
// log.info("网关 {} 匹配过滤规则,跳过同步", gatewayInfo.getName());
|
||||||
skippedCount++;
|
skippedCount++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 同步网关设备本身
|
// 同步网关设备本身
|
||||||
log.info("开始同步网关: {}", gatewayInfo.getName());
|
// log.info("开始同步网关: {}", gatewayInfo.getName());
|
||||||
syncDevice(gatewayInfo, DeviceType.GATEWAY, null);
|
syncDevice(gatewayInfo, DeviceType.GATEWAY, null);
|
||||||
totalCount++;
|
totalCount++;
|
||||||
|
|
||||||
// 获取该网关的所有子设备ID
|
// 获取该网关的所有子设备ID
|
||||||
List<String> childDeviceIds = iThingsBoardDomain.getGatewayChildDevices(gatewayInfo.getId());
|
List<String> childDeviceIds = iThingsBoardDomain.getGatewayChildDevices(gatewayInfo.getId());
|
||||||
log.info("网关 {} 有 {} 个子设备", gatewayInfo.getName(), childDeviceIds.size());
|
// log.info("网关 {} 有 {} 个子设备", gatewayInfo.getName(), childDeviceIds.size());
|
||||||
|
|
||||||
// 遍历该网关的子设备
|
// 遍历该网关的子设备
|
||||||
for (String childDeviceId : childDeviceIds) {
|
for (String childDeviceId : childDeviceIds) {
|
||||||
|
|
@ -182,7 +182,7 @@ public class SynService {
|
||||||
|
|
||||||
// 按照名字过滤子设备
|
// 按照名字过滤子设备
|
||||||
if (shouldExcludeDevice(childDeviceInfo.getName())) {
|
if (shouldExcludeDevice(childDeviceInfo.getName())) {
|
||||||
log.info("子设备 {} 匹配过滤规则,跳过同步", childDeviceInfo.getName());
|
// log.info("子设备 {} 匹配过滤规则,跳过同步", childDeviceInfo.getName());
|
||||||
skippedCount++;
|
skippedCount++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue