|
|
@@ -63,6 +63,7 @@ import java.io.IOException;
|
|
|
import java.text.ParseException;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.time.LocalTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.time.temporal.ChronoUnit;
|
|
|
import java.util.ArrayList;
|
|
|
@@ -194,7 +195,8 @@ public class AttendanceStatisticsServiceImpl extends MPJBaseServiceImpl<Attendan
|
|
|
|
|
|
List<LocalDate> dateList2 = getDatesBetween(statistics.getStartDate(), statistics.getEndDate());
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
- if (dateList2.contains(now.toLocalDate())) {
|
|
|
+
|
|
|
+ if (dateList2.contains(now.toLocalDate()) && (statistics.getTimePeriod() == 1 && now.toLocalTime().isBefore(LocalTime.MIDNIGHT))) {
|
|
|
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
String sql = "DELETE FROM teacher_attendance_record WHERE attendance_date = '" + now.toLocalDate().format(dtf) + "'" +
|
|
|
" AND time_interval = " + statistics.getTimePeriod();
|