| | |
| | | @Transactional(rollbackFor = {BusinessException.class, Exception.class}) |
| | | public Integer create(Bookings bookings) { |
| | | LoginUserInfo user = bookings.getLoginUserInfo(); |
| | | user.setId(bookings.getCreator()); |
| | | isCreateParamValid(bookings, user); |
| | | bookings.setCreateDate(new Date()); |
| | | bookings.setCreator(user.getId()); |
| | |
| | | for (int i = 0; i < bookings.getBookingTimeList().size(); i++) { |
| | | BookingTime s = bookings.getBookingTimeList().get(i); |
| | | if (!Objects.isNull(bookList) && bookList.size() > MeetConstants.ZERO) { |
| | | |
| | | List<Bookings> detailDataDtoStream = |
| | | bookList.stream().filter(a -> MeetConstants.equalsInteger(s.getTimeId(), a.getRoomTimeId()) |
| | | ).collect(Collectors.toList()); |
| | |
| | | page.getRecords().forEach(j->{ |
| | | j.setPrefixUrl(path); |
| | | if(bookingsMapper.selectCount(new QueryWrapper<Bookings>() |
| | | .exists(" select 1 from meeting_user_rel u where u.OBJ_ID = bookings.id and u.USER_ID = '"+j.getId()+"' and u.OBJ_TYPE = 1 ") |
| | | .exists(" select 1 from meeting_user_rel u where u.OBJ_ID = meeting_book.id and u.USER_ID = '"+j.getId()+"' and u.OBJ_TYPE = 1 ") |
| | | .and(i -> i.between("START_TIME", pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") |
| | | .or().between("END_TIME", pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") |
| | | ) |