|
|
@@ -19,6 +19,7 @@ import org.jeecg.modules.business.vo.BookingBatchRoomsVo;
|
|
|
import org.jeecg.modules.business.vo.BookingOrderEditVo;
|
|
|
import org.jeecg.modules.business.vo.ExtendBusBookingRoomsVo;
|
|
|
import org.jeecg.modules.rooms.Enum.RoomStatusEnum;
|
|
|
+import org.jeecg.modules.rooms.entity.CesRooms;
|
|
|
import org.jeecg.modules.rooms.service.CesRoomsServiceImpl;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -65,6 +66,9 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
@Resource
|
|
|
private IBusTeamService teamService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private CesRoomsServiceImpl roomsService;
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public String bookingOrderSave(BookingOrderSaveDto item, Boolean isTeam) {
|
|
|
@@ -153,6 +157,10 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
long mainCount = item.getRoomIds().stream().filter(t->t.getIsMain()!=null&&t.getIsMain()).count();
|
|
|
|
|
|
item.getRoomIds().forEach(c->{
|
|
|
+ CesRooms room = roomsService.getById(c.getRoomId());
|
|
|
+ if(room == null) throw new JeecgBootException("房间不存在");
|
|
|
+ room.setBookingOrderId(bookingId);
|
|
|
+ roomsService.updateById(room);
|
|
|
|
|
|
BusBookingRooms bookingRoomsItem = new BusBookingRooms();
|
|
|
bookingRoomsItem.setBookingOrdersId(bookingId);
|
|
|
@@ -890,6 +898,12 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
List<BusLivingCustomer> customers = livingData.getRoomIds().stream().filter(s->s.getRoomId().equals(bkRoom.getRoomId())).findFirst().get().getLivingCustomers();
|
|
|
if(customers == null || customers.size() == 0) throw new JeecgBootException("请添加客户信息");
|
|
|
String livingOrderId = bookingToLive(bkRoom.getId(), customers);
|
|
|
+ CesRooms room = roomsService.getById(bkRoom.getRoomId());
|
|
|
+ if(room==null) throw new JeecgBootException("房间不存在");
|
|
|
+ room.setLivingOrderId(livingOrderId);
|
|
|
+ room.setRoomStatus(RoomStatusEnum.LIVE_CLEAR.getKey());
|
|
|
+ roomsService.updateById(room);
|
|
|
+
|
|
|
results.put(bkRoom.getRoomId(),livingOrderId);
|
|
|
});
|
|
|
return results;
|