|
@@ -1,8 +1,9 @@
|
|
|
package com.ym.mec.education.controller;
|
|
|
|
|
|
+import com.ym.mec.biz.dal.dto.ClassDateAdjustDto;
|
|
|
+import com.ym.mec.biz.service.CourseScheduleService;
|
|
|
import com.ym.mec.education.base.BaseResponse;
|
|
|
import com.ym.mec.education.base.PageResponse;
|
|
|
-import com.ym.mec.education.entity.CourseSchedule;
|
|
|
import com.ym.mec.education.req.ClassGroupReq;
|
|
|
import com.ym.mec.education.req.CourseScheduleReq;
|
|
|
import com.ym.mec.education.resp.CourseScheduleResp;
|
|
@@ -12,10 +13,9 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* @program: mec
|
|
@@ -31,6 +31,8 @@ public class CourseScheduleController {
|
|
|
|
|
|
@Autowired
|
|
|
private ICourseScheduleService courseScheduleService;
|
|
|
+ @Autowired
|
|
|
+ private CourseScheduleService scheduleService;
|
|
|
|
|
|
@PostMapping("/list")
|
|
|
@ApiOperation("课表列表")
|
|
@@ -57,4 +59,24 @@ public class CourseScheduleController {
|
|
|
return courseScheduleService.courseInfo(courseScheduleReq);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "课时调整")
|
|
|
+ @PostMapping(value = "/classStartDateAdjust")
|
|
|
+ public Object classStartDateAdjust(ClassDateAdjustDto classDateAdjustDto){
|
|
|
+ if(Objects.isNull(classDateAdjustDto.getId())){
|
|
|
+ return BaseResponse.errorParam();
|
|
|
+ }
|
|
|
+ scheduleService.classStartDateAdjust(classDateAdjustDto);
|
|
|
+ return BaseResponse.success(null);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "课时交换")
|
|
|
+ @GetMapping(value = "/courseSwap")
|
|
|
+ public Object courseSwap(Long courseScheduleId1,Long courseScheduleId2){
|
|
|
+ if(Objects.isNull(courseScheduleId1)||Objects.isNull(courseScheduleId2)){
|
|
|
+ return BaseResponse.errorParam();
|
|
|
+ }
|
|
|
+ scheduleService.courseSwap(courseScheduleId1,courseScheduleId2);
|
|
|
+ return BaseResponse.success(null);
|
|
|
+ }
|
|
|
+
|
|
|
}
|