Commit 87251f58d1a249bb78d341cd3bffa2f055f7d61d

Authored by xp.Huang
1 parent 440d0ac7

fix: 修改上下线记录BUG,有别名使用别名,没有别名使用设备名称或SN

@@ -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());