|
@@ -8,6 +8,7 @@ import com.ym.mec.biz.dal.enums.YesOrNoEnum;
|
|
|
import com.ym.mec.biz.dal.page.CourseHomeworkQueryInfo;
|
|
|
import com.ym.mec.biz.service.ExtracurricularExercisesReplyService;
|
|
|
import com.ym.mec.biz.service.StudentCourseHomeworkService;
|
|
|
+import com.ym.mec.biz.service.StudentServeService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
import com.ym.mec.common.page.PageInfo;
|
|
@@ -17,6 +18,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.MediaType;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Objects;
|
|
@@ -36,6 +38,8 @@ public class StudentCourseHomeworkController extends BaseController {
|
|
|
private ExtracurricularExercisesReplyService extracurricularExercisesReplyService;
|
|
|
@Autowired
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
+ @Autowired
|
|
|
+ private StudentServeService studentServeService;
|
|
|
|
|
|
@ApiOperation(value = "提交作业")
|
|
|
@PostMapping(value = "/add",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
@@ -119,4 +123,15 @@ public class StudentCourseHomeworkController extends BaseController {
|
|
|
return succeed(studentCourseHomeworkPageInfo);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "乐团作业情况")
|
|
|
+ @GetMapping("/musicGroupHomeworkStat")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('exercisesSituation/musicGroupHomeworkStat')")
|
|
|
+ public HttpResponseResult musicGroupHomeworkStat(String musicGroupId, String startDay, String endDay) {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ return failed("用户信息获取失败");
|
|
|
+ }
|
|
|
+ return succeed(studentServeService.musicGroupHomeworkStat(musicGroupId, sysUser.getId(), startDay, endDay));
|
|
|
+ }
|
|
|
+
|
|
|
}
|