Prechádzať zdrojové kódy

fix:请假7天限制拿掉

Joburgess 4 rokov pred
rodič
commit
6a3e8d8234

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

@@ -393,20 +393,10 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
             hours = Integer.parseInt(str);
         }
 
-        int earliestTimeForLeave = 7;
-        SysConfig earliestTimeForLeaveConfig = sysConfigService.findByParamName(SysConfigService.EARLIEST_TIME_FOR_LEAVE);
-        if (Objects.nonNull(earliestTimeForLeaveConfig)) {
-            earliestTimeForLeave = Integer.parseInt(earliestTimeForLeaveConfig.getParanValue());
-        }
-
         if (DateUtil.addHours(date, hours).after(courseSchedule.getStartClassTime())) {
             throw new BizException("开课{}小时之前才可以请假", hours);
         }
 
-        if (DateUtil.addDays(DateUtils.truncate(date, Calendar.DAY_OF_MONTH), earliestTimeForLeave).compareTo(courseSchedule.getClassDate())<=0) {
-            throw new BizException("请在开课前{}天内请假", earliestTimeForLeave);
-        }
-
         StudentAttendance studentAttendance = studentAttendanceDao.findByStatusAndCourseScheduleId(userId, courseScheduleId.intValue());
         if (Objects.isNull(studentAttendance)) {
             studentAttendance = new StudentAttendance();