Commit 87251f58d1a249bb78d341cd3bffa2f055f7d61d
1 parent
440d0ac7
fix: 修改上下线记录BUG,有别名使用别名,没有别名使用设备名称或SN
Showing
1 changed file
with
1 additions
and
1 deletions
... | ... | @@ -367,7 +367,7 @@ public class DefaultDeviceStateService extends AbstractPartitionBasedService<Dev |
367 | 367 | tkDeviceStateLogDTO.setTenantId(tenantId); |
368 | 368 | tkDeviceStateLogDTO.setTbDeviceId(tbDeviceId); |
369 | 369 | tkDeviceStateLogDTO.setStatus(status); |
370 | - tkDeviceStateLogDTO.setDeviceName(deviceDTO.getName()); | |
370 | + tkDeviceStateLogDTO.setDeviceName(StringUtils.isEmpty(deviceDTO.getAlias())?deviceDTO.getName():deviceDTO.getAlias()); | |
371 | 371 | tkDeviceStateLogDTO.setDeviceType(deviceDTO.getDeviceType()); |
372 | 372 | tkDeviceStateLogDTO.setDeviceProfileName(deviceDTO.getDeviceProfile().getName()); |
373 | 373 | tkDeviceStateLogDTO.setOrganizationName(deviceDTO.getOrganizationDTO().getName()); | ... | ... |