Browse Source

.

pull/16/head
박재우 10 months ago
parent
commit
dd7f4286b4
  1. 26
      pav-server/src/main/java/com/palnet/biz/jpa/repository/flt/FltPlanQueryRepository.java

26
pav-server/src/main/java/com/palnet/biz/jpa/repository/flt/FltPlanQueryRepository.java

@ -1948,11 +1948,11 @@ public class FltPlanQueryRepository {
Instant startOfToday = currentDate.atTime(LocalTime.MIN).atZone(databaseTimeZone).toInstant(); Instant startOfToday = currentDate.atTime(LocalTime.MIN).atZone(databaseTimeZone).toInstant();
Instant startOfTomorrow = currentDate.plusDays(1).atTime(LocalTime.MIN).atZone(databaseTimeZone).toInstant(); Instant startOfTomorrow = currentDate.plusDays(1).atTime(LocalTime.MIN).atZone(databaseTimeZone).toInstant();
builder.and( // builder.and(
ccb.createDt.between(startOfToday, startOfTomorrow) // ccb.createDt.between(startOfToday, startOfTomorrow)
.or(fpb.createDt.between(startOfToday, startOfTomorrow)) // .or(fpb.createDt.between(startOfToday, startOfTomorrow))
) // )
.and(fpb.planSno.isNotNull()); // .and(fpb.planSno.isNotNull());
List<MainDashFlightListModel> result = query List<MainDashFlightListModel> result = query
.select(Projections.bean(MainDashFlightListModel.class, .select(Projections.bean(MainDashFlightListModel.class,
@ -1967,9 +1967,9 @@ public class FltPlanQueryRepository {
ccb.cntrlStDt ccb.cntrlStDt
).as("totalFlightTime"), ).as("totalFlightTime"),
new CaseBuilder() new CaseBuilder()
.when(ccb.statusCd.eq("01")).then("비행 중") .when(ccb.statusCd.eq("01")).then("inFlight")
.when(ccb.statusCd.eq("99")).then("비행 완료") .when(ccb.statusCd.eq("99")).then("flightComplete")
.when(fpb.planSno.isNotNull()).then("비행 대기 중") .when(fpb.planSno.isNotNull()).then("flightWaiting")
.otherwise("비행 없음").as("status") .otherwise("비행 없음").as("status")
)) ))
.from(fpa) .from(fpa)
@ -2007,11 +2007,11 @@ public class FltPlanQueryRepository {
Instant startOfToday = currentDate.atTime(LocalTime.MIN).atZone(databaseTimeZone).toInstant(); Instant startOfToday = currentDate.atTime(LocalTime.MIN).atZone(databaseTimeZone).toInstant();
Instant startOfTomorrow = currentDate.plusDays(1).atTime(LocalTime.MIN).atZone(databaseTimeZone).toInstant(); Instant startOfTomorrow = currentDate.plusDays(1).atTime(LocalTime.MIN).atZone(databaseTimeZone).toInstant();
builder.and( // builder.and(
ccb.createDt.between(startOfToday, startOfTomorrow) // ccb.createDt.between(startOfToday, startOfTomorrow)
.or(fpb.createDt.between(startOfToday, startOfTomorrow)) // .or(fpb.createDt.between(startOfToday, startOfTomorrow))
) // )
.and(fpb.planSno.isNotNull()); // .and(fpb.planSno.isNotNull());
List<Tuple> res = query List<Tuple> res = query
.select( .select(

Loading…
Cancel
Save