|
|
|
@ -1942,6 +1942,18 @@ public class FltPlanQueryRepository {
|
|
|
|
|
} |
|
|
|
|
Instant now = Instant.now(); |
|
|
|
|
|
|
|
|
|
ZoneId databaseTimeZone = ZoneId.of("Asia/Seoul"); |
|
|
|
|
|
|
|
|
|
LocalDate currentDate = LocalDate.now(ZoneId.of("Asia/Seoul")); |
|
|
|
|
Instant startOfToday = currentDate.atTime(LocalTime.MIN).atZone(databaseTimeZone).toInstant(); |
|
|
|
|
Instant startOfTomorrow = currentDate.plusDays(1).atTime(LocalTime.MIN).atZone(databaseTimeZone).toInstant(); |
|
|
|
|
|
|
|
|
|
builder.and( |
|
|
|
|
ccb.cntrlStDt.between(startOfToday, startOfTomorrow) |
|
|
|
|
.or(fpb.schFltStDt.loe(now).and(fpb.schFltEndDt.goe(now))) |
|
|
|
|
) |
|
|
|
|
.and(fpb.planSno.isNotNull()); |
|
|
|
|
|
|
|
|
|
List<MainDashFlightListModel> result = query |
|
|
|
|
.select(Projections.bean(MainDashFlightListModel.class, |
|
|
|
|
pgb.groupNm, |
|
|
|
@ -1966,18 +1978,7 @@ public class FltPlanQueryRepository {
|
|
|
|
|
.leftJoin(cib).on(cib.idntfNum.eq(fpa.idntfNum)) |
|
|
|
|
.leftJoin(fpccr).on(fpccr.planSno.eq(fpb.planSno)) |
|
|
|
|
.leftJoin(ccb).on(ccb.cntrlId.eq(fpccr.cntrlId)) |
|
|
|
|
.where( |
|
|
|
|
builder |
|
|
|
|
.and(ccb.cntrlStDt.between( |
|
|
|
|
now.atZone(ZoneId.of("Asia/Seoul")).truncatedTo(ChronoUnit.DAYS).toInstant(), |
|
|
|
|
now.atZone(ZoneId.of("Asia/Seoul")).truncatedTo(ChronoUnit.DAYS).plus(1, ChronoUnit.DAYS).toInstant() |
|
|
|
|
)) |
|
|
|
|
.and(ccb.cntrlEndDt.between( |
|
|
|
|
now.atZone(ZoneId.of("Asia/Seoul")).truncatedTo(ChronoUnit.DAYS).toInstant(), |
|
|
|
|
now.atZone(ZoneId.of("Asia/Seoul")).truncatedTo(ChronoUnit.DAYS).plus(1, ChronoUnit.DAYS).toInstant() |
|
|
|
|
)) |
|
|
|
|
.and(fpb.planSno.isNotNull()) |
|
|
|
|
) |
|
|
|
|
.where(builder) |
|
|
|
|
.orderBy(((ComparableExpressionBase<Integer>) groupOrder).desc(), cib.createDt.asc()) |
|
|
|
|
.fetch(); |
|
|
|
|
|
|
|
|
@ -2000,6 +2001,18 @@ public class FltPlanQueryRepository {
|
|
|
|
|
} |
|
|
|
|
Instant now = Instant.now(); |
|
|
|
|
|
|
|
|
|
ZoneId databaseTimeZone = ZoneId.of("Asia/Seoul"); |
|
|
|
|
|
|
|
|
|
LocalDate currentDate = LocalDate.now(ZoneId.of("Asia/Seoul")); |
|
|
|
|
Instant startOfToday = currentDate.atTime(LocalTime.MIN).atZone(databaseTimeZone).toInstant(); |
|
|
|
|
Instant startOfTomorrow = currentDate.plusDays(1).atTime(LocalTime.MIN).atZone(databaseTimeZone).toInstant(); |
|
|
|
|
|
|
|
|
|
builder.and( |
|
|
|
|
ccb.cntrlStDt.between(startOfToday, startOfTomorrow) |
|
|
|
|
.or(fpb.schFltStDt.loe(now).and(fpb.schFltEndDt.goe(now))) |
|
|
|
|
) |
|
|
|
|
.and(fpb.planSno.isNotNull()); |
|
|
|
|
|
|
|
|
|
List<Tuple> res = query |
|
|
|
|
.select( |
|
|
|
|
new CaseBuilder() |
|
|
|
@ -2015,18 +2028,7 @@ public class FltPlanQueryRepository {
|
|
|
|
|
.leftJoin(cib).on(cib.idntfNum.eq(fpa.idntfNum)) |
|
|
|
|
.leftJoin(fpccr).on(fpccr.planSno.eq(fpb.planSno)) |
|
|
|
|
.leftJoin(ccb).on(ccb.cntrlId.eq(fpccr.cntrlId)) |
|
|
|
|
.where( |
|
|
|
|
builder |
|
|
|
|
.and(ccb.cntrlStDt.between( |
|
|
|
|
now.atZone(ZoneId.of("Asia/Seoul")).truncatedTo(ChronoUnit.DAYS).toInstant(), |
|
|
|
|
now.atZone(ZoneId.of("Asia/Seoul")).truncatedTo(ChronoUnit.DAYS).plus(1, ChronoUnit.DAYS).toInstant() |
|
|
|
|
)) |
|
|
|
|
.and(ccb.cntrlEndDt.between( |
|
|
|
|
now.atZone(ZoneId.of("Asia/Seoul")).truncatedTo(ChronoUnit.DAYS).toInstant(), |
|
|
|
|
now.atZone(ZoneId.of("Asia/Seoul")).truncatedTo(ChronoUnit.DAYS).plus(1, ChronoUnit.DAYS).toInstant() |
|
|
|
|
)) |
|
|
|
|
.and(fpb.planSno.isNotNull()) |
|
|
|
|
) |
|
|
|
|
.where(builder) |
|
|
|
|
.groupBy(ccb.statusCd) |
|
|
|
|
.fetch(); |
|
|
|
|
|
|
|
|
|