| | |
| | | bookquery.selectAs(BookingTime::getTimeId, Bookings::getRoomTimeId); |
| | | bookquery.selectAs(BookingTime::getId, Bookings::getBookingTimeId); |
| | | bookquery.eq(Bookings::getIsdeleted, Constants.ZERO); |
| | | bookquery.eq(BookingTime::getIsdeleted, Constants.ZERO); |
| | | bookquery.eq(Bookings::getRoomId, roomTime.getRoomId()); |
| | | bookquery.eq(Bookings::getStatus,Constants.ZERO); |
| | | bookquery.apply("DATE_FORMAT(t.START_TIME,'%Y-%m-%d') = DATE_FORMAT('" + DateUtil.dateToString(roomTime.getYudingDate(), "yyyy-MM-dd") + "','%Y-%m-%d') "); |
| | |
| | | RoomTime s = list.get(i); |
| | | s.setIsUse(false); |
| | | s.setIsChoose(false); |
| | | String now = format.format(roomTime.getYudingDate())+" "+s.getStartTime()+":00"; |
| | | String now = format.format(roomTime.getYudingDate())+" "+s.getEndTime()+":00"; |
| | | try { |
| | | Date com=format1.parse(now); |
| | | if(flag){ |
| | |
| | | bookList.stream().forEach(a -> { |
| | | if (Constants.equalsInteger(s.getId(), a.getRoomTimeId())) { |
| | | s.setIsUse(true); |
| | | } |
| | | if (roomTime.getBookingId() != null && Constants.equalsInteger(roomTime.getBookingId(), a.getId())) { |
| | | if (Constants.equalsInteger(a.getRoomTimeId(), s.getId())) { |
| | | s.setIsChoose(true); |
| | | // s.setIsUse(false); |
| | | s.setBookingTimeId(a.getBookingTimeId()); |
| | | } |
| | | s.setIsChoose(true); |
| | | s.setBookingTimeId(a.getId()); |
| | | } |
| | | }); |
| | | |