|
|
@ -223,6 +223,8 @@ public class DeviceServiceImpl implements IDeviceService { |
|
|
|
.eq(StringUtils.hasText(param.getWorkspaceId()), |
|
|
|
DeviceEntity::getWorkspaceId, param.getWorkspaceId()) |
|
|
|
.eq(param.getBoundStatus() != null, DeviceEntity::getBoundStatus, param.getBoundStatus()) |
|
|
|
.in(ObjectUtil.isAllNotEmpty(param.getProIds()), |
|
|
|
DeviceEntity::getDeviceSn, param.getProIds()) |
|
|
|
.orderBy(param.isOrderBy(), |
|
|
|
param.isAsc(), DeviceEntity::getId)) |
|
|
|
.stream() |
|
|
@ -231,11 +233,12 @@ public class DeviceServiceImpl implements IDeviceService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<DeviceDTO> getDevicesTopoForWeb(String workspaceId,String nickname) { |
|
|
|
public List<DeviceDTO> getDevicesTopoForWeb(String workspaceId,String nickname,List<Integer> proIds) { |
|
|
|
List<DeviceDTO> devicesList = this.getDevicesByParams( |
|
|
|
DeviceQueryParam.builder() |
|
|
|
.workspaceId(workspaceId) |
|
|
|
.domains(List.of(DeviceDomainEnum.REMOTER_CONTROL.getDomain(), DeviceDomainEnum.DOCK.getDomain())) |
|
|
|
.proIds(proIds) |
|
|
|
.build()); |
|
|
|
|
|
|
|
devicesList.stream() |
|
|
@ -405,7 +408,7 @@ public class DeviceServiceImpl implements IDeviceService { |
|
|
|
.map(WorkspaceDTO::getWorkspaceName).orElse("") : "") |
|
|
|
.firmwareStatus(DeviceFirmwareStatusEnum.NOT_UPGRADE) |
|
|
|
.videoId(dockVideoId) |
|
|
|
.thingVersion(entity.getVersion()).proId(ObjectUtil.isNotEmpty(entity.getProId())?String.valueOf(entity.getProId()):"").build(); |
|
|
|
.thingVersion(entity.getVersion()).build(); |
|
|
|
} catch (CloudSDKException e) { |
|
|
|
log.error(e.getLocalizedMessage() + "Entity: {}", entity); |
|
|
|
} |
|
|
@ -495,13 +498,14 @@ public class DeviceServiceImpl implements IDeviceService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public PaginationData<DeviceDTO> getBoundDevicesWithDomain(String workspaceId, Long page, |
|
|
|
Long pageSize, Integer domain,String nickname) { |
|
|
|
Long pageSize, Integer domain,String nickname,List<Integer> proIds) { |
|
|
|
|
|
|
|
Page<DeviceEntity> pagination = mapper.selectPage(new Page<>(page, pageSize), |
|
|
|
new LambdaQueryWrapper<DeviceEntity>() |
|
|
|
.eq(DeviceEntity::getDomain, domain) |
|
|
|
.eq(DeviceEntity::getWorkspaceId, workspaceId) |
|
|
|
.eq(DeviceEntity::getBoundStatus, true) |
|
|
|
.in(ObjectUtil.isAllNotEmpty(proIds),DeviceEntity::getProId, proIds) |
|
|
|
.eq(org.dromara.common.core.utils.StringUtils.isNotEmpty(nickname),DeviceEntity::getNickname,nickname)); |
|
|
|
List<DeviceDTO> devicesList = pagination.getRecords().stream().map(this::deviceEntityConvertToDTO) |
|
|
|
.peek(device -> { |
|
|
@ -710,7 +714,8 @@ public class DeviceServiceImpl implements IDeviceService { |
|
|
|
.firmwareVersion(dto.getFirmwareVersion()) |
|
|
|
.compatibleStatus(dto.getFirmwareStatus() == null ? null : |
|
|
|
DeviceFirmwareStatusEnum.CONSISTENT_UPGRADE != dto.getFirmwareStatus()) |
|
|
|
.deviceDesc(dto.getDeviceDesc()).proId(ObjectUtil.isNotEmpty(dto.getProId())?Integer.valueOf(dto.getProId()):null) |
|
|
|
.deviceDesc(dto.getDeviceDesc()) |
|
|
|
.proId(dto.getProId() == null ? null : dto.getProId()) |
|
|
|
.build(); |
|
|
|
} |
|
|
|
} |
|
|
|