<%=arryCurDate[1]%>월 <%=arryCurDate[2]%>일 예약현황
예약가능
예약불가
선택
<%
if(faceSid == null) {
faceSid = String.valueOf(faceList.get(0).getFaceSid());
}
timeVO.setFacilityCd(facilityVO.getFacilityCd());
timeVO.setReservation_dt(searchDate);
timeVO.setFaceSid(Long.parseLong(faceSid));
List timeList = facilityUserService.selectFacilityTimeList(timeVO);
if(timeList== null) {
%>
<%} else {
if(facltId == null) {
if(timeList.size() > 0 ) {
SportFacilityTimeVO timeVO3 = timeList.get(0);
facltId = timeVO3.getFacltId() + "";
}
}
Date timeStart = sportFormat.parse("2025-04-01");
Date timeEnd = sportFormat.parse("2025-12-31");
Date timeEnd2 = sportFormat.parse("2025-12-31");
Date formatCurDate = sportFormat.parse(searchDate);
Calendar timCal = Calendar.getInstance();
timCal.setTime(formatCurDate);
int timeWeek = timCal.get(Calendar.DAY_OF_WEEK);
int index = 0;
for(SportFacilityTimeVO timeVO1: timeList) {
String classNm = "";
String emNm = "";
index = index + 1;
SportFacilityApplicantVO applicantVO1 = new SportFacilityApplicantVO();
applicantVO1.setFacltId(timeVO1.getFacltId());
applicantVO1.setFaceSid(Long.parseLong(faceSid));
applicantVO1.setReservation_dt(searchDate);
int aplyCntCk = 0;
if("SF09".equals(facilityVO.getCommonCode3())) {
List applicantTimeList = facilityUserService.selectGolfCountList(applicantVO1);
if(applicantTimeList != null) {
if(applicantTimeList.size() > 0 ) {
for(SportFacilityApplicantTimeVO applicantTimeVO : applicantTimeList) {
long ck = applicantTimeVO.getCapacity();
aplyCntCk = aplyCntCk + (int) ck;
}
}
}
} else {
aplyCntCk = facilityUserService.searchDateApplyCnt(applicantVO1);
}
//현재부터 3-90 사이에 on
if (startDate.compareTo(formatCurDate) <= 0 && endDate.compareTo(formatCurDate) >= 0) {
// 파크 골프장은 수용 인원보다 적어야 예약 가능 파크 골프장 외에는 한팀씩만 받음 SF09는 파크골프장 코드
if(("SF09".equals(facilityVO.getCommonCode3()) && aplyCntCk < facilityVO.getCapacity())) {
classNm += "on";
emNm += "("
+ aplyCntCk
+ " /"
+ facilityVO.getCapacity()
+ ") ";
}
// 나머지 한팀씩만 예약 받음
if(!"SF09".equals(facilityVO.getCommonCode3()) && aplyCntCk <= 0) {
classNm += "on";
if(Long.parseLong(facltId) == timeVO1.getFacltId()) {
// classNm += " active";
}
}
if(timeStart.compareTo(formatCurDate) <= 0 && timeEnd.compareTo(formatCurDate) >= 0){
if((timeWeek == 2 || timeWeek == 3 || timeWeek == 4 || timeWeek == 5 || timeWeek == 6) && (Long.parseLong(faceSid) == 59 || Long.parseLong(faceSid) == 60 || Long.parseLong(faceSid) == 62 || Long.parseLong(faceSid) == 63) && (timeVO1.getFacltId() == 646 || timeVO1.getFacltId() == 647 || timeVO1.getFacltId() == 648 || timeVO1.getFacltId() == 649)){
classNm = "";
}else if((timeWeek == 2 || timeWeek == 3 || timeWeek == 4 || timeWeek == 5 || timeWeek == 6) && (Long.parseLong(faceSid) == 61) && (timeVO1.getFacltId() == 647 || timeVO1.getFacltId() == 648)){
classNm = "";
}else if((timeWeek == 3 || timeWeek == 5) && (Long.parseLong(faceSid) == 64) && (timeVO1.getFacltId() == 647 || timeVO1.getFacltId() == 648)){
classNm = "";
}
if((timeWeek == 2 || timeWeek == 3 || timeWeek == 4 || timeWeek == 5 || timeWeek == 6) && (timeVO1.getFacltId() == 625 || timeVO1.getFacltId() == 626) && (Long.parseLong(faceSid) == 74 || Long.parseLong(faceSid) == 75)){
classNm = "";
}
// else if((timeWeek == 1 || timeWeek == 7) && (timeVO1.getFacltId() == 629 || timeVO1.getFacltId() == 630 || timeVO1.getFacltId() == 631) && (Long.parseLong(faceSid) == 74 || Long.parseLong(faceSid) == 75)){
// classNm = "";
// }
}
if(timeStart.compareTo(formatCurDate) < 0 && timeEnd2.compareTo(formatCurDate) > 0){
if((timeWeek == 2 || timeWeek == 3 || timeWeek == 4 || timeWeek == 5 || timeWeek == 6) && (timeVO1.getFacltId() == 625 || timeVO1.getFacltId() == 626) && (Long.parseLong(faceSid) == 74 || Long.parseLong(faceSid) == 75)){
classNm = "";
}else if((timeWeek == 4 || timeWeek == 5 || timeWeek == 6) && ( timeVO1.getFacltId() == 629 || timeVO1.getFacltId() == 630) && (Long.parseLong(faceSid) == 74 || Long.parseLong(faceSid) == 75)){
classNm = "";
}else if((timeWeek == 1 || timeWeek == 7) && (timeVO1.getFacltId() == 625 || timeVO1.getFacltId() == 626 || timeVO1.getFacltId() == 627) && (Long.parseLong(faceSid) == 74 || Long.parseLong(faceSid) == 75)){
classNm = "";
}
}
if((timeWeek == 2 || timeWeek == 3 || timeWeek == 4 || timeWeek == 5 || timeWeek == 6) && (Long.parseLong(faceSid) == 70 || Long.parseLong(faceSid) == 71) && (timeVO1.getFacltId() == 677 || timeVO1.getFacltId() == 678)){ // 후포테니스장
classNm = "";
}
if((timeWeek == 2 || timeWeek == 3 || timeWeek == 4 || timeWeek == 5 || timeWeek == 6 || timeWeek == 7) && (Long.parseLong(faceSid) == 51 || Long.parseLong(faceSid) == 52 || Long.parseLong(faceSid) == 53 || Long.parseLong(faceSid) == 54) && (timeVO1.getFacltId() == 702 || timeVO1.getFacltId() == 703)){ // 평해테니스장
classNm = "";
}
if((timeWeek == 2 || timeWeek == 3 || timeWeek == 4 || timeWeek == 5 || timeWeek == 6) && (Long.parseLong(faceSid) == 67 || Long.parseLong(faceSid) == 68 || Long.parseLong(faceSid) == 69) && (timeVO1.getFacltId() == 756 || timeVO1.getFacltId() == 757)){ // 죽변테니스장
classNm = "";
}
if((timeWeek == 2 || timeWeek == 3 || timeWeek == 4 || timeWeek == 5 || timeWeek == 6) && (Long.parseLong(faceSid) == 58) && (timeVO1.getFacltId() == 743 || timeVO1.getFacltId() == 744)){ // 흥부테니스장
classNm = "";
}
if((timeWeek == 2 || timeWeek == 3 || timeWeek == 4 || timeWeek == 5 || timeWeek == 6) && (Long.parseLong(faceSid) == 2 || Long.parseLong(faceSid) == 71) && (timeVO1.getFacltId() == 549 || timeVO1.getFacltId() == 622 || timeVO1.getFacltId() == 692 || timeVO1.getFacltId() == 693)){ // 평해축구장(인조)
classNm = "";
}
if((timeWeek == 4) && (Long.parseLong(faceSid) == 35) && (timeVO1.getFacltId() == 767 || timeVO1.getFacltId() == 768 || timeVO1.getFacltId() == 769)){ //죽변야구장
classNm = "";
}
if((timeWeek == 7) && (Long.parseLong(faceSid) == 35) && (timeVO1.getFacltId() == 329 || timeVO1.getFacltId() == 599 || timeVO1.getFacltId() == 764)){//죽변야구장
classNm = "";
}
if((timeWeek == 2 || timeWeek == 3 || timeWeek == 4 || timeWeek == 5 || timeWeek == 6) && (Long.parseLong(faceSid) == 78) && (timeVO1.getFacltId() == 653 || timeVO1.getFacltId() == 654)){ // 울진 족구장
classNm = "";
}
}
%>
<%=timeVO1.getTimeNm()%> <%=emNm%>
<%if("SF09".equals(facilityVO.getCommonCode3()) && "".equals(classNm)){%>
(<%=aplyCntCk%> /<%=facilityVO.getCapacity()%>)
<%}%>
<%
}
}
%>
<%if("SF09".equals(facilityVO.getCommonCode3())){%>
파크골프장 내에서 거짓 또는 부정한 방법으로 신청하거나 영리행위를 하는 등 공익상 부적당하다고 인정되는 경우, 허가가 취소될 수 있음을 확인합니다.
<%}else{%>
<% } %>
<%
if(Integer.parseInt(nowT) >= 209 && Integer.parseInt(nowT) <= 617){%>
예약하기
<% } %>