|
|
@ -261,16 +261,21 @@ public class MainDashService { |
|
|
|
|
|
|
|
|
|
|
|
public List<MainDashFlightNumStcsModel> dailyFlightNumOfStcs(){ |
|
|
|
public List<MainDashFlightNumStcsModel> dailyFlightNumOfStcs(){ |
|
|
|
// 1. 전일 , 금일, 명일(내일)
|
|
|
|
// 1. 전일 , 금일, 명일(내일)
|
|
|
|
Instant yesterday = Instant.now().minus(1, ChronoUnit.DAYS); |
|
|
|
Instant yesterdayStart = Instant.now().minus(1, ChronoUnit.DAYS).truncatedTo(ChronoUnit.DAYS); |
|
|
|
Instant today = Instant.now(); |
|
|
|
Instant yesterdayEnd = Instant.now().truncatedTo(ChronoUnit.DAYS).minus(1, ChronoUnit.SECONDS); |
|
|
|
Instant tomorrow = Instant.now().plus(1, ChronoUnit.DAYS); |
|
|
|
Instant todayStart = Instant.now().truncatedTo(ChronoUnit.DAYS); |
|
|
|
|
|
|
|
Instant todayEnd = Instant.now().plus(1, ChronoUnit.DAYS).minus(1, ChronoUnit.SECONDS); |
|
|
|
long yesterdayCount = fltPlanBasRepository.countByAprvlYnAndAprvlDtBetween("Y", yesterday, today); |
|
|
|
Instant tomorrowStart = Instant.now().plus(1, ChronoUnit.DAYS).truncatedTo(ChronoUnit.DAYS); |
|
|
|
log.info("yesterdayCount : {}", yesterdayCount); |
|
|
|
Instant tomorrowEnd = Instant.now().plus(2, ChronoUnit.DAYS).minus(1, ChronoUnit.SECONDS); |
|
|
|
long todayCount = fltPlanBasRepository.countByAprvlYnAndAprvlDtBetween("Y", today, today.plus(1, ChronoUnit.DAYS)); |
|
|
|
|
|
|
|
log.info("todayCount : {}", todayCount); |
|
|
|
long yesterdayCount = fltPlanBasRepository.countByAprvlYnAndAprvlDtBetween("Y", yesterdayStart, yesterdayEnd); |
|
|
|
long tomorrowCount = fltPlanBasRepository.countByAprvlYnAndAprvlDtBetween("Y", tomorrow, tomorrow.plus(1, ChronoUnit.DAYS)); |
|
|
|
log.info("yesterdayCount: {}", yesterdayCount); |
|
|
|
log.info("tomorrowCount : {} ", tomorrowCount); |
|
|
|
|
|
|
|
|
|
|
|
long todayCount = fltPlanBasRepository.countByAprvlYnAndAprvlDtBetween("Y", todayStart, todayEnd); |
|
|
|
|
|
|
|
log.info("todayCount: {}", todayCount); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long tomorrowCount = fltPlanBasRepository.countByAprvlYnAndAprvlDtBetween("Y", tomorrowStart, tomorrowEnd); |
|
|
|
|
|
|
|
log.info("tomorrowCount: {}", tomorrowCount); |
|
|
|
|
|
|
|
|
|
|
|
// 카운트와 함께 MainDashFlightNumStcsModel 인스턴스 생성
|
|
|
|
// 카운트와 함께 MainDashFlightNumStcsModel 인스턴스 생성
|
|
|
|
List<MainDashFlightNumStcsModel> result = new ArrayList<>(); |
|
|
|
List<MainDashFlightNumStcsModel> result = new ArrayList<>(); |
|
|
|