|
@@ -15,11 +15,9 @@ import com.ym.mec.biz.service.CourseScheduleService;
|
|
import com.ym.mec.biz.service.StudentAttendanceService;
|
|
import com.ym.mec.biz.service.StudentAttendanceService;
|
|
import com.ym.mec.biz.service.SysConfigService;
|
|
import com.ym.mec.biz.service.SysConfigService;
|
|
import com.ym.mec.common.controller.BaseController;
|
|
import com.ym.mec.common.controller.BaseController;
|
|
-import com.ym.mec.util.date.DateUtil;
|
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
-import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.http.HttpStatus;
|
|
import org.springframework.http.HttpStatus;
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.http.MediaType;
|
|
@@ -156,19 +154,6 @@ public class TeacherCourseScheduleController extends BaseController {
|
|
if(Objects.isNull(classDateAdjustDto.getClassGroupId())){
|
|
if(Objects.isNull(classDateAdjustDto.getClassGroupId())){
|
|
classDateAdjustDto.setClassGroupId(oldCourseSchedule.getClassGroupId());
|
|
classDateAdjustDto.setClassGroupId(oldCourseSchedule.getClassGroupId());
|
|
}
|
|
}
|
|
- Date now=new Date();
|
|
|
|
- if(DateUtils.isSameDay(now,oldCourseSchedule.getClassDate())){
|
|
|
|
- return failed("不能调整今天的课程");
|
|
|
|
- }
|
|
|
|
- Date tomorrow = DateUtil.addDays1(now, 1);
|
|
|
|
- if(DateUtils.isSameDay(tomorrow,oldCourseSchedule.getClassDate())){
|
|
|
|
- Calendar calendar=Calendar.getInstance();
|
|
|
|
- calendar.setTime(now);
|
|
|
|
- System.out.println(calendar.get(Calendar.HOUR_OF_DAY));
|
|
|
|
- if(calendar.get(Calendar.HOUR_OF_DAY)>22){
|
|
|
|
- return failed("当前时间不可对此课程进行课程调整");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
List<CourseSchedule> courseSchedules=new ArrayList<>();
|
|
List<CourseSchedule> courseSchedules=new ArrayList<>();
|
|
courseSchedules.add(classDateAdjustDto);
|
|
courseSchedules.add(classDateAdjustDto);
|
|
scheduleService.courseAdjust(courseSchedules);
|
|
scheduleService.courseAdjust(courseSchedules);
|