|
@@ -925,17 +925,28 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
|
|
|
@Override
|
|
|
public boolean updateCourseScheduleToOverStatus() {
|
|
|
+
|
|
|
+ Date date = new Date();
|
|
|
+ List<StudentAttendance> studentAttendanceList = courseScheduleDao.queryUnsignedStudentList();
|
|
|
+ for (StudentAttendance studentAttendance : studentAttendanceList) {
|
|
|
+ studentAttendance.setStatus(StudentAttendanceStatusEnum.TRUANT);
|
|
|
+ studentAttendance.setCreateTime(date);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (studentAttendanceList != null && studentAttendanceList.size() > 0) {
|
|
|
+ studentAttendanceDao.batchUpdate(studentAttendanceList);
|
|
|
+ }
|
|
|
+
|
|
|
List<CourseSchedule> list = courseScheduleDao.queryFinishedWithNoUpdateStatus();
|
|
|
|
|
|
List<CourseSchedule> updateList = new ArrayList<CourseSchedule>();
|
|
|
- Date date = new Date();
|
|
|
List<Integer> classGroups = new ArrayList<Integer>();
|
|
|
for (CourseSchedule courseSchedule : list) {
|
|
|
courseSchedule.setStatus(CourseStatusEnum.OVER);
|
|
|
courseSchedule.setUpdateTime(date);
|
|
|
updateList.add(courseSchedule);
|
|
|
-
|
|
|
- if(!classGroups.contains(courseSchedule.getClassGroupId())){
|
|
|
+
|
|
|
+ if (!classGroups.contains(courseSchedule.getClassGroupId())) {
|
|
|
classGroups.add(courseSchedule.getClassGroupId());
|
|
|
}
|
|
|
}
|
|
@@ -943,12 +954,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if (updateList.size() > 0) {
|
|
|
courseScheduleDao.batchUpdate(updateList);
|
|
|
}
|
|
|
-
|
|
|
- //更新班级课次
|
|
|
- if(classGroups.size()>0){
|
|
|
+
|
|
|
+ // 更新班级课次
|
|
|
+ if (classGroups.size() > 0) {
|
|
|
classGroupService.batchIncreaseClassTimes(classGroups);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|