Commit b25f010d by 吕明尚

Merge branch 'dev' into test

parents c0313858 4eb6a013
...@@ -72,10 +72,14 @@ public class RoomStatusServiceImpl implements RoomStatusService { ...@@ -72,10 +72,14 @@ public class RoomStatusServiceImpl implements RoomStatusService {
List<SOrder> orderList = orderService.listByRoomInfo(storeId,roomIds,day); List<SOrder> orderList = orderService.listByRoomInfo(storeId,roomIds,day);
Map<Long,List<SOrder>> orderMap = Optional.ofNullable(orderList).orElse(new ArrayList<>()).parallelStream().collect(Collectors.groupingBy(SOrder::getRoomId)); Map<Long,List<SOrder>> orderMap = Optional.ofNullable(orderList).orElse(new ArrayList<>()).parallelStream().collect(Collectors.groupingBy(SOrder::getRoomId));
Map<Long,SCleanRecords> cleanRecordMap = cleanRecordsService.lastCleanRoomByRoomIds(roomIds); Map<Long,SCleanRecords> cleanRecordMap = cleanRecordsService.lastCleanRoomByRoomIds(roomIds);
if (Objects.isNull(cleanRecordMap)) {
cleanRecordMap = new HashMap<>();
}
List<RoomStatusVo> voList = new ArrayList<>(); List<RoomStatusVo> voList = new ArrayList<>();
Map<Long, SCleanRecords> finalCleanRecordMap = cleanRecordMap;
roomIds.stream().forEach(roomId -> { roomIds.stream().forEach(roomId -> {
voList.addAll(generatorRoomStatusList(store,roomId,orderMap.get(roomId),cleanRecordMap.get(roomId),day,OrderTypeEnum.RESERVER.getCode())); voList.addAll(generatorRoomStatusList(store, roomId, orderMap.get(roomId), finalCleanRecordMap.get(roomId), day, OrderTypeEnum.RESERVER.getCode()));
voList.addAll(generatorRoomStatusList(store,roomId,orderMap.get(roomId),cleanRecordMap.get(roomId),DateUtils.addDays(day,1),OrderTypeEnum.RESERVER.getCode())); voList.addAll(generatorRoomStatusList(store, roomId, orderMap.get(roomId), finalCleanRecordMap.get(roomId), DateUtils.addDays(day, 1), OrderTypeEnum.RESERVER.getCode()));
}); });
return voList; return voList;
} }
......
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 to comment