Commit 2d789d91 by lzy

空间树-到床位

parent 22ff5980
......@@ -12,6 +12,7 @@ import com.makeit.entity.platform.space.PlatBed;
import com.makeit.entity.platform.space.PlatRoom;
import com.makeit.entity.platform.space.PlatSpace;
import com.makeit.enums.CodeMessageEnum;
import com.makeit.enums.CommonEnum;
import com.makeit.enums.platform.space.PlatSpaceEnum;
import com.makeit.exception.BusinessException;
import com.makeit.mapper.platform.space.PlatSpaceMapper;
......@@ -174,7 +175,9 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
List<PlatRoom> listRoom = platRoomService.list(new LambdaQueryWrapper<>());
//床位
List<PlatBed> listBeds = platBedService.list(new LambdaQueryWrapper<>());
LambdaQueryWrapper<PlatBed> queryWrapper1 = new LambdaQueryWrapper<>();
queryWrapper1.eq(PlatBed::getStatus, CommonEnum.YES.getValue());
List<PlatBed> listBeds = platBedService.list(queryWrapper1);
Map<String,List<PlatBed>> mapBed = listBeds.stream().collect(Collectors.groupingBy(PlatBed::getRoomId));
List<PlatSpaceVO> listRoomVo = new ArrayList<>();
......@@ -202,7 +205,8 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
//父级
List<PlatSpaceVO> listParent = listSpaceVo.stream().filter(item->StringUtil.isEmpty(item.getParentId())).collect(Collectors.toList());
List<PlatSpaceVO> listParent = listSpaceVo.stream().filter(item->StringUtil.isEmpty(item.getParentId())).
collect(Collectors.toList());
//子集
List<PlatSpaceVO> listChild = listSpaceVo.stream().filter(item->item.getParentId() != null).collect(Collectors.toList());
......
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