Pārlūkot izejas kodu

学生可请假时间限制调整

Joburgess 5 gadi atpakaļ
vecāks
revīzija
57260f60c4

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

@@ -336,7 +336,7 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
             throw new BizException("开课{}小时之前才可以请假", hours);
         }
 
-        if (DateUtil.addDays(DateUtils.truncate(date, Calendar.DAY_OF_MONTH), earliestTimeForLeave).before(courseSchedule.getClassDate())) {
+        if (DateUtil.addDays(DateUtils.truncate(date, Calendar.DAY_OF_MONTH), earliestTimeForLeave).compareTo(courseSchedule.getClassDate())<=0) {
             throw new BizException("请在开课前{}天内请假", earliestTimeForLeave);
         }