| @@ -1717,7 +1717,11 @@ open class DashboardService( | |||||
| + " SELECT 5 as num" | + " SELECT 5 as num" | ||||
| + " ) numbers" | + " ) numbers" | ||||
| + " WHERE" | + " WHERE" | ||||
| + " DATE(:startdate + INTERVAL numbers.num DAY) BETWEEN :startdate AND DATE_ADD(:startdate, INTERVAL 6 DAY)" | |||||
| + " DATE(:startdate + INTERVAL numbers.num DAY) BETWEEN :startdate AND" | |||||
| + " case" | |||||
| + " when curdate() < DATE_ADD(:startdate, INTERVAL 6 DAY) then curdate()" | |||||
| + " else DATE_ADD(:startdate, INTERVAL 6 DAY)" | |||||
| + " end" | |||||
| + " AND DAYOFWEEK(DATE(:startdate + INTERVAL numbers.num DAY)) BETWEEN 2 AND 6" | + " AND DAYOFWEEK(DATE(:startdate + INTERVAL numbers.num DAY)) BETWEEN 2 AND 6" | ||||
| + " AND DATE(:startdate + INTERVAL numbers.num DAY) not in (select ch.date from company_holiday ch where ch.deleted = 0)" | + " AND DATE(:startdate + INTERVAL numbers.num DAY) not in (select ch.date from company_holiday ch where ch.deleted = 0)" | ||||
| + " AND DATE(:startdate + INTERVAL numbers.num DAY) not in (:publicHolidayList)" | + " AND DATE(:startdate + INTERVAL numbers.num DAY) not in (:publicHolidayList)" | ||||
| @@ -1796,7 +1800,10 @@ open class DashboardService( | |||||
| + " WHERE" | + " WHERE" | ||||
| + " DATE(:startdate + INTERVAL numbers.num DAY) BETWEEN" | + " DATE(:startdate + INTERVAL numbers.num DAY) BETWEEN" | ||||
| + " :startdate AND" | + " :startdate AND" | ||||
| + " CURDATE()" | |||||
| + " case" | |||||
| + " when month(:startdate) >= month(curdate()) then curdate()" | |||||
| + " else LAST_DAY(:startdate)" | |||||
| + " end" | |||||
| + " AND DAYOFWEEK(DATE(:startdate + INTERVAL numbers.num DAY)) BETWEEN 2 AND 6" | + " AND DAYOFWEEK(DATE(:startdate + INTERVAL numbers.num DAY)) BETWEEN 2 AND 6" | ||||
| + " AND DATE(:startdate + INTERVAL numbers.num DAY) not in (select ch.date from company_holiday ch where ch.deleted = 0)" | + " AND DATE(:startdate + INTERVAL numbers.num DAY) not in (select ch.date from company_holiday ch where ch.deleted = 0)" | ||||
| + " AND DATE(:startdate + INTERVAL numbers.num DAY) not in (:publicHolidayList)" | + " AND DATE(:startdate + INTERVAL numbers.num DAY) not in (:publicHolidayList)" | ||||