|
@@ -10,9 +10,7 @@ package cn.com.qmth.examcloud.core.print.api.controller;
|
|
|
import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
|
|
|
import cn.com.qmth.examcloud.core.print.common.Result;
|
|
|
import cn.com.qmth.examcloud.core.print.service.CoursePaperService;
|
|
|
-import cn.com.qmth.examcloud.core.print.service.bean.coursepaper.CoursePaperInfo;
|
|
|
-import cn.com.qmth.examcloud.core.print.service.bean.coursepaper.CoursePaperQuery;
|
|
|
-import cn.com.qmth.examcloud.core.print.service.bean.coursepaper.CoursePaperTotalInfo;
|
|
|
+import cn.com.qmth.examcloud.core.print.service.bean.coursepaper.*;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -62,44 +60,29 @@ public class CoursePaperController extends ControllerSupport {
|
|
|
return coursePaperService.getPaperTotalByOrgIdAndExamId(orgId, examId);
|
|
|
}
|
|
|
|
|
|
- @GetMapping("/export/all/{orgId}/{examId}")
|
|
|
- @ApiOperation(value = "整体导出(导出考试下所有试卷文件)")
|
|
|
- public void exportAll(@PathVariable Long orgId, @PathVariable Long examId) throws Exception {
|
|
|
- File file = coursePaperService.exportAllByOrgIdAndExamId(orgId, examId);
|
|
|
- final String fileName = "structures.zip";
|
|
|
- //super.exportFile(fileName, file);//todo
|
|
|
- super.exportFile(fileName, new byte[]{});
|
|
|
+ @PostMapping("/check/structure/{examId}/{paperId}")
|
|
|
+ @ApiOperation(value = "校验考试结构")
|
|
|
+ public Result checkPaperStructure(@PathVariable Long examId, @PathVariable String paperId) {
|
|
|
+ coursePaperService.checkPaperStructure(examId, paperId);
|
|
|
+ return success();
|
|
|
}
|
|
|
|
|
|
- @GetMapping("/export/batch/{ids}")
|
|
|
+ @GetMapping("/export/batch")
|
|
|
@ApiOperation(value = "批量导出")
|
|
|
- public void exportBatch(@PathVariable Long[] ids) throws Exception {
|
|
|
- File file = coursePaperService.exportBatchByIds(ids);
|
|
|
+ public void exportBatch(@RequestBody ExportBatchReq req) throws Exception {
|
|
|
+ File file = coursePaperService.exportBatchCoursePaper(req);
|
|
|
final String fileName = "papers.zip";
|
|
|
//super.exportFile(fileName, file);//todo
|
|
|
super.exportFile(fileName, new byte[]{});
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 下载考试结构
|
|
|
- */
|
|
|
- @GetMapping("/download/structure/{examId}/{paperId}")
|
|
|
- @ApiOperation(value = "下载考试结构")
|
|
|
- public void downloadPaperStructure(@PathVariable Long examId, @PathVariable String paperId) throws Exception {
|
|
|
- File file = coursePaperService.downloadPaperStructure(examId, paperId);
|
|
|
- final String fileName = "paper.zip";
|
|
|
+ @GetMapping("/export/all")
|
|
|
+ @ApiOperation(value = "整体导出")
|
|
|
+ public void exportAll(@RequestBody ExportAllReq req) throws Exception {
|
|
|
+ File file = coursePaperService.exportAllCoursePaper(req);
|
|
|
+ final String fileName = "structures.zip";
|
|
|
//super.exportFile(fileName, file);//todo
|
|
|
super.exportFile(fileName, new byte[]{});
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 校验考试结构
|
|
|
- */
|
|
|
- @PostMapping("/check/structure/{examId}/{paperId}")
|
|
|
- @ApiOperation(value = "校验考试结构")
|
|
|
- public Result checkPaperStructure(@PathVariable Long examId, @PathVariable String paperId) {
|
|
|
- coursePaperService.checkPaperStructure(examId, paperId);
|
|
|
- return success();
|
|
|
- }
|
|
|
-
|
|
|
}
|