wangliang 8 сар өмнө
parent
commit
a8faf1c6f3

+ 2 - 1
teachcloud-obe/src/main/java/com/qmth/teachcloud/obe/entity/TCPaperStruct.java

@@ -83,7 +83,7 @@ public class TCPaperStruct extends BaseEntity implements Serializable {
         this.dimensionSign = dimensionSign;
     }
 
-    public TCPaperStruct(Long cultureProgramId, Long courseId, String courseCode, String courseName, String paperNumber, String paperStruct, Double totalScore, Double passScore, Long userId) {
+    public TCPaperStruct(Long examId, Long cultureProgramId, Long courseId, String courseCode, String courseName, String paperNumber, String paperStruct, Double totalScore, Double passScore, Long userId) {
         insertInfo(userId);
         this.cultureProgramId = cultureProgramId;
         this.courseId = courseId;
@@ -94,6 +94,7 @@ public class TCPaperStruct extends BaseEntity implements Serializable {
         this.totalScore = totalScore;
         this.passScore = passScore;
         this.enable = true;
+        this.examId = examId;
     }
 
     public void updateInfo(String paperStructDimension, Long userId) {

+ 1 - 1
teachcloud-obe/src/main/java/com/qmth/teachcloud/obe/service/impl/TCPaperStructServiceImpl.java

@@ -168,7 +168,7 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
                 if (!CollectionUtils.isEmpty(paperStructDtoNewList)) {
                     successData.add("共导入").add(paperStructDtoNewList.size() + "").add("条数据");
                     paperStructDtoNewList = SDFrame.read(paperStructDtoNewList).sortDesc(Sorter.sortDescBy(PaperStructDto::getMainNumber).sortDesc(PaperStructDto::getMainNumber)).toLists();
-                    TCPaperStruct tcPaperStruct = new TCPaperStruct(cultureProgramId, courseId, markPaper.getCourseCode(), markPaper.getCourseName(), paperNumber, JacksonUtil.parseJson(paperStructDtoNewList), totalScore, 60d, sysUser.getId());
+                    TCPaperStruct tcPaperStruct = new TCPaperStruct(examId, cultureProgramId, courseId, markPaper.getCourseCode(), markPaper.getCourseName(), paperNumber, JacksonUtil.parseJson(paperStructDtoNewList), totalScore, 60d, sysUser.getId());
                     TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber, examId);
                     if (Objects.nonNull(tcPaperStructDb) && !tcPaperStructDb.equals(tcPaperStruct)) {
                         tcFinalScoreService.remove(cultureProgramId, courseId, paperNumber, examId);