wangliang 1 year ago
parent
commit
38df5f2d9b

+ 2 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TCPaperStruct.java

@@ -96,13 +96,14 @@ public class TCPaperStruct extends BaseEntity implements Serializable {
         updateInfo(userId);
     }
 
-    public TCPaperStruct(Long examId, String courseCode, String courseName, String paperNumber, Long teachCourseId, Long userId) {
+    public TCPaperStruct(Long examId, String courseCode, String courseName, String paperNumber, Long teachCourseId, String paperStruct, Long userId) {
         insertInfo(userId);
         this.examId = examId;
         this.courseCode = courseCode;
         this.courseName = courseName;
         this.paperNumber = paperNumber;
         this.teachCourseId = teachCourseId;
+        this.paperStruct = paperStruct;
         this.enable = true;
     }
 

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCFinalScoreServiceImpl.java

@@ -307,7 +307,7 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
                         tcFinalScoreService.saveBatch(tcFinalScoreList);
                         trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, true);
                     }
-                    TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseCode, paperNumber, teachCourseId);
+                    TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseCode, null, teachCourseId);
                     if (Objects.nonNull(tcPaperStruct)) {
                         tcPaperStruct.setPaperNumber(paperNumber);
                         tcPaperStruct.setPaperStruct(JacksonUtil.parseJson(paperStructDimensionResultList));
@@ -316,7 +316,7 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
                     } else {
                         BasicCourse basicCourse = basicCourseService.getByCode(courseCode);
                         Objects.requireNonNull(basicCourse, "未找到基础课程信息");
-                        tcPaperStruct = new TCPaperStruct(examId, courseCode, basicCourse.getName(), paperNumber, teachCourseId, sysUser.getId());
+                        tcPaperStruct = new TCPaperStruct(examId, courseCode, basicCourse.getName(), paperNumber, teachCourseId, JacksonUtil.parseJson(paperStructDimensionResultList), sysUser.getId());
                     }
                     tcPaperStructService.saveOrUpdate(tcPaperStruct);
                 }

+ 1 - 1
distributed-print/src/main/java/com/qmth/distributed/print/api/TCPaperStructController.java

@@ -192,7 +192,7 @@ public class TCPaperStructController {
     @ApiOperation(value = "期末成绩试卷蓝图查询")
     @RequestMapping(value = "/final_score/paper_struct/query", method = RequestMethod.POST)
     @OperationLogDetail(customizedOperationType = CustomizedOperationTypeEnum.SEARCH)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷蓝图保存", response = PaperStructDimensionResult.class)})
+    @ApiResponses({@ApiResponse(code = 200, message = "试卷蓝图查询", response = PaperStructDimensionResult.class)})
     public Result finalScorePaperStructQuery(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
                                              @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
                                              @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,