Showing
1 changed file
with
1 additions
and
1 deletions
@@ -367,7 +367,7 @@ public class DefaultDeviceStateService extends AbstractPartitionBasedService<Dev | @@ -367,7 +367,7 @@ public class DefaultDeviceStateService extends AbstractPartitionBasedService<Dev | ||
367 | tkDeviceStateLogDTO.setTenantId(tenantId); | 367 | tkDeviceStateLogDTO.setTenantId(tenantId); |
368 | tkDeviceStateLogDTO.setTbDeviceId(tbDeviceId); | 368 | tkDeviceStateLogDTO.setTbDeviceId(tbDeviceId); |
369 | tkDeviceStateLogDTO.setStatus(status); | 369 | tkDeviceStateLogDTO.setStatus(status); |
370 | - tkDeviceStateLogDTO.setDeviceName(deviceDTO.getName()); | 370 | + tkDeviceStateLogDTO.setDeviceName(StringUtils.isEmpty(deviceDTO.getAlias())?deviceDTO.getName():deviceDTO.getAlias()); |
371 | tkDeviceStateLogDTO.setDeviceType(deviceDTO.getDeviceType()); | 371 | tkDeviceStateLogDTO.setDeviceType(deviceDTO.getDeviceType()); |
372 | tkDeviceStateLogDTO.setDeviceProfileName(deviceDTO.getDeviceProfile().getName()); | 372 | tkDeviceStateLogDTO.setDeviceProfileName(deviceDTO.getDeviceProfile().getName()); |
373 | tkDeviceStateLogDTO.setOrganizationName(deviceDTO.getOrganizationDTO().getName()); | 373 | tkDeviceStateLogDTO.setOrganizationName(deviceDTO.getOrganizationDTO().getName()); |