Browse Source

作业提交

zouxuan 3 years ago
parent
commit
1714286d08

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

@@ -141,16 +141,16 @@ public class StudentCourseHomeworkServiceImpl extends BaseServiceImpl<Long, Stud
         }
         Date now = new Date();
         //若下周有服务指标课程,则在课程开始当天不可提交
-        List<StudentExtracurricularExercisesSituation> exercisesSituations = studentExtracurricularExercisesSituationDao.findServiceWithCourse(
-                DateUtil.format(DateUtil.addDays(DateUtil.getLastDayOfMonth(now), 1), DateUtil.ISO_EXPANDED_DATE_FORMAT),
-                existHomework.getCourseScheduleId());
-        if(!CollectionUtils.isEmpty(exercisesSituations)){
-            CourseSchedule courseSchedule = courseScheduleDao.get(existHomework.getCourseScheduleId());
-            int i = courseSchedule.getClassDate().compareTo(DateUtil.stringToDate(DateUtil.format(now, DateUtil.ISO_EXPANDED_DATE_FORMAT), DateUtil.ISO_EXPANDED_DATE_FORMAT));
-            if(i <= 0){
-                throw new BizException("该作业已超出可提交时间范围,无法提交作业。");
-            }
-        }
+//        List<StudentExtracurricularExercisesSituation> exercisesSituations = studentExtracurricularExercisesSituationDao.findServiceWithCourse(
+//                DateUtil.format(DateUtil.addDays(DateUtil.getLastDayOfMonth(now), 1), DateUtil.ISO_EXPANDED_DATE_FORMAT),
+//                existHomework.getCourseScheduleId());
+//        if(!CollectionUtils.isEmpty(exercisesSituations)){
+//            CourseSchedule courseSchedule = courseScheduleDao.get(existHomework.getCourseScheduleId());
+//            int i = courseSchedule.getClassDate().compareTo(DateUtil.stringToDate(DateUtil.format(now, DateUtil.ISO_EXPANDED_DATE_FORMAT), DateUtil.ISO_EXPANDED_DATE_FORMAT));
+//            if(i <= 0){
+//                throw new BizException("该作业已超出可提交时间范围,无法提交作业。");
+//            }
+//        }
         if (DateUtil.daysBetween(existHomework.getCreateTime(), now) >= 7) {
             throw new BizException("该作业已超出可提交时间范围,无法提交作业。");
         }