deason 6 жил өмнө
parent
commit
64f0e71f83

+ 2 - 2
examcloud-core-print-provider/src/main/java/cn/com/qmth/examcloud/core/print/api/controller/CoursePaperController.java

@@ -85,7 +85,7 @@ public class CoursePaperController extends ControllerSupport {
      */
     @GetMapping("/download/structure/{examId}/{paperId}")
     @ApiOperation(value = "下载考试结构")
-    public void downloadPaperStructure(@PathVariable Long examId, @PathVariable Long paperId) throws Exception {
+    public void downloadPaperStructure(@PathVariable Long examId, @PathVariable String paperId) throws Exception {
         File file = coursePaperService.downloadPaperStructure(examId, paperId);
         final String fileName = "paper.zip";
         //super.exportFile(fileName, file);//todo
@@ -97,7 +97,7 @@ public class CoursePaperController extends ControllerSupport {
      */
     @PostMapping("/check/structure/{examId}/{paperId}")
     @ApiOperation(value = "校验考试结构")
-    public Result checkPaperStructure(@PathVariable Long examId, @PathVariable Long paperId) {
+    public Result checkPaperStructure(@PathVariable Long examId, @PathVariable String paperId) {
         coursePaperService.checkPaperStructure(examId, paperId);
         return success();
     }

+ 2 - 2
examcloud-core-print-service/src/main/java/cn/com/qmth/examcloud/core/print/service/CoursePaperService.java

@@ -39,12 +39,12 @@ public interface CoursePaperService {
     /**
      * 下载考试结构
      */
-    File downloadPaperStructure(Long examId, Long paperId);
+    File downloadPaperStructure(Long examId, String paperId);
 
     /**
      * 校验考试结构
      */
-    void checkPaperStructure(Long examId, Long paperId);
+    void checkPaperStructure(Long examId, String paperId);
 
     /**
      * (单个)分配待指定试卷

+ 7 - 4
examcloud-core-print-service/src/main/java/cn/com/qmth/examcloud/core/print/service/impl/CoursePaperServiceImpl.java

@@ -100,8 +100,7 @@ public class CoursePaperServiceImpl implements CoursePaperService {
         coursePaperRepository.save(coursePaper);
 
         //保存试卷结构
-        //todo
-
+        this.savePaperQuestionStructure(coursePaper.getExamId(), coursePaper.getPaperId());
 
         //如果当前考试课程"只有一种试卷类型"且"未分配试卷",则默认分配该试卷
         SearchBuilder searches = new SearchBuilder()
@@ -130,14 +129,18 @@ public class CoursePaperServiceImpl implements CoursePaperService {
         courseStatisticRepository.save(statistics);
     }
 
+    private void savePaperQuestionStructure(Long examId, String paperId) {
+        //todo
+    }
+
     @Override
-    public File downloadPaperStructure(Long examId, Long paperId) {
+    public File downloadPaperStructure(Long examId, String paperId) {
         //todo
         return null;
     }
 
     @Override
-    public void checkPaperStructure(Long examId, Long paperId) {
+    public void checkPaperStructure(Long examId, String paperId) {
         //todo
     }