| | |
| | | //取消会议 发送取消通知 |
| | | this.sendNotice(bookings, 3); |
| | | //发送微信订阅通知 |
| | | sendWxMessage.bookingsCancel(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); |
| | | // sendWxMessage.bookingsCancel(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); |
| | | } |
| | | |
| | | |
| | |
| | | if (!bookings.getCreator().equals(businessOverDTO.getUserId()) && userRelList <= 0) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "非你的预约记录,无法进行该操作"); |
| | | } |
| | | if (System.currentTimeMillis() < bookings.getStartTime().getTime()) { |
| | | if (System.currentTimeMillis() < bookings.getStartTimeReal().getTime()) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "会议未开始,无法进行结束,如需该操作请使用取消功能"); |
| | | } |
| | | if (System.currentTimeMillis() > bookings.getEndTime().getTime()) { |
| | |
| | | .eq(Bookings::getRoomId,bookings.getRoomId()) |
| | | .ne(Bookings::getId,bookings.getId()) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在未开启会议,无法进行开始会议"); |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在未开启会议,无法开始会议"); |
| | | }; |
| | | |
| | | if(bookingsMapper.selectCount(new QueryWrapper<Bookings>() |
| | | .lambda() |
| | | .apply(" ( END_TIME > now() and START_TIME < now() ) or ( END_TIME > now() and START_TIME_REAL < now() ) ") |
| | | .apply(" ( ( END_TIME > now() and START_TIME < now() ) or ( END_TIME > now() and START_TIME_REAL < now() ) ) ") |
| | | .isNotNull(Bookings::getStartTimeReal) |
| | | .isNull(Bookings::getDoneDate) |
| | | .eq(Bookings::getStatus,Constants.ZERO) |
| | | .eq(Bookings::getRoomId,bookings.getRoomId()) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"当前开启时间与其他会议存在冲突,无法进行开始会议"); |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"当前开启时间与其他会议存在冲突,无法开始会议"); |
| | | }; |
| | | }else{ |
| | | if(bookings.getStartTime().getTime() > System.currentTimeMillis()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未到会议申请开始时间,无法进行开始"); |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未到会议申请开始时间,无法开始"); |
| | | } |
| | | } |
| | | bookings.setStartTimeReal(new Date()); |