|
@@ -23,8 +23,10 @@ import org.jeecg.modules.rooms.Enum.RoomStatusEnum;
|
|
|
import org.jeecg.modules.rooms.Vo.BookingRealtimeVo;
|
|
import org.jeecg.modules.rooms.Vo.BookingRealtimeVo;
|
|
|
import org.jeecg.modules.rooms.Vo.FloorBuildingRoomVo;
|
|
import org.jeecg.modules.rooms.Vo.FloorBuildingRoomVo;
|
|
|
import org.jeecg.modules.rooms.Vo.LivingRealtimeVo;
|
|
import org.jeecg.modules.rooms.Vo.LivingRealtimeVo;
|
|
|
|
|
+import org.jeecg.modules.rooms.entity.CesRoomBuildingFloor;
|
|
|
import org.jeecg.modules.rooms.entity.CesRoomLayout;
|
|
import org.jeecg.modules.rooms.entity.CesRoomLayout;
|
|
|
import org.jeecg.modules.rooms.entity.CesRooms;
|
|
import org.jeecg.modules.rooms.entity.CesRooms;
|
|
|
|
|
+import org.jeecg.modules.rooms.service.CesRoomBuildingFloorServiceImpl;
|
|
|
import org.jeecg.modules.rooms.service.CesRoomLayoutServiceImpl;
|
|
import org.jeecg.modules.rooms.service.CesRoomLayoutServiceImpl;
|
|
|
import org.jeecg.modules.rooms.service.CesRoomsServiceImpl;
|
|
import org.jeecg.modules.rooms.service.CesRoomsServiceImpl;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -95,6 +97,9 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
@Resource
|
|
@Resource
|
|
|
private CesRoomLayoutServiceImpl layoutService;
|
|
private CesRoomLayoutServiceImpl layoutService;
|
|
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private CesRoomBuildingFloorServiceImpl buildingFloorService;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public String bookingOrderSave(BookingOrderSaveDto item, Boolean isTeam) {
|
|
public String bookingOrderSave(BookingOrderSaveDto item, Boolean isTeam) {
|
|
@@ -1347,6 +1352,43 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
|
|
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public RiLiFangTaiResultVo riliFangTai(String start, String end, String hotelId) {
|
|
|
|
|
+ RiLiFangTaiResultVo result = new RiLiFangTaiResultVo();
|
|
|
|
|
+ List<RiLiFangTaiVo> riLiFangTaiVos = baseMapper.getRiliFangTai(start,end,hotelId);
|
|
|
|
|
+ result.setRiLiFangTaiVoList(riLiFangTaiVos);
|
|
|
|
|
+ List<CesRoomLayout> layouts = layoutService.list(Wrappers.<CesRoomLayout>query()
|
|
|
|
|
+ .eq("hotel_id",hotelId).eq("invalid",false));
|
|
|
|
|
+ List<CesRooms> rooms = roomsService.list(Wrappers.<CesRooms>query().eq("hotel_id",hotelId).eq("invalid",false));
|
|
|
|
|
+ List<CesRoomBuildingFloor> buildingFloors = buildingFloorService.list(Wrappers.<CesRoomBuildingFloor>query().eq("hotelId",hotelId).eq("invalid",false));
|
|
|
|
|
+ rooms.forEach(s-> {
|
|
|
|
|
+ Optional<CesRoomLayout> opFindLayout = layouts.stream().filter(a->a.getId().equals(s.getLayoutId())).findFirst();
|
|
|
|
|
+ if(!opFindLayout.isPresent()) return;
|
|
|
|
|
+ CesRoomLayout layout = opFindLayout.get();
|
|
|
|
|
+ s.setMarketPrice(layout.getMarketPrice());
|
|
|
|
|
+ s.setLayoutName(layout.getName());
|
|
|
|
|
+ });
|
|
|
|
|
+ List<RiLiLayoutRoomVo> layoutRoomVos = layouts.stream().map(s->{
|
|
|
|
|
+ RiLiLayoutRoomVo item = new RiLiLayoutRoomVo();
|
|
|
|
|
+ item.setId(s.getId());
|
|
|
|
|
+ item.setName(s.getName());
|
|
|
|
|
+ item.setRooms(rooms.stream().filter(a->a.getLayoutId().equals(s.getId())).collect(Collectors.toList()));
|
|
|
|
|
+ return item;
|
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
|
+ List<RiLiFloorRoomVo> floorRoomVos = buildingFloors.stream().filter(s->!s.getParentId().equals("0")).map(s->{
|
|
|
|
|
+ Optional<CesRoomBuildingFloor> floorOptional = buildingFloors.stream().filter(a->a.getId().equals(s.getParentId())).findFirst();
|
|
|
|
|
+ if(!floorOptional.isPresent()) return null;
|
|
|
|
|
+ CesRoomBuildingFloor building = floorOptional.get();
|
|
|
|
|
+ RiLiFloorRoomVo item = new RiLiFloorRoomVo();
|
|
|
|
|
+ item.setId(s.getId());
|
|
|
|
|
+ item.setName(building.getName() + "-" +s.getName());
|
|
|
|
|
+ item.setRooms(rooms.stream().filter(a->a.getFloorId().equals(s.getId())).collect(Collectors.toList()));
|
|
|
|
|
+ return item;
|
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
|
+ result.setFloorRoomVos(floorRoomVos);
|
|
|
|
|
+ result.setLayoutRoomVos(layoutRoomVos);
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
private Boolean mergeSingle(String livingOrderId, String mergeLivingOrderId ) {
|
|
private Boolean mergeSingle(String livingOrderId, String mergeLivingOrderId ) {
|
|
|
BusRoomsLivingOrder mergeLivingOrder = roomsLivingOrderService.getById(mergeLivingOrderId);
|
|
BusRoomsLivingOrder mergeLivingOrder = roomsLivingOrderService.getById(mergeLivingOrderId);
|