浏览代码

学生可请假时间限制调整

Joburgess 5 年之前
父节点
当前提交
57260f60c4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentAttendanceServiceImpl.java

+ 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);
         }