|
@@ -1,7 +1,12 @@
|
|
package com.qmth.distributed.print.api.mark;
|
|
package com.qmth.distributed.print.api.mark;
|
|
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
+import com.qmth.distributed.print.business.service.BasicExamService;
|
|
|
|
+import com.qmth.teachcloud.common.entity.BasicExam;
|
|
|
|
+import com.qmth.teachcloud.common.entity.BasicSemester;
|
|
|
|
+import com.qmth.teachcloud.common.service.BasicSemesterService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -35,32 +40,41 @@ import io.swagger.annotations.ApiOperation;
|
|
@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_MARK + "/archive")
|
|
@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_MARK + "/archive")
|
|
public class MarkArchiveController {
|
|
public class MarkArchiveController {
|
|
|
|
|
|
- @Autowired
|
|
|
|
- private MarkPaperService markPaperService;
|
|
|
|
- @Autowired
|
|
|
|
- private MarkStudentService markStudentService;
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private MarkPaperService markPaperService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private MarkStudentService markStudentService;
|
|
|
|
+ @Resource
|
|
|
|
+ private BasicExamService basicExamService;
|
|
|
|
+ @Resource
|
|
|
|
+ private BasicSemesterService basicSemesterService;
|
|
|
|
|
|
- @ApiOperation(value = "成绩管理列表")
|
|
|
|
- @RequestMapping(value = "score/list", method = RequestMethod.POST)
|
|
|
|
- public Result scoreList(@Validated ArchiveScoreQuery query) {
|
|
|
|
- return ResultUtil.ok(markPaperService.scoreList(query));
|
|
|
|
- }
|
|
|
|
|
|
+ @ApiOperation(value = "成绩管理列表")
|
|
|
|
+ @RequestMapping(value = "score/list", method = RequestMethod.POST)
|
|
|
|
+ public Result scoreList(@Validated ArchiveScoreQuery query) {
|
|
|
|
+ return ResultUtil.ok(markPaperService.scoreList(query));
|
|
|
|
+ }
|
|
|
|
|
|
- @ApiOperation(value = "班级详情列表")
|
|
|
|
- @RequestMapping(value = "student/list", method = RequestMethod.POST)
|
|
|
|
- public Result studentList(@Validated ArchiveStudentQuery query) {
|
|
|
|
- return ResultUtil.ok(markStudentService.studentList(query));
|
|
|
|
- }
|
|
|
|
|
|
+ @ApiOperation(value = "班级详情列表")
|
|
|
|
+ @RequestMapping(value = "student/list", method = RequestMethod.POST)
|
|
|
|
+ public Result studentList(@Validated ArchiveStudentQuery query) {
|
|
|
|
+ return ResultUtil.ok(markStudentService.studentList(query));
|
|
|
|
+ }
|
|
|
|
|
|
- @ApiOperation(value = "成绩导出")
|
|
|
|
- @RequestMapping(value = "score/export", method = RequestMethod.POST)
|
|
|
|
- public void scoreExport(@Validated ArchiveStudentQuery query, HttpServletResponse response) {
|
|
|
|
- markStudentService.scoreExport(query, response);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @ApiOperation(value = "成绩报告")
|
|
|
|
- @RequestMapping(value = "score/report", method = RequestMethod.POST)
|
|
|
|
- public Result scoreReport(@RequestParam Long examId,@RequestParam String paperNumber) {
|
|
|
|
- return ResultUtil.ok(markStudentService.scoreReport(examId, paperNumber));
|
|
|
|
- }
|
|
|
|
|
|
+ @ApiOperation(value = "成绩导出")
|
|
|
|
+ @RequestMapping(value = "score/export", method = RequestMethod.POST)
|
|
|
|
+ public void scoreExport(@Validated ArchiveStudentQuery query, HttpServletResponse response) {
|
|
|
|
+ markStudentService.scoreExport(query, response);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "成绩报告")
|
|
|
|
+ @RequestMapping(value = "score/report", method = RequestMethod.POST)
|
|
|
|
+ public Result scoreReport(@RequestParam Long examId, @RequestParam String paperNumber) {
|
|
|
|
+ ScoreReportVo scoreReportVo = markStudentService.scoreReport(examId, paperNumber);
|
|
|
|
+ BasicExam basicExam = basicExamService.getById(examId);
|
|
|
|
+ BasicSemester basicSemester = basicSemesterService.getById(basicExam.getSemesterId());
|
|
|
|
+ scoreReportVo.setExamName(basicExam.getName());
|
|
|
|
+ scoreReportVo.setSemesterName(basicSemester.getName());
|
|
|
|
+ return ResultUtil.ok(scoreReportVo);
|
|
|
|
+ }
|
|
}
|
|
}
|