|
@@ -163,7 +163,7 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
|
|
|
int remindNum = studentAttendanceDao.countNormalRemindNum(courseScheduleId);
|
|
|
studentAttendanceDao.deleteStudentAttendancesByCourse(courseScheduleId);
|
|
|
int classTimes = courseScheduleDao.countClassTimes(courseSchedule.getClassGroupId().longValue(), courseSchedule.getStartClassTime());
|
|
|
- String month = DateUtil.format(date, DateUtil.ISO_YEAR_MONTH_FORMAT);
|
|
|
+ String month = DateUtil.format(courseSchedule.getClassDate(), DateUtil.ISO_YEAR_MONTH_FORMAT);
|
|
|
studentAttendances.forEach(studentAttendance -> {
|
|
|
studentAttendance.setTeacherId(sysUser.getId());
|
|
|
studentAttendance.setCurrentClassTimes(classTimes + 1);
|
|
@@ -320,7 +320,7 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
|
|
|
throw new BizException("此课程已结算");
|
|
|
}
|
|
|
|
|
|
- String month = DateUtil.format(new Date(), DateUtil.ISO_YEAR_MONTH_FORMAT);
|
|
|
+ String month = DateUtil.format(courseSchedule.getClassDate(), DateUtil.ISO_YEAR_MONTH_FORMAT);
|
|
|
|
|
|
List<Integer> userIds = studentAttendances.stream().map(StudentAttendance::getUserId).collect(Collectors.toList());
|
|
|
studentAttendanceDao.deleteStudentAttendancesByCourseAndUsers(studentAttendanceInfo.getCourseScheduleId().longValue(), userIds);
|
|
@@ -431,7 +431,7 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
|
|
|
studentAttendance.setUserId(userId);
|
|
|
studentAttendance.setGroupType(courseSchedule.getGroupType());
|
|
|
studentAttendance.setMusicGroupId(courseSchedule.getMusicGroupId());
|
|
|
- String month = DateUtil.format(new Date(), DateUtil.ISO_YEAR_MONTH_FORMAT);
|
|
|
+ String month = DateUtil.format(courseSchedule.getClassDate(), DateUtil.ISO_YEAR_MONTH_FORMAT);
|
|
|
int leaveNum = studentAttendanceDao.getLeaveNum(userId,month,studentAttendance.getId());
|
|
|
if(leaveNum == 0){
|
|
|
studentAttendance.setFirstLeave(YesOrNoEnum.YES);
|