Commit 2a8e8849 by lzy

房间选择设备

parent b619997f
...@@ -97,19 +97,23 @@ public class PlatRoomBedDeviceServiceImpl extends ServiceImpl<PlatRoomBedDeviceM ...@@ -97,19 +97,23 @@ public class PlatRoomBedDeviceServiceImpl extends ServiceImpl<PlatRoomBedDeviceM
PlatSpaceDeviceQueryDTO dto = pageReqDTO.getData(); PlatSpaceDeviceQueryDTO dto = pageReqDTO.getData();
LambdaQueryWrapper<PlatRoomBedDevice> queryWrapper1 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<PlatRoomBedDevice> queryWrapper1 = new LambdaQueryWrapper<>();
// queryWrapper1.select(PlatRoomBedDevice::getDeviceId);
List<PlatRoomBedDevice> list = list(queryWrapper1); List<PlatRoomBedDevice> list = list(queryWrapper1);
List<PlatRoomBedDevice> list1 = new ArrayList<>(); List<PlatRoomBedDevice> list1 = new ArrayList<>();
list.forEach(item->{ if (CommonEnum.NO.getValue().equals(dto.getIsRoom())) {
if(!item.getRoomId().equals(dto.getRoomId())
|| (item.getRoomId().equals(dto.getRoomId()) && StringUtil.isNotEmpty(item.getBedId()))){ list.forEach(item->{
list1.add(item); if(!item.getRoomId().equals(dto.getRoomId())
} || (item.getRoomId().equals(dto.getRoomId()) && StringUtil.isNotEmpty(item.getBedId()))){
}); list1.add(item);
}
});
}
List<String> listEquipmentIds = list1.stream().map(item -> item.getDeviceId()).collect(Collectors.toList()); List<String> listEquipmentIds = list1.stream().map(item -> item.getDeviceId()).collect(Collectors.toList());
if (CommonEnum.YES.getValue().equals(dto.getIsRoom())) {
listEquipmentIds = list.stream().map(item -> item.getDeviceId()).collect(Collectors.toList());
}
String orgId = ""; String orgId = "";
if (StringUtil.isNotEmpty(dto.getRoomId())) { if (StringUtil.isNotEmpty(dto.getRoomId())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment