Jelajahi Sumber

1、课程调整时排除自动补签记录
2、删除请假时班级学生状态更新代码
3、小课过期课程调整生成后加入学生缴费信息
4、vip课点名添加开课前时间限制

Joburgess 5 tahun lalu
induk
melakukan
8dd52a9c57

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SysConfigService.java

@@ -85,6 +85,8 @@ public interface SysConfigService extends BaseService<Long, SysConfig> {
      * vip课程可更新学生签到状态时间限制,课程结束后{}分钟
      */
     String ENABLE_STUDENT_ATTENDANCE_TIME_RANGE_VIP = "enable_student_attendance_time_range_vip";
+
+    String ENABLE_STUDENT_ATTENDANCE_BEFOR_COURSE_START_TIME_RANGE_VIP = "enable_student_attendance_befor_course_start_time_range_vip";
     
     /**
      * 十分钟内最大可发送的短信次数

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentAttendanceServiceImpl.java

@@ -88,6 +88,11 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 		if(courseSchedule.getGroupType().equals(GroupType.MUSIC)){
 			attendanceTimeRange = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_TIME_RANGE);
 		}else{
+			SysConfig beforeAttendanceTimeRange=sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_BEFOR_COURSE_START_TIME_RANGE_VIP);
+			int courseStartTime = DateUtil.minutesBetween(date, courseSchedule.getStartClassTime());
+			if(date.before(courseSchedule.getStartClassTime())&&courseStartTime>beforeAttendanceTimeRange.getParanValue(Integer.class)){
+				throw new BizException("VIP课开课前{}分钟禁止点名",beforeAttendanceTimeRange.getParanValue(Integer.class));
+			}
 			attendanceTimeRange = sysConfigService.findByParamName(SysConfigService.ENABLE_STUDENT_ATTENDANCE_TIME_RANGE_VIP);
 		}
 		int courseEndTime = DateUtil.minutesBetween(courseSchedule.getEndClassTime(), date);