|
@@ -278,7 +278,13 @@ public class VoyageStockDistributeServiceImpl implements VoyageStockDistributeSe
|
|
|
}
|
|
|
List<RoomRespDTO> roomList = roomApi.getRoomList(voyage.getShipId());
|
|
|
List<VoyageStockDistributeDO> list = voyageStockDistributeMapper.selectListByVoyageId(voyageId);
|
|
|
- List<Integer> selectedList = list.stream().flatMap(list1 -> list1.getRoomNums().stream()).collect(Collectors.toList());
|
|
|
+ List<Integer> selectedList = list.stream().flatMap(list1 -> {
|
|
|
+ List<Integer> roomNums = list1.getRoomNums();
|
|
|
+ if(roomNums != null) {
|
|
|
+ return roomNums.stream();
|
|
|
+ }
|
|
|
+ return new ArrayList<Integer>().stream();
|
|
|
+ }).collect(Collectors.toList());
|
|
|
roomList.stream().forEach(room -> {
|
|
|
room.setIsSelected(selectedList.contains(room.getRoomNum()));
|
|
|
});
|