| | |
| | | } |
| | | List<TSitePrice> sitePrice = sitePriceService.list(tSitePriceLambdaQueryWrapper); |
| | | |
| | | SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | |
| | | for (TSitePrice tSitePrice : sitePrice) { |
| | | QuerySiteTimes querySiteTimes = new QuerySiteTimes(); |
| | |
| | | String temp = tSitePrice.getStartTime().substring(0, tSitePrice.getStartTime().length() - 3) + "-" + tSitePrice.getEndTime().substring(0, tSitePrice.getEndTime().length() - 3); |
| | | String timePriceStart = day + " " + tSitePrice.getStartTime().substring(0, tSitePrice.getStartTime().length() - 3); |
| | | String timePriceEnd = day + " " + tSitePrice.getEndTime().substring(0, tSitePrice.getEndTime().length() - 3); |
| | | Date now = new Date(); |
| | | Date start = simpleDateFormat1.parse(timePriceStart); |
| | | Date end = simpleDateFormat1.parse(timePriceEnd); |
| | | // 已经预约了 判断是散客模式还是订场模式 |
| | | Integer flag = 0; |
| | | // 散客预约人数 |
| | |
| | | } |
| | | } |
| | | querySiteTimes.setSelectCount(count); |
| | | if (flag == 0) { |
| | | if (flag == 0 && querySiteTimes.getSelectable() == 1) { |
| | | // 当前时间段还没有预约 |
| | | Integer walkinCapacity = site.getWalkinCapacity(); |
| | | // 计算散客预约人数和最大散客容纳数 |
| | |
| | | }else{ |
| | | if (targetAudience==2){ |
| | | // 散客只能预约当前时间段 |
| | | Date now = new Date(); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | String nowStr = simpleDateFormat.format(now); |
| | | // 判断当前时间有没有在timePriceStart和timePriceEnd之间 |
| | |
| | | siteBooking.setState(1); |
| | | siteBooking.setTargetAudience(reservationSite.getTargetAudience()); |
| | | siteBooking.setInsertTime(new Date()); |
| | | |
| | | siteBooking.setMoney(money+","+playCoin); |
| | | siteBooking.setNextName(reservationSite.getNextName()); |
| | | siteBooking.setIsHalf(reservationSite.getIsHalf()); |
| | | siteBooking.setHalfName(reservationSite.getHalfName()); |