|
|
@@ -497,7 +497,7 @@ public class DeviceServiceImpl implements IDeviceService {
|
|
|
.peek(device -> {
|
|
|
device.setStatus(deviceRedisService.checkDeviceOnline(device.getDeviceSn()));
|
|
|
setChild(device);
|
|
|
- })
|
|
|
+ }).filter(deviceDTO -> deviceDTO.getChildren() != null)
|
|
|
.collect(Collectors.toList());
|
|
|
return new PaginationData<DeviceDTO>(devicesList, new Pagination(pagination.getCurrent(), pagination.getSize(), pagination.getTotal()));
|
|
|
}
|
|
|
@@ -505,7 +505,7 @@ public class DeviceServiceImpl implements IDeviceService {
|
|
|
|
|
|
@Override
|
|
|
public DeviceDTO setChild(DeviceDTO device) {
|
|
|
- if (StringUtils.hasText(device.getChildDeviceSn())) {
|
|
|
+ if (StringUtils.hasText(device.getChildDeviceSn()) && DeviceDomainEnum.DOCK == device.getDomain()) {
|
|
|
Optional<DeviceDTO> childOpt = getDeviceBySn(device.getChildDeviceSn());
|
|
|
childOpt.ifPresent(child -> {
|
|
|
child.setStatus(deviceRedisService.checkDeviceOnline(child.getDeviceSn()));
|