|
@@ -8,10 +8,13 @@ import com.ym.mec.biz.dal.page.StudentCourseScheduleRecordQueryInfo;
|
|
|
import com.ym.mec.biz.service.CourseScheduleService;
|
|
|
import com.ym.mec.biz.service.StudentAttendanceService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
+import com.ym.mec.util.date.DateUtil;
|
|
|
import com.yonge.log.model.AuditLogAnnotation;
|
|
|
+
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -89,4 +92,23 @@ public class StudentCourseScheduleController extends BaseController {
|
|
|
return succeed(scheduleService.queryCourseInfoByGroupId(groupType,groupId));
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "获取本周课程规划")
|
|
|
+ @GetMapping("/queryCoursePlan")
|
|
|
+ public Object queryCoursePlan(){
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if(sysUser == null || sysUser.getId() == null){
|
|
|
+ return failed(HttpStatus.FORBIDDEN, "请登录");
|
|
|
+ }
|
|
|
+
|
|
|
+ Date now = new Date();
|
|
|
+
|
|
|
+ Date startDate = DateUtil.getWeekMondayWithDate(now);
|
|
|
+ startDate = DateUtil.formatHMSToZero(startDate);
|
|
|
+
|
|
|
+ Date endDate = DateUtil.addDays(startDate, 7);
|
|
|
+ endDate = DateUtil.getLastSecondWithDay(endDate);
|
|
|
+
|
|
|
+ return succeed(scheduleService.queryMusicCoursePlan(sysUser.getId(), startDate, endDate));
|
|
|
+ }
|
|
|
+
|
|
|
}
|