|
@@ -113,16 +113,16 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
if(Objects.isNull(currentCourseDetail)){
|
|
|
throw new BizException("课程不存在");
|
|
|
}
|
|
|
- SysConfigRealType<Integer> realValueByParamName = sysConfigService.findRealValueByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_TIME_RANGE);
|
|
|
+ SysConfig sysConfig = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_TIME_RANGE);
|
|
|
YesOrNoEnum yesOrNoEnum = enableOnlyNormalAttendance(currentCourseDetail.getStartClassTime(),
|
|
|
user.getId().longValue(),
|
|
|
true,
|
|
|
currentCourseDetail.getSchoolId().intValue());
|
|
|
currentCourseDetail.setOnlyNormal(yesOrNoEnum);
|
|
|
currentCourseDetail.setCurrentClassTimes(courseScheduleDao.countClassGroupOverCourseNum(currentCourseDetail.getClassId()));
|
|
|
-// currentCourseDetail.setEnableStudentAttendanceTimeRange(realValueByParamName.getRealTypeValue());
|
|
|
-// int i = studentAttendanceDao.countByCourseSchedule(courseID);
|
|
|
-// currentCourseDetail.setStudentAttendanceIsFirstTime(i>0?0:1);
|
|
|
+ currentCourseDetail.setEnableStudentAttendanceTimeRange(sysConfig.getParanValue(Integer.class));
|
|
|
+ int i = studentAttendanceDao.countByCourseSchedule(courseID);
|
|
|
+ currentCourseDetail.setStudentAttendanceIsFirstTime(i>0?0:1);
|
|
|
|
|
|
currentCourseDetail.setCurrentTime(new Date());
|
|
|
currentCourseDetail.setAdvanceSignInMinutes(Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.ADVANCE_SIGN_IN_MINUTES)));
|