|
|
@@ -83,27 +83,27 @@ public class AttendanceRecordTask {
|
|
|
LocalDateTime startDateTime = now.withHour(0).withMinute(0).withSecond(0).withNano(0);
|
|
|
LocalDateTime endDateTime = startDateTime.plusDays(1).plusSeconds(-1);
|
|
|
|
|
|
-// if(now.isBefore(noon)){
|
|
|
-// //计算上午考勤
|
|
|
-// teacherAttendanceRecord(startDateTime, endDateTime, 1);
|
|
|
-// }else if(now.isAfter(noon) && now.isBefore(evening)){
|
|
|
-// //计算上午考勤
|
|
|
-// teacherAttendanceRecord(startDateTime, endDateTime, 2);
|
|
|
-// }
|
|
|
-//
|
|
|
-// LocalDateTime beginTime = now.withHour(0).withMinute(58).withSecond(0);
|
|
|
-// LocalDateTime endTime = now.withHour(1).withMinute(3).withSecond(0);
|
|
|
-//
|
|
|
-// //凌晨1点计算前一天的数据
|
|
|
-// if(now.isAfter(beginTime) && now.isBefore(endTime)){
|
|
|
-// startDateTime = now.plusDays(-1).withHour(0).withMinute(0).withSecond(0).withNano(0);
|
|
|
-// endDateTime = startDateTime.plusDays(1).plusSeconds(-1);
|
|
|
-//
|
|
|
-// //计算上午考勤
|
|
|
-// teacherAttendanceRecord(startDateTime, endDateTime, 1);
|
|
|
-// //计算上午考勤
|
|
|
-// teacherAttendanceRecord(startDateTime, endDateTime, 2);
|
|
|
-// }
|
|
|
+ if(now.isBefore(noon)){
|
|
|
+ //计算上午考勤
|
|
|
+ teacherAttendanceRecord(startDateTime, endDateTime, 1);
|
|
|
+ }else if(now.isAfter(noon) && now.isBefore(evening)){
|
|
|
+ //计算上午考勤
|
|
|
+ teacherAttendanceRecord(startDateTime, endDateTime, 2);
|
|
|
+ }
|
|
|
+
|
|
|
+ LocalDateTime beginTime = now.withHour(0).withMinute(58).withSecond(0);
|
|
|
+ LocalDateTime endTime = now.withHour(1).withMinute(3).withSecond(0);
|
|
|
+
|
|
|
+ //凌晨1点计算前一天的数据
|
|
|
+ if(now.isAfter(beginTime) && now.isBefore(endTime)){
|
|
|
+ startDateTime = now.plusDays(-1).withHour(0).withMinute(0).withSecond(0).withNano(0);
|
|
|
+ endDateTime = startDateTime.plusDays(1).plusSeconds(-1);
|
|
|
+
|
|
|
+ //计算上午考勤
|
|
|
+ teacherAttendanceRecord(startDateTime, endDateTime, 1);
|
|
|
+ //计算上午考勤
|
|
|
+ teacherAttendanceRecord(startDateTime, endDateTime, 2);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|