Commit c0313858 by wuwenlong

Merge branch 'dev' into test

parents e60a1dc7 ee78c786
...@@ -19,6 +19,7 @@ import share.system.domain.vo.RoomStatusVo; ...@@ -19,6 +19,7 @@ import share.system.domain.vo.RoomStatusVo;
import share.system.service.*; import share.system.service.*;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @Author wwl * @Author wwl
...@@ -69,11 +70,12 @@ public class RoomStatusServiceImpl implements RoomStatusService { ...@@ -69,11 +70,12 @@ public class RoomStatusServiceImpl implements RoomStatusService {
SStore store = storeService.getById(storeId); SStore store = storeService.getById(storeId);
// 通过门店及房间查询指定日期T+1的订单 // 通过门店及房间查询指定日期T+1的订单
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,SCleanRecords> cleanRecordMap = cleanRecordsService.lastCleanRoomByRoomIds(roomIds); Map<Long,SCleanRecords> cleanRecordMap = cleanRecordsService.lastCleanRoomByRoomIds(roomIds);
List<RoomStatusVo> voList = new ArrayList<>(); List<RoomStatusVo> voList = new ArrayList<>();
roomIds.stream().forEach(roomId -> { roomIds.stream().forEach(roomId -> {
voList.addAll(generatorRoomStatusList(store,roomId,orderList,cleanRecordMap.get(roomId),day,OrderTypeEnum.RESERVER.getCode())); voList.addAll(generatorRoomStatusList(store,roomId,orderMap.get(roomId),cleanRecordMap.get(roomId),day,OrderTypeEnum.RESERVER.getCode()));
voList.addAll(generatorRoomStatusList(store,roomId,orderList,cleanRecordMap.get(roomId),DateUtils.addDays(day,1),OrderTypeEnum.RESERVER.getCode())); voList.addAll(generatorRoomStatusList(store,roomId,orderMap.get(roomId),cleanRecordMap.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