xiaofei 1 年間 前
コミット
2834e52102
30 ファイル変更382 行追加612 行削除
  1. 14 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCommonDto.java
  2. 8 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/params/report/PaperStructParams.java
  3. 12 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/ScoreResult.java
  4. 14 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TCFinalScore.java
  5. 19 10
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TCPaperStruct.java
  6. 14 3
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TCUsualScore.java
  7. 17 10
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TRBasicInfo.java
  8. 4 24
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TCFinalScoreMapper.java
  9. 2 15
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TCUsualScoreMapper.java
  10. 5 21
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/PrintCommonService.java
  11. 10 72
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TCFinalScoreService.java
  12. 6 43
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TCPaperStructService.java
  13. 3 24
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TCUsualScoreService.java
  14. 3 21
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TRBasicInfoService.java
  15. 1 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TRExamStudentService.java
  16. 12 22
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/PrintCommonServiceImpl.java
  17. 27 89
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCFinalScoreServiceImpl.java
  18. 23 61
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCPaperStructServiceImpl.java
  19. 9 30
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCUsualScoreServiceImpl.java
  20. 22 39
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TRBasicInfoServiceImpl.java
  21. 2 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TRExamStudentServiceImpl.java
  22. 10 10
      distributed-print-business/src/main/resources/mapper/TCFinalScoreMapper.xml
  23. 8 7
      distributed-print-business/src/main/resources/mapper/TCUsualScoreMapper.xml
  24. 31 0
      distributed-print/install/mysql/upgrade/3.4.0.sql
  25. 19 19
      distributed-print/src/main/java/com/qmth/distributed/print/api/TCFinalScoreController.java
  26. 16 17
      distributed-print/src/main/java/com/qmth/distributed/print/api/TCPaperStructController.java
  27. 9 9
      distributed-print/src/main/java/com/qmth/distributed/print/api/TCUsualScoreController.java
  28. 37 28
      distributed-print/src/main/java/com/qmth/distributed/print/api/TRBasicInfoController.java
  29. 22 13
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/archivescore/MarkStudentScoreVo.java
  30. 3 3
      teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkStudentServiceImpl.java

+ 14 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/report/ReportCommonDto.java

@@ -20,6 +20,10 @@ public class ReportCommonDto implements Serializable {
     @ApiModelProperty(value = "考试id")
     @ApiModelProperty(value = "考试id")
     private Long examId;
     private Long examId;
 
 
+    @JsonSerialize(using = ToStringSerializer.class)
+    @ApiModelProperty(value = "课程id")
+    private Long courseId;
+
     @ApiModelProperty(value = "课程编码")
     @ApiModelProperty(value = "课程编码")
     private String courseCode;
     private String courseCode;
 
 
@@ -33,8 +37,9 @@ public class ReportCommonDto implements Serializable {
 
 
     }
     }
 
 
-    public ReportCommonDto(Long examId, String courseCode, String courseName, String paperNumber) {
+    public ReportCommonDto(Long examId, Long courseId, String courseCode, String courseName, String paperNumber) {
         this.examId = examId;
         this.examId = examId;
+        this.courseId = courseId;
         this.courseCode = courseCode;
         this.courseCode = courseCode;
         this.courseName = courseName;
         this.courseName = courseName;
         this.paperNumber = paperNumber;
         this.paperNumber = paperNumber;
@@ -48,6 +53,14 @@ public class ReportCommonDto implements Serializable {
         this.examId = examId;
         this.examId = examId;
     }
     }
 
 
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
     public String getCourseCode() {
     public String getCourseCode() {
         return courseCode;
         return courseCode;
     }
     }

+ 8 - 7
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/params/report/PaperStructParams.java

@@ -25,9 +25,10 @@ public class PaperStructParams implements Serializable {
     @NotNull(message = "考试id不能为空")
     @NotNull(message = "考试id不能为空")
     private Long examId;
     private Long examId;
 
 
-    @ApiModelProperty(value = "课程编码")
-    @NotNull(message = "课程编码不能为空")
-    private String courseCode;
+    @ApiModelProperty(value = "课程id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    @NotNull(message = "课程id不能为空")
+    private Long courseId;
 
 
     @ApiModelProperty(value = "试卷编码")
     @ApiModelProperty(value = "试卷编码")
     private String paperNumber;
     private String paperNumber;
@@ -57,12 +58,12 @@ public class PaperStructParams implements Serializable {
         this.examId = examId;
         this.examId = examId;
     }
     }
 
 
-    public String getCourseCode() {
-        return courseCode;
+    public Long getCourseId() {
+        return courseId;
     }
     }
 
 
-    public void setCourseCode(String courseCode) {
-        this.courseCode = courseCode;
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
     }
     }
 
 
     public String getPaperNumber() {
     public String getPaperNumber() {

+ 12 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/ScoreResult.java

@@ -27,6 +27,10 @@ public class ScoreResult implements Serializable {
     @ApiModelProperty(value = "考试id")
     @ApiModelProperty(value = "考试id")
     private Long examId;
     private Long examId;
 
 
+    @JsonSerialize(using = ToStringSerializer.class)
+    @ApiModelProperty(value = "课程id")
+    private Long courseId;
+
     @ApiModelProperty(value = "课程编码")
     @ApiModelProperty(value = "课程编码")
     private String courseCode;
     private String courseCode;
 
 
@@ -94,6 +98,14 @@ public class ScoreResult implements Serializable {
         this.examId = examId;
         this.examId = examId;
     }
     }
 
 
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
     public String getCourseCode() {
     public String getCourseCode() {
         return courseCode;
         return courseCode;
     }
     }

+ 14 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TCFinalScore.java

@@ -30,6 +30,9 @@ public class TCFinalScore extends BaseEntity implements Serializable {
     @JsonSerialize(using = ToStringSerializer.class)
     @JsonSerialize(using = ToStringSerializer.class)
     private Long examId;
     private Long examId;
 
 
+    @ApiModelProperty(value = "课程ID")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long courseId;
     @ApiModelProperty(value = "课程编码")
     @ApiModelProperty(value = "课程编码")
     private String courseCode;
     private String courseCode;
 
 
@@ -68,11 +71,10 @@ public class TCFinalScore extends BaseEntity implements Serializable {
 
 
     }
     }
 
 
-    public TCFinalScore(Long examId, String courseCode, String courseName, String paperNumber, Long teachCourseId, SourceEnum source, Long userId) {
+    public TCFinalScore(Long examId, Long courseId, String paperNumber, Long teachCourseId, SourceEnum source, Long userId) {
         insertInfo(userId);
         insertInfo(userId);
         this.examId = examId;
         this.examId = examId;
-        this.courseCode = courseCode;
-        this.courseName = courseName;
+        this.courseId = courseId;
         this.paperNumber = paperNumber;
         this.paperNumber = paperNumber;
         this.teachCourseId = teachCourseId;
         this.teachCourseId = teachCourseId;
         this.source = source;
         this.source = source;
@@ -82,8 +84,7 @@ public class TCFinalScore extends BaseEntity implements Serializable {
     public TCFinalScore(MarkStudentScoreVo markStudentScoreVo, String scoreDetail, SourceEnum source, Long userId, Long teachCourseId) {
     public TCFinalScore(MarkStudentScoreVo markStudentScoreVo, String scoreDetail, SourceEnum source, Long userId, Long teachCourseId) {
         insertInfo(userId);
         insertInfo(userId);
         this.examId = markStudentScoreVo.getExamId();
         this.examId = markStudentScoreVo.getExamId();
-        this.courseCode = markStudentScoreVo.getCourseCode();
-        this.courseName = markStudentScoreVo.getCourseName();
+        this.courseId = markStudentScoreVo.getCourseId();
         this.paperNumber = markStudentScoreVo.getPaperNumber();
         this.paperNumber = markStudentScoreVo.getPaperNumber();
         this.teachCourseId = teachCourseId;
         this.teachCourseId = teachCourseId;
         this.name = markStudentScoreVo.getStudentName();
         this.name = markStudentScoreVo.getStudentName();
@@ -125,6 +126,14 @@ public class TCFinalScore extends BaseEntity implements Serializable {
         this.examId = examId;
         this.examId = examId;
     }
     }
 
 
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
     public String getCourseCode() {
     public String getCourseCode() {
         return courseCode;
         return courseCode;
     }
     }

+ 19 - 10
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TCPaperStruct.java

@@ -28,6 +28,10 @@ public class TCPaperStruct extends BaseEntity implements Serializable {
     @JsonSerialize(using = ToStringSerializer.class)
     @JsonSerialize(using = ToStringSerializer.class)
     private Long examId;
     private Long examId;
 
 
+    @ApiModelProperty(value = "课程id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long courseId;
+
     @ApiModelProperty(value = "课程编码")
     @ApiModelProperty(value = "课程编码")
     private String courseCode;
     private String courseCode;
 
 
@@ -66,11 +70,10 @@ public class TCPaperStruct extends BaseEntity implements Serializable {
 
 
     }
     }
 
 
-    public TCPaperStruct(Long examId, String courseCode, String courseName, String paperNumber, Long teachCourseId, String paperStructDimension, Long userId, Long dimensionSign) {
+    public TCPaperStruct(Long examId, Long courseId, String paperNumber, Long teachCourseId, String paperStructDimension, Long userId, Long dimensionSign) {
         insertInfo(userId);
         insertInfo(userId);
         this.examId = examId;
         this.examId = examId;
-        this.courseCode = courseCode;
-        this.courseName = courseName;
+        this.courseId = courseId;
         this.paperNumber = paperNumber;
         this.paperNumber = paperNumber;
         this.teachCourseId = teachCourseId;
         this.teachCourseId = teachCourseId;
         this.paperStructDimension = paperStructDimension;
         this.paperStructDimension = paperStructDimension;
@@ -78,11 +81,10 @@ public class TCPaperStruct extends BaseEntity implements Serializable {
         this.dimensionSign = dimensionSign;
         this.dimensionSign = dimensionSign;
     }
     }
 
 
-    public TCPaperStruct(Long examId, String courseCode, String courseName, String paperNumber, Long teachCourseId, String paperStruct, Double totalScore, Double passScore, Long userId) {
+    public TCPaperStruct(Long examId, Long courseId, String paperNumber, Long teachCourseId, String paperStruct, Double totalScore, Double passScore, Long userId) {
         insertInfo(userId);
         insertInfo(userId);
         this.examId = examId;
         this.examId = examId;
-        this.courseCode = courseCode;
-        this.courseName = courseName;
+        this.courseId = courseId;
         this.paperNumber = paperNumber;
         this.paperNumber = paperNumber;
         this.teachCourseId = teachCourseId;
         this.teachCourseId = teachCourseId;
         this.paperStruct = paperStruct;
         this.paperStruct = paperStruct;
@@ -96,17 +98,24 @@ public class TCPaperStruct extends BaseEntity implements Serializable {
         updateInfo(userId);
         updateInfo(userId);
     }
     }
 
 
-    public TCPaperStruct(Long examId, String courseCode, String courseName, String paperNumber, Long teachCourseId, String paperStruct, Long userId) {
+    public TCPaperStruct(Long examId, Long courseId, String paperNumber, Long teachCourseId, String paperStruct, Long userId) {
         insertInfo(userId);
         insertInfo(userId);
         this.examId = examId;
         this.examId = examId;
-        this.courseCode = courseCode;
-        this.courseName = courseName;
+        this.courseId = courseId;
         this.paperNumber = paperNumber;
         this.paperNumber = paperNumber;
         this.teachCourseId = teachCourseId;
         this.teachCourseId = teachCourseId;
         this.paperStruct = paperStruct;
         this.paperStruct = paperStruct;
         this.enable = true;
         this.enable = true;
     }
     }
 
 
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
     public Long getTeachCourseId() {
     public Long getTeachCourseId() {
         return teachCourseId;
         return teachCourseId;
     }
     }
@@ -204,7 +213,7 @@ public class TCPaperStruct extends BaseEntity implements Serializable {
             return false;
             return false;
         }
         }
         TCPaperStruct that = (TCPaperStruct) o;
         TCPaperStruct that = (TCPaperStruct) o;
-        return examId.equals(that.examId) && courseCode.equals(that.courseCode) && Objects.equals(courseName, that.courseName) && Objects.equals(paperNumber, that.paperNumber) && teachCourseId.equals(that.teachCourseId) && Objects.equals(paperStruct, that.paperStruct) && Objects.equals(paperStructDimension, that.paperStructDimension) && Objects.equals(getCreateId(), that.getCreateId());
+        return examId.equals(that.examId) && courseId.equals(that.courseId) && Objects.equals(paperNumber, that.paperNumber) && teachCourseId.equals(that.teachCourseId) && Objects.equals(paperStruct, that.paperStruct) && Objects.equals(paperStructDimension, that.paperStructDimension) && Objects.equals(getCreateId(), that.getCreateId());
     }
     }
 
 
     @Override
     @Override

+ 14 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TCUsualScore.java

@@ -27,6 +27,10 @@ public class TCUsualScore extends BaseEntity implements Serializable {
     @JsonSerialize(using = ToStringSerializer.class)
     @JsonSerialize(using = ToStringSerializer.class)
     private Long examId;
     private Long examId;
 
 
+    @ApiModelProperty(value = "课程id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long courseId;
+
     @ApiModelProperty(value = "课程编码")
     @ApiModelProperty(value = "课程编码")
     private String courseCode;
     private String courseCode;
 
 
@@ -58,11 +62,10 @@ public class TCUsualScore extends BaseEntity implements Serializable {
 
 
     }
     }
 
 
-    public TCUsualScore(Long examId, String courseCode, String courseName, String paperNumber, Long teachCourseId, Long userId) {
+    public TCUsualScore(Long examId, Long courseId, String paperNumber, Long teachCourseId, Long userId) {
         insertInfo(userId);
         insertInfo(userId);
         this.examId = examId;
         this.examId = examId;
-        this.courseCode = courseCode;
-        this.courseName = courseName;
+        this.courseId = courseId;
         this.paperNumber = paperNumber;
         this.paperNumber = paperNumber;
         this.teachCourseId = teachCourseId;
         this.teachCourseId = teachCourseId;
         this.enable = true;
         this.enable = true;
@@ -90,6 +93,14 @@ public class TCUsualScore extends BaseEntity implements Serializable {
         this.examId = examId;
         this.examId = examId;
     }
     }
 
 
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
     public String getCourseCode() {
     public String getCourseCode() {
         return courseCode;
         return courseCode;
     }
     }

+ 17 - 10
distributed-print-business/src/main/java/com/qmth/distributed/print/business/entity/TRBasicInfo.java

@@ -28,9 +28,11 @@ public class TRBasicInfo extends BaseEntity implements Serializable {
     @JsonSerialize(using = ToStringSerializer.class)
     @JsonSerialize(using = ToStringSerializer.class)
     @NotNull(message = "考试id不能为空")
     @NotNull(message = "考试id不能为空")
     private Long examId;
     private Long examId;
-
+    @ApiModelProperty(value = "课程id")
+    @NotNull(message = "课程ID不能为空")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long courseId;
     @ApiModelProperty(value = "课程编码")
     @ApiModelProperty(value = "课程编码")
-    @NotNull(message = "课程编码不能为空")
     private String courseCode;
     private String courseCode;
 
 
     @ApiModelProperty(value = "课程名称")
     @ApiModelProperty(value = "课程名称")
@@ -100,11 +102,10 @@ public class TRBasicInfo extends BaseEntity implements Serializable {
 
 
     }
     }
 
 
-    public TRBasicInfo(Long examId, String courseCode, String courseName, String paperNumber, Long teachCourseId, String openTime, String teachingObject, String teacher, Integer participantCount, Long userId) {
+    public TRBasicInfo(Long examId, Long courseId, String paperNumber, Long teachCourseId, String openTime, String teachingObject, String teacher, Integer participantCount, Long userId) {
         insertInfo(userId);
         insertInfo(userId);
         this.examId = examId;
         this.examId = examId;
-        this.courseCode = courseCode;
-        this.courseName = courseName;
+        this.courseId = courseId;
         this.paperNumber = paperNumber;
         this.paperNumber = paperNumber;
         this.teachCourseId = teachCourseId;
         this.teachCourseId = teachCourseId;
         this.openTime = openTime;
         this.openTime = openTime;
@@ -128,8 +129,7 @@ public class TRBasicInfo extends BaseEntity implements Serializable {
 
 
     protected void setValue(TRBasicInfo trBasicInfo) {
     protected void setValue(TRBasicInfo trBasicInfo) {
         this.examId = trBasicInfo.getExamId();
         this.examId = trBasicInfo.getExamId();
-        this.courseCode = trBasicInfo.getCourseCode();
-        this.courseName = trBasicInfo.getCourseName();
+        this.courseId = trBasicInfo.getCourseId();
         this.paperNumber = trBasicInfo.getPaperNumber();
         this.paperNumber = trBasicInfo.getPaperNumber();
         this.teachCourseId = trBasicInfo.getTeachCourseId();
         this.teachCourseId = trBasicInfo.getTeachCourseId();
         this.courseType = trBasicInfo.getCourseType();
         this.courseType = trBasicInfo.getCourseType();
@@ -149,10 +149,9 @@ public class TRBasicInfo extends BaseEntity implements Serializable {
         this.courseEvaluationResultDetail = trBasicInfo.getCourseEvaluationResultDetail();
         this.courseEvaluationResultDetail = trBasicInfo.getCourseEvaluationResultDetail();
     }
     }
 
 
-    public void setBasicInfo(Long examId, String courseCode, String courseName, String paperNumber, String openTime, String teachingObject, String teacher, Integer participantCount) {
+    public void setBasicInfo(Long examId, Long courseId, String paperNumber, String openTime, String teachingObject, String teacher, Integer participantCount) {
         this.examId = examId;
         this.examId = examId;
-        this.courseCode = courseCode;
-        this.courseName = courseName;
+        this.courseId = courseId;
         this.paperNumber = paperNumber;
         this.paperNumber = paperNumber;
         this.openTime = openTime;
         this.openTime = openTime;
         this.teachingObject = teachingObject;
         this.teachingObject = teachingObject;
@@ -162,6 +161,14 @@ public class TRBasicInfo extends BaseEntity implements Serializable {
         this.reportResult = new ReportResult();
         this.reportResult = new ReportResult();
     }
     }
 
 
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
     public Long getTeachCourseId() {
     public Long getTeachCourseId() {
         return teachCourseId;
         return teachCourseId;
     }
     }

+ 4 - 24
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TCFinalScoreMapper.java

@@ -30,40 +30,20 @@ public interface TCFinalScoreMapper extends BaseMapper<TCFinalScore> {
      * @param teachCourseId
      * @param teachCourseId
      * @return
      * @return
      */
      */
-    public IPage<TCFinalScore> finalScoreList(IPage<Map> iPage, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("teachCourseId") Long teachCourseId);
+    public IPage<TCFinalScore> finalScoreList(IPage<Map> iPage, @Param("examId") Long examId, @Param("courseId") Long courseId, @Param("paperNumber") String paperNumber, @Param("teachCourseId") Long teachCourseId);
 
 
     /**
     /**
      * 查找期末成绩分数图
      * 查找期末成绩分数图
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public FinalScoreDto finalScoreScoreOverView(@Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("teachCourseId") Long teachCourseId);
+    public FinalScoreDto finalScoreScoreOverView(@Param("examId") Long examId, @Param("courseId") Long courseId, @Param("paperNumber") String paperNumber, @Param("teachCourseId") Long teachCourseId);
 
 
     /**
     /**
      * 查找期末成绩分数区间
      * 查找期末成绩分数区间
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @param start
-     * @param end
-     * @return
      */
      */
-    public int getCountByScoreRange(@Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("teachCourseId") Long teachCourseId, @Param("start") Double start, @Param("end") Double end);
+    public int getCountByScoreRange(@Param("examId") Long examId, @Param("courseId") Long courseId, @Param("paperNumber") String paperNumber, @Param("teachCourseId") Long teachCourseId, @Param("start") Double start, @Param("end") Double end);
 
 
     /**
     /**
      * 查找考生成绩
      * 查找考生成绩
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public List<FinalScoreResult> examStudentOverview(@Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("teachCourseId") Long teachCourseId);
+    public List<FinalScoreResult> examStudentOverview(@Param("examId") Long examId, @Param("courseId") Long courseId, @Param("paperNumber") String paperNumber, @Param("teachCourseId") Long teachCourseId);
 }
 }

+ 2 - 15
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TCUsualScoreMapper.java

@@ -21,24 +21,11 @@ public interface TCUsualScoreMapper extends BaseMapper<TCUsualScore> {
 
 
     /**
     /**
      * 成绩管理列表
      * 成绩管理列表
-     *
-     * @param iPage
-     * @param examId
-     * @param courseCode
-     * @param dpr
-     * @return
      */
      */
-    public IPage<ScoreResult> scoreList(IPage<Map> iPage, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("dpr") DataPermissionRule dpr);
+    public IPage<ScoreResult> scoreList(IPage<Map> iPage, @Param("examId") Long examId, @Param("courseId") Long courseId, @Param("dpr") DataPermissionRule dpr);
 
 
     /**
     /**
      * 平时成绩列表(分页)
      * 平时成绩列表(分页)
-     *
-     * @param iPage
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public IPage<TCUsualScore> usualScoreList(IPage<Map> iPage, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("teachCourseId") Long teachCourseId);
+    public IPage<TCUsualScore> usualScoreList(IPage<Map> iPage, @Param("examId") Long examId, @Param("courseId") Long courseId, @Param("paperNumber") String paperNumber, @Param("teachCourseId") Long teachCourseId);
 }
 }

+ 5 - 21
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/PrintCommonService.java

@@ -174,24 +174,13 @@ public interface PrintCommonService {
 
 
     /**
     /**
      * 成绩管理导入excel校验
      * 成绩管理导入excel校验
-     *
-     * @param file
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @return
      */
      */
-    public MarkPaper scoreImportExcelVaild(MultipartFile file, Long examId, String courseCode, String paperNumber) throws IOException;
+    public MarkPaper scoreImportExcelVaild(MultipartFile file, Long examId, Long courseId, String paperNumber) throws IOException;
 
 
     /**
     /**
      * 获取阅卷数据
      * 获取阅卷数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @return
      */
      */
-    public MarkPaper getMarkPaper(Long examId, String courseCode, String paperNumber);
+    public MarkPaper getMarkPaper(Long examId, Long courseId, String paperNumber);
 
 
     /**
     /**
      * 成绩管理动态生成excel
      * 成绩管理动态生成excel
@@ -209,18 +198,13 @@ public interface PrintCommonService {
      *
      *
      * @param iPage
      * @param iPage
      * @param examId
      * @param examId
-     * @param courseCode
+     * @param courseId
      * @return
      * @return
      */
      */
-    public IPage<ScoreResult> scoreList(IPage<Map> iPage, Long examId, String courseCode);
+    public IPage<ScoreResult> scoreList(IPage<Map> iPage, Long examId, Long courseId);
 
 
     /**
     /**
      * 获取成绩管理需要的锁
      * 获取成绩管理需要的锁
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
      */
      */
-    public void getLock(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public void getLock(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 }
 }

+ 10 - 72
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TCFinalScoreService.java

@@ -23,115 +23,53 @@ public interface TCFinalScoreService extends IService<TCFinalScore> {
 
 
     /**
     /**
      * 导入期末成绩excel
      * 导入期末成绩excel
-     *
-     * @param file
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
-     * @throws IOException
      */
      */
-    public Map<String, String> finalScoreExcelImport(MultipartFile file, Long examId, String courseCode, String paperNumber, Long teachCourseId) throws IOException;
+    public Map<String, String> finalScoreExcelImport(MultipartFile file, Long examId, Long courseId, String paperNumber, Long teachCourseId) throws IOException;
 
 
     /**
     /**
      * 期末成绩列表(分页)
      * 期末成绩列表(分页)
-     *
-     * @param iPage
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public IPage<TCFinalScore> finalScoreList(IPage<Map> iPage, Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public IPage<TCFinalScore> finalScoreList(IPage<Map> iPage, Long examId, Long courseId, String paperNumber, Long teachCourseId);
 
 
     /**
     /**
      * 查找期末成绩分数图
      * 查找期末成绩分数图
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public FinalScoreDto finalScoreScoreOverView(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public FinalScoreDto finalScoreScoreOverView(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 
 
     /**
     /**
      * 查找期末成绩分数区间
      * 查找期末成绩分数区间
      *
      *
      * @param examId
      * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @param start
-     * @param end
-     * @return
      */
      */
-    public int getCountByScoreRange(Long examId, String courseCode, String paperNumber, Long teachCourseId, Double start, Double end);
+    public int getCountByScoreRange(Long examId, Long courseId, String paperNumber, Long teachCourseId, Double start, Double end);
 
 
     /**
     /**
      * 查找考生成绩
      * 查找考生成绩
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public List<FinalScoreResult> examStudentOverview(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public List<FinalScoreResult> examStudentOverview(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 
 
     /**
     /**
      * 同步期末成绩
      * 同步期末成绩
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
-     * @throws IOException
      */
      */
-    public Map<String, String> finalScoreSync(Long examId, String courseCode, String paperNumber, Long teachCourseId) throws IOException;
+    public Map<String, String> finalScoreSync(Long examId, Long courseId, String paperNumber, Long teachCourseId) throws IOException;
 
 
     /**
     /**
      * 根据考试id/课程编码/试卷编码删除数据
      * 根据考试id/课程编码/试卷编码删除数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public Boolean remove(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public Boolean remove(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 
 
     /**
     /**
      * 根据考试id/课程编码/试卷编码查询数据库数据
      * 根据考试id/课程编码/试卷编码查询数据库数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public List<TCFinalScore> queryFinalScore(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public List<TCFinalScore> queryFinalScore(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 
 
     /**
     /**
      * 获取期末考试同步锁
      * 获取期末考试同步锁
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
      */
      */
-    public void getFinalScoreSyncLock(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public void getFinalScoreSyncLock(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 
 
     /**
     /**
      * 获取期末考试导入锁
      * 获取期末考试导入锁
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
      */
      */
-    public void getFinalScoreImportLock(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public void getFinalScoreImportLock(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 }
 }

+ 6 - 43
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TCPaperStructService.java

@@ -19,68 +19,31 @@ public interface TCPaperStructService extends IService<TCPaperStruct> {
 
 
     /**
     /**
      * 根据考试id/课程编码/试卷编码查询数据库数据
      * 根据考试id/课程编码/试卷编码查询数据库数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public Boolean remove(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public Boolean remove(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 
 
     /**
     /**
      * 导入期末成绩-试卷结构excel
      * 导入期末成绩-试卷结构excel
-     *
-     * @param file
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
-     * @throws IOException
      */
      */
-    public Map<String, String> paperStructExcelImport(MultipartFile file, Long examId, String courseCode, String paperNumber, Long teachCourseId) throws IOException;
+    public Map<String, String> paperStructExcelImport(MultipartFile file, Long examId, Long courseId, String paperNumber, Long teachCourseId) throws IOException;
 
 
     /**
     /**
      * 同步试卷结构
      * 同步试卷结构
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
-     * @throws IOException
      */
      */
-    public Map<String, String> paperStructSync(Long examId, String courseCode, String paperNumber, Long teachCourseId) throws IOException;
+    public Map<String, String> paperStructSync(Long examId, Long courseId, String paperNumber, Long teachCourseId) throws IOException;
 
 
     /**
     /**
      * 根据考试id/科目编辑/试卷编码查询数据
      * 根据考试id/科目编辑/试卷编码查询数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public TCPaperStruct queryPaperStruct(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public TCPaperStruct queryPaperStruct(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 
 
     /**
     /**
      * 获取试卷结构同步锁
      * 获取试卷结构同步锁
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
      */
      */
-    public void getPaperStructSyncLock(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public void getPaperStructSyncLock(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 
 
     /**
     /**
      * 获取试卷结构导入锁
      * 获取试卷结构导入锁
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
      */
      */
-    public void getPaperStructImportLock(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public void getPaperStructImportLock(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 }
 }

+ 3 - 24
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TCUsualScoreService.java

@@ -21,37 +21,16 @@ public interface TCUsualScoreService extends IService<TCUsualScore> {
 
 
     /**
     /**
      * 导入平时成绩excel
      * 导入平时成绩excel
-     *
-     * @param file
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
-     * @throws IOException
      */
      */
-    public Map<String, String> usualScoreExcelImport(MultipartFile file, Long examId, String courseCode, String paperNumber, Long teachCourseId) throws IOException;
+    public Map<String, String> usualScoreExcelImport(MultipartFile file, Long examId, Long courseId, String paperNumber, Long teachCourseId) throws IOException;
 
 
     /**
     /**
      * 平时成绩列表(分页)
      * 平时成绩列表(分页)
-     *
-     * @param iPage
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public IPage<TCUsualScore> usualScoreList(IPage<Map> iPage, Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public IPage<TCUsualScore> usualScoreList(IPage<Map> iPage, Long examId, Long courseId, String paperNumber, Long teachCourseId);
 
 
     /**
     /**
      * 根据考试id/课程编码/试卷编码查询数据库数据
      * 根据考试id/课程编码/试卷编码查询数据库数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public List<TCUsualScore> queryUsualScore(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public List<TCUsualScore> queryUsualScore(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 }
 }

+ 3 - 21
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TRBasicInfoService.java

@@ -27,14 +27,8 @@ public interface TRBasicInfoService extends IService<TRBasicInfo> {
 
 
     /**
     /**
      * 根据考试id/课程编码/试卷编码查询数据库数据
      * 根据考试id/课程编码/试卷编码查询数据库数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public TRBasicInfo queryBasicInfo(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public TRBasicInfo queryBasicInfo(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 
 
     /**
     /**
      * 获取课程目标考核分布-分数图
      * 获取课程目标考核分布-分数图
@@ -119,14 +113,8 @@ public interface TRBasicInfoService extends IService<TRBasicInfo> {
 
 
     /**
     /**
      * 根据考试id/课程编码/试卷编码删除数据
      * 根据考试id/课程编码/试卷编码删除数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public Boolean remove(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public Boolean remove(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 
 
     /**
     /**
      * 查找课程评价值
      * 查找课程评价值
@@ -146,12 +134,6 @@ public interface TRBasicInfoService extends IService<TRBasicInfo> {
 
 
     /**
     /**
      * 清除报告数据
      * 清除报告数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @param clearDimension
      */
      */
-    public void clearReportData(Long examId, String courseCode, String paperNumber, Long teachCourseId, boolean clearDimension);
+    public void clearReportData(Long examId, Long courseId, String paperNumber, Long teachCourseId, boolean clearDimension);
 }
 }

+ 1 - 7
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TRExamStudentService.java

@@ -37,12 +37,6 @@ public interface TRExamStudentService extends IService<TRExamStudent> {
 
 
     /**
     /**
      * 根据考试id/课程编码/试卷编码删除数据
      * 根据考试id/课程编码/试卷编码删除数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
-    public Boolean remove(Long examId, String courseCode, String paperNumber, Long teachCourseId);
+    public Boolean remove(Long examId, Long courseId, String paperNumber, Long teachCourseId);
 }
 }

+ 12 - 22
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/PrintCommonServiceImpl.java

@@ -229,13 +229,13 @@ public class PrintCommonServiceImpl implements PrintCommonService {
      * @return
      * @return
      */
      */
     @Override
     @Override
-    public MarkPaper scoreImportExcelVaild(MultipartFile file, Long examId, String courseCode, String paperNumber) throws IOException {
+    public MarkPaper scoreImportExcelVaild(MultipartFile file, Long examId, Long courseId, String paperNumber) throws IOException {
         String reqFileMd5 = ServletUtil.getRequestMd5();
         String reqFileMd5 = ServletUtil.getRequestMd5();
         String fileMd5 = DigestUtils.md5Hex(file.getBytes());
         String fileMd5 = DigestUtils.md5Hex(file.getBytes());
         if (!Objects.equals(fileMd5, reqFileMd5)) {
         if (!Objects.equals(fileMd5, reqFileMd5)) {
             throw ExceptionResultEnum.MD5_EQUALS_FALSE.exception();
             throw ExceptionResultEnum.MD5_EQUALS_FALSE.exception();
         }
         }
-        return this.getMarkPaper(examId, courseCode, paperNumber);
+        return this.getMarkPaper(examId, courseId, paperNumber);
     }
     }
 
 
     /**
     /**
@@ -246,13 +246,13 @@ public class PrintCommonServiceImpl implements PrintCommonService {
      * @return
      * @return
      */
      */
     @Override
     @Override
-    public MarkPaper getMarkPaper(Long examId, String courseCode, String paperNumber) {
+    public MarkPaper getMarkPaper(Long examId, Long courseId, String paperNumber) {
         MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examId, paperNumber);
         MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examId, paperNumber);
         if (Objects.isNull(markPaper)) {
         if (Objects.isNull(markPaper)) {
-            BasicCourse basicCourse = basicCourseService.getByCode(courseCode);
+            BasicCourse basicCourse = basicCourseService.getById(courseId);
             Objects.requireNonNull(basicCourse, "未找到基础课程信息");
             Objects.requireNonNull(basicCourse, "未找到基础课程信息");
             // todo 课程ID,目标达成度,未改
             // todo 课程ID,目标达成度,未改
-            markPaper = new MarkPaper(examId, null, paperNumber, 100d, 60d);
+            markPaper = new MarkPaper(examId, courseId, paperNumber, 100d, 60d);
         }
         }
         return markPaper;
         return markPaper;
     }
     }
@@ -358,33 +358,23 @@ public class PrintCommonServiceImpl implements PrintCommonService {
 
 
     /**
     /**
      * 成绩管理列表
      * 成绩管理列表
-     *
-     * @param iPage
-     * @param examId
-     * @param courseCode
-     * @return
      */
      */
     @Override
     @Override
-    public IPage<ScoreResult> scoreList(IPage<Map> iPage, Long examId, String courseCode) {
+    public IPage<ScoreResult> scoreList(IPage<Map> iPage, Long examId, Long courseId) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(sysUser.getSchoolId(), sysUser.getId(), ServletUtil.getRequest().getServletPath());
         DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(sysUser.getSchoolId(), sysUser.getId(), ServletUtil.getRequest().getServletPath());
-        return tcUsualScoreMapper.scoreList(iPage, examId, courseCode, dpr);
+        return tcUsualScoreMapper.scoreList(iPage, examId, courseId, dpr);
     }
     }
 
 
     /**
     /**
      * 获取成绩管理需要的锁
      * 获取成绩管理需要的锁
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
      */
      */
     @Override
     @Override
-    public void getLock(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
-        tcFinalScoreService.getFinalScoreSyncLock(examId, courseCode, paperNumber, teachCourseId);
-        tcFinalScoreService.getFinalScoreImportLock(examId, courseCode, paperNumber, teachCourseId);
-        tcPaperStructService.getPaperStructSyncLock(examId, courseCode, paperNumber, teachCourseId);
-        tcPaperStructService.getPaperStructImportLock(examId, courseCode, paperNumber, teachCourseId);
+    public void getLock(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
+        tcFinalScoreService.getFinalScoreSyncLock(examId, courseId, paperNumber, teachCourseId);
+        tcFinalScoreService.getFinalScoreImportLock(examId, courseId, paperNumber, teachCourseId);
+        tcPaperStructService.getPaperStructSyncLock(examId, courseId, paperNumber, teachCourseId);
+        tcPaperStructService.getPaperStructImportLock(examId, courseId, paperNumber, teachCourseId);
     }
     }
 
 
     /**
     /**

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

@@ -81,23 +81,15 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
 
 
     /**
     /**
      * 导入期末成绩excel
      * 导入期末成绩excel
-     *
-     * @param file
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
-     * @throws IOException
      */
      */
     @Override
     @Override
     @Transactional
     @Transactional
-    public Map<String, String> finalScoreExcelImport(MultipartFile file, Long examId, String courseCode, String paperNumber, Long teachCourseId) throws IOException {
+    public Map<String, String> finalScoreExcelImport(MultipartFile file, Long examId, Long courseId, String paperNumber, Long teachCourseId) throws IOException {
         log.debug("导入Excel开始...");
         log.debug("导入Excel开始...");
         long start = System.currentTimeMillis();
         long start = System.currentTimeMillis();
         Map<String, String> messageMap = new LinkedHashMap<>();
         Map<String, String> messageMap = new LinkedHashMap<>();
         try {
         try {
-            MarkPaper markPaper = printCommonService.scoreImportExcelVaild(file, examId, courseCode, paperNumber);
+            MarkPaper markPaper = printCommonService.scoreImportExcelVaild(file, examId, courseId, paperNumber);
             Double totalScore = 100d;
             Double totalScore = 100d;
 
 
             StringJoiner errorData = new StringJoiner("");
             StringJoiner errorData = new StringJoiner("");
@@ -129,7 +121,7 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
                         }
                         }
                         boolean error = false;
                         boolean error = false;
                         List<TCFinalScoreDto> tcFinalScoreDtoList = new ArrayList<>();
                         List<TCFinalScoreDto> tcFinalScoreDtoList = new ArrayList<>();
-                        TCFinalScore tcFinalScore = new TCFinalScore(examId, courseCode, markPaper.getCourseName(), paperNumber, teachCourseId, SourceEnum.EXCEL_IMPORT, sysUser.getId());
+                        TCFinalScore tcFinalScore = new TCFinalScore(examId, courseId, paperNumber, teachCourseId, SourceEnum.EXCEL_IMPORT, sysUser.getId());
                         BigDecimal score = new BigDecimal(0);
                         BigDecimal score = new BigDecimal(0);
                         for (int j = 0; j < strs.length; j++) {
                         for (int j = 0; j < strs.length; j++) {
                             if (Objects.isNull(strs[j]) || Objects.equals(strs[j].trim(), "")) {
                             if (Objects.isNull(strs[j]) || Objects.equals(strs[j].trim(), "")) {
@@ -176,11 +168,11 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
                 }
                 }
                 if (!CollectionUtils.isEmpty(tcFinalScoreList)) {
                 if (!CollectionUtils.isEmpty(tcFinalScoreList)) {
                     successData.add("共导入").add(tcFinalScoreList.size() + "").add("条数据");
                     successData.add("共导入").add(tcFinalScoreList.size() + "").add("条数据");
-                    List<TCFinalScore> tcFinalScoreDbSourceList = tcFinalScoreService.queryFinalScore(examId, courseCode, paperNumber, teachCourseId);
+                    List<TCFinalScore> tcFinalScoreDbSourceList = tcFinalScoreService.queryFinalScore(examId, courseId, paperNumber, teachCourseId);
                     if (CollectionUtils.isEmpty(tcFinalScoreDbSourceList) || !CollectionUtils.isEqualCollection(tcFinalScoreDbSourceList, tcFinalScoreList)) {
                     if (CollectionUtils.isEmpty(tcFinalScoreDbSourceList) || !CollectionUtils.isEqualCollection(tcFinalScoreDbSourceList, tcFinalScoreList)) {
                         tcFinalScoreService.removeByIds(tcFinalScoreDbSourceList.stream().map(s -> s.getId()).collect(Collectors.toList()));
                         tcFinalScoreService.removeByIds(tcFinalScoreDbSourceList.stream().map(s -> s.getId()).collect(Collectors.toList()));
                         tcFinalScoreService.saveBatch(tcFinalScoreList);
                         tcFinalScoreService.saveBatch(tcFinalScoreList);
-                        trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, true);
+                        trBasicInfoService.clearReportData(examId, courseId, paperNumber, teachCourseId, true);
                     }
                     }
                 }
                 }
             }
             }
@@ -206,76 +198,42 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
 
 
     /**
     /**
      * 期末成绩列表(分页)
      * 期末成绩列表(分页)
-     *
-     * @param iPage
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
     @Override
     @Override
-    public IPage<TCFinalScore> finalScoreList(IPage<Map> iPage, Long examId, String courseCode, String paperNumber, Long teachCourseId) {
-        return this.baseMapper.finalScoreList(iPage, examId, courseCode, paperNumber, teachCourseId);
+    public IPage<TCFinalScore> finalScoreList(IPage<Map> iPage, Long examId, Long courseId, String paperNumber, Long teachCourseId) {
+        return this.baseMapper.finalScoreList(iPage, examId, courseId, paperNumber, teachCourseId);
     }
     }
 
 
     /**
     /**
      * 查找期末成绩分数图
      * 查找期末成绩分数图
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
     @Override
     @Override
-    public FinalScoreDto finalScoreScoreOverView(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
-        return this.baseMapper.finalScoreScoreOverView(examId, courseCode, paperNumber, teachCourseId);
+    public FinalScoreDto finalScoreScoreOverView(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
+        return this.baseMapper.finalScoreScoreOverView(examId, courseId, paperNumber, teachCourseId);
     }
     }
 
 
     /**
     /**
      * 查找期末成绩分数区间
      * 查找期末成绩分数区间
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @param start
-     * @param end
-     * @return
      */
      */
     @Override
     @Override
-    public int getCountByScoreRange(Long examId, String courseCode, String paperNumber, Long teachCourseId, Double start, Double end) {
-        return this.baseMapper.getCountByScoreRange(examId, courseCode, paperNumber, teachCourseId, start, end);
+    public int getCountByScoreRange(Long examId, Long courseId, String paperNumber, Long teachCourseId, Double start, Double end) {
+        return this.baseMapper.getCountByScoreRange(examId, courseId, paperNumber, teachCourseId, start, end);
     }
     }
 
 
     /**
     /**
      * 查找考生成绩
      * 查找考生成绩
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
     @Override
     @Override
-    public List<FinalScoreResult> examStudentOverview(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
-        return this.baseMapper.examStudentOverview(examId, courseCode, paperNumber, teachCourseId);
+    public List<FinalScoreResult> examStudentOverview(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
+        return this.baseMapper.examStudentOverview(examId, courseId, paperNumber, teachCourseId);
     }
     }
 
 
     /**
     /**
      * 同步期末成绩
      * 同步期末成绩
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
-     * @throws IOException
      */
      */
     @Override
     @Override
     @Transactional
     @Transactional
-    public Map<String, String> finalScoreSync(Long examId, String courseCode, String paperNumber, Long teachCourseId) throws IOException {
+    public Map<String, String> finalScoreSync(Long examId, Long courseId, String paperNumber, Long teachCourseId) throws IOException {
         Map<String, String> messageMap = new LinkedHashMap<>();
         Map<String, String> messageMap = new LinkedHashMap<>();
         try {
         try {
             SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
             SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
@@ -301,22 +259,22 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
                 }
                 }
                 if (!CollectionUtils.isEmpty(tcFinalScoreList) && !CollectionUtils.isEmpty(paperStructDimensionResultList)) {
                 if (!CollectionUtils.isEmpty(tcFinalScoreList) && !CollectionUtils.isEmpty(paperStructDimensionResultList)) {
                     successData.add("共同步").add(tcFinalScoreList.size() + "").add("条数据");
                     successData.add("共同步").add(tcFinalScoreList.size() + "").add("条数据");
-                    List<TCFinalScore> tcFinalScoreDbSourceList = tcFinalScoreService.queryFinalScore(examId, courseCode, paperNumber, teachCourseId);
+                    List<TCFinalScore> tcFinalScoreDbSourceList = tcFinalScoreService.queryFinalScore(examId, courseId, paperNumber, teachCourseId);
                     if (CollectionUtils.isEmpty(tcFinalScoreDbSourceList) || !CollectionUtils.isEqualCollection(tcFinalScoreDbSourceList, tcFinalScoreList)) {
                     if (CollectionUtils.isEmpty(tcFinalScoreDbSourceList) || !CollectionUtils.isEqualCollection(tcFinalScoreDbSourceList, tcFinalScoreList)) {
                         tcFinalScoreService.removeByIds(tcFinalScoreDbSourceList.stream().map(s -> s.getId()).collect(Collectors.toList()));
                         tcFinalScoreService.removeByIds(tcFinalScoreDbSourceList.stream().map(s -> s.getId()).collect(Collectors.toList()));
                         tcFinalScoreService.saveBatch(tcFinalScoreList);
                         tcFinalScoreService.saveBatch(tcFinalScoreList);
-                        trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, true);
+                        trBasicInfoService.clearReportData(examId, courseId, paperNumber, teachCourseId, true);
                     }
                     }
-                    TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseCode, null, teachCourseId);
+                    TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseId, null, teachCourseId);
                     if (Objects.nonNull(tcPaperStruct)) {
                     if (Objects.nonNull(tcPaperStruct)) {
                         tcPaperStruct.setPaperNumber(paperNumber);
                         tcPaperStruct.setPaperNumber(paperNumber);
                         tcPaperStruct.setPaperStruct(JacksonUtil.parseJson(paperStructDimensionResultList));
                         tcPaperStruct.setPaperStruct(JacksonUtil.parseJson(paperStructDimensionResultList));
                         tcPaperStruct.updateInfo(sysUser.getId());
                         tcPaperStruct.updateInfo(sysUser.getId());
                         tcPaperStructService.updateById(tcPaperStruct);
                         tcPaperStructService.updateById(tcPaperStruct);
                     } else {
                     } else {
-                        BasicCourse basicCourse = basicCourseService.getByCode(courseCode);
+                        BasicCourse basicCourse = basicCourseService.getById(courseId);
                         Objects.requireNonNull(basicCourse, "未找到基础课程信息");
                         Objects.requireNonNull(basicCourse, "未找到基础课程信息");
-                        tcPaperStruct = new TCPaperStruct(examId, courseCode, basicCourse.getName(), paperNumber, teachCourseId, JacksonUtil.parseJson(paperStructDimensionResultList), sysUser.getId());
+                        tcPaperStruct = new TCPaperStruct(examId, courseId, paperNumber, teachCourseId, JacksonUtil.parseJson(paperStructDimensionResultList), sysUser.getId());
                     }
                     }
                     tcPaperStructService.saveOrUpdate(tcPaperStruct);
                     tcPaperStructService.saveOrUpdate(tcPaperStruct);
                 }
                 }
@@ -340,18 +298,12 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
 
 
     /**
     /**
      * 根据考试id/课程编码/试卷编码删除数据
      * 根据考试id/课程编码/试卷编码删除数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
     @Override
     @Override
     @Transactional
     @Transactional
-    public Boolean remove(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
+    public Boolean remove(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
         QueryWrapper<TCFinalScore> queryWrapper = new QueryWrapper<>();
         QueryWrapper<TCFinalScore> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(TCFinalScore::getExamId, examId).eq(TCFinalScore::getCourseCode, courseCode);
+        queryWrapper.lambda().eq(TCFinalScore::getExamId, examId).eq(TCFinalScore::getCourseId, courseId);
         if (Objects.nonNull(paperNumber)) {
         if (Objects.nonNull(paperNumber)) {
             queryWrapper.lambda().and(w -> w.eq(TCFinalScore::getPaperNumber, paperNumber).or().isNull(TCFinalScore::getPaperNumber));
             queryWrapper.lambda().and(w -> w.eq(TCFinalScore::getPaperNumber, paperNumber).or().isNull(TCFinalScore::getPaperNumber));
         }
         }
@@ -361,17 +313,11 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
 
 
     /**
     /**
      * 根据考试id/课程编码/试卷编码查询数据库数据
      * 根据考试id/课程编码/试卷编码查询数据库数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
     @Override
     @Override
-    public List<TCFinalScore> queryFinalScore(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
+    public List<TCFinalScore> queryFinalScore(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
         QueryWrapper<TCFinalScore> queryWrapper = new QueryWrapper<>();
         QueryWrapper<TCFinalScore> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(TCFinalScore::getExamId, examId).eq(TCFinalScore::getCourseCode, courseCode);
+        queryWrapper.lambda().eq(TCFinalScore::getExamId, examId).eq(TCFinalScore::getCourseId, courseId);
         if (Objects.nonNull(paperNumber)) {
         if (Objects.nonNull(paperNumber)) {
             queryWrapper.lambda().and(w -> w.eq(TCFinalScore::getPaperNumber, paperNumber).or().isNull(TCFinalScore::getPaperNumber));
             queryWrapper.lambda().and(w -> w.eq(TCFinalScore::getPaperNumber, paperNumber).or().isNull(TCFinalScore::getPaperNumber));
         }
         }
@@ -381,14 +327,10 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
 
 
     /**
     /**
      * 获取期末考试同步锁
      * 获取期末考试同步锁
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
      */
      */
     @Override
     @Override
-    public void getFinalScoreSyncLock(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
-        String lockKey = SystemConstant.REDIS_FINAL_SCORE_DATA_FLOW_PREFIX + SystemConstant.SYNC + examId + "_" + courseCode + "_" + paperNumber + "_" + teachCourseId;
+    public void getFinalScoreSyncLock(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
+        String lockKey = SystemConstant.REDIS_FINAL_SCORE_DATA_FLOW_PREFIX + SystemConstant.SYNC + examId + "_" + courseId + "_" + paperNumber + "_" + teachCourseId;
         Object o = redisUtil.get(lockKey);
         Object o = redisUtil.get(lockKey);
         if (Objects.nonNull(o)) {
         if (Objects.nonNull(o)) {
             throw ExceptionResultEnum.ERROR.exception("正在同步期末成绩数据,请稍候再试!");
             throw ExceptionResultEnum.ERROR.exception("正在同步期末成绩数据,请稍候再试!");
@@ -397,14 +339,10 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
 
 
     /**
     /**
      * 获取期末考试导入锁
      * 获取期末考试导入锁
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
      */
      */
     @Override
     @Override
-    public void getFinalScoreImportLock(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
-        String lockKey = SystemConstant.REDIS_FINAL_SCORE_DATA_FLOW_PREFIX + SystemConstant.IMPORT + examId + "_" + courseCode + "_" + paperNumber + "_" + teachCourseId;
+    public void getFinalScoreImportLock(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
+        String lockKey = SystemConstant.REDIS_FINAL_SCORE_DATA_FLOW_PREFIX + SystemConstant.IMPORT + examId + "_" + courseId + "_" + paperNumber + "_" + teachCourseId;
         Object o = redisUtil.get(lockKey);
         Object o = redisUtil.get(lockKey);
         if (Objects.nonNull(o)) {
         if (Objects.nonNull(o)) {
             throw ExceptionResultEnum.ERROR.exception("正在导入期末成绩数据,请稍候再试!");
             throw ExceptionResultEnum.ERROR.exception("正在导入期末成绩数据,请稍候再试!");

+ 23 - 61
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCPaperStructServiceImpl.java

@@ -69,18 +69,12 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
 
 
     /**
     /**
      * 根据考试id/课程编码/试卷编码查询数据库数据
      * 根据考试id/课程编码/试卷编码查询数据库数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
     @Override
     @Override
     @Transactional
     @Transactional
-    public Boolean remove(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
+    public Boolean remove(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
         QueryWrapper<TCPaperStruct> queryWrapper = new QueryWrapper<>();
         QueryWrapper<TCPaperStruct> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(TCPaperStruct::getExamId, examId).eq(TCPaperStruct::getCourseCode, courseCode);
+        queryWrapper.lambda().eq(TCPaperStruct::getExamId, examId).eq(TCPaperStruct::getCourseId, courseId);
         if (Objects.nonNull(paperNumber)) {
         if (Objects.nonNull(paperNumber)) {
             queryWrapper.lambda().and(w -> w.eq(TCPaperStruct::getPaperNumber, paperNumber).or().isNull(TCPaperStruct::getPaperNumber));
             queryWrapper.lambda().and(w -> w.eq(TCPaperStruct::getPaperNumber, paperNumber).or().isNull(TCPaperStruct::getPaperNumber));
         }
         }
@@ -90,23 +84,15 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
 
 
     /**
     /**
      * 导入期末成绩-试卷结构excel
      * 导入期末成绩-试卷结构excel
-     *
-     * @param file
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
-     * @throws IOException
      */
      */
     @Override
     @Override
     @Transactional
     @Transactional
-    public Map<String, String> paperStructExcelImport(MultipartFile file, Long examId, String courseCode, String paperNumber, Long teachCourseId) throws IOException {
+    public Map<String, String> paperStructExcelImport(MultipartFile file, Long examId, Long courseId, String paperNumber, Long teachCourseId) throws IOException {
         log.debug("导入Excel开始...");
         log.debug("导入Excel开始...");
         long start = System.currentTimeMillis();
         long start = System.currentTimeMillis();
         Map<String, String> messageMap = new LinkedHashMap<>();
         Map<String, String> messageMap = new LinkedHashMap<>();
         try {
         try {
-            MarkPaper markPaper = printCommonService.scoreImportExcelVaild(file, examId, courseCode, paperNumber);
+            MarkPaper markPaper = printCommonService.scoreImportExcelVaild(file, examId, courseId, paperNumber);
             StringJoiner errorData = new StringJoiner("");
             StringJoiner errorData = new StringJoiner("");
             StringJoiner successData = new StringJoiner("");
             StringJoiner successData = new StringJoiner("");
 
 
@@ -160,13 +146,13 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
                 }
                 }
                 if (!CollectionUtils.isEmpty(paperStructDtoNewList)) {
                 if (!CollectionUtils.isEmpty(paperStructDtoNewList)) {
                     successData.add("共导入").add(paperStructDtoNewList.size() + "").add("条数据");
                     successData.add("共导入").add(paperStructDtoNewList.size() + "").add("条数据");
-                    TCPaperStruct tcPaperStruct = new TCPaperStruct(examId, courseCode, markPaper.getCourseName(), paperNumber, teachCourseId, JacksonUtil.parseJson(paperStructDtoNewList), totalScore, 60d, sysUser.getId());
-                    TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(examId, courseCode, paperNumber, teachCourseId);
+                    TCPaperStruct tcPaperStruct = new TCPaperStruct(examId, courseId, paperNumber, teachCourseId, JacksonUtil.parseJson(paperStructDtoNewList), totalScore, 60d, sysUser.getId());
+                    TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(examId, courseId, paperNumber, teachCourseId);
                     if (Objects.nonNull(tcPaperStructDb) && !tcPaperStructDb.equals(tcPaperStruct)) {
                     if (Objects.nonNull(tcPaperStructDb) && !tcPaperStructDb.equals(tcPaperStruct)) {
-                        tcFinalScoreService.remove(examId, courseCode, paperNumber, teachCourseId);
-                        trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, true);
+                        tcFinalScoreService.remove(examId, courseId, paperNumber, teachCourseId);
+                        trBasicInfoService.clearReportData(examId, courseId, paperNumber, teachCourseId, true);
                     }
                     }
-                    tcPaperStructService.remove(examId, courseCode, paperNumber, teachCourseId);
+                    tcPaperStructService.remove(examId, courseId, paperNumber, teachCourseId);
                     tcPaperStructService.save(tcPaperStruct);
                     tcPaperStructService.save(tcPaperStruct);
                 }
                 }
             }
             }
@@ -193,17 +179,10 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
 
 
     /**
     /**
      * 同步试卷结构
      * 同步试卷结构
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
-     * @throws IOException
      */
      */
     @Override
     @Override
     @Transactional
     @Transactional
-    public Map<String, String> paperStructSync(Long examId, String courseCode, String paperNumber, Long teachCourseId) throws IOException {
+    public Map<String, String> paperStructSync(Long examId, Long courseId, String paperNumber, Long teachCourseId) throws IOException {
         Map<String, String> messageMap = new LinkedHashMap<>();
         Map<String, String> messageMap = new LinkedHashMap<>();
         try {
         try {
             SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
             SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
@@ -223,7 +202,7 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
                 paperStructList.add(p.getMainNumber() + "_" + p.getSubNumber() + "_" + p.getScore());
                 paperStructList.add(p.getMainNumber() + "_" + p.getSubNumber() + "_" + p.getScore());
             }
             }
             successData.add("共同步").add(paperStructDimensionResultList.size() + "").add("条数据");
             successData.add("共同步").add(paperStructDimensionResultList.size() + "").add("条数据");
-            TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(examId, courseCode, paperNumber, teachCourseId);
+            TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(examId, courseId, paperNumber, teachCourseId);
             TCPaperStruct tcPaperStruct = null;
             TCPaperStruct tcPaperStruct = null;
             if (Objects.nonNull(tcPaperStructDb) && Objects.nonNull(tcPaperStructDb.getPaperStructDimension())) {
             if (Objects.nonNull(tcPaperStructDb) && Objects.nonNull(tcPaperStructDb.getPaperStructDimension())) {
                 tcPaperStruct = new TCPaperStruct();
                 tcPaperStruct = new TCPaperStruct();
@@ -245,16 +224,15 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
                     Collections.sort(paperStructDbList);
                     Collections.sort(paperStructDbList);
                     Collections.sort(paperStructList);
                     Collections.sort(paperStructList);
 
 
-                    tcFinalScoreService.remove(examId, courseCode, paperNumber, teachCourseId);
-                    trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, false);
+                    tcFinalScoreService.remove(examId, courseId, paperNumber, teachCourseId);
+                    trBasicInfoService.clearReportData(examId, courseId, paperNumber, teachCourseId, false);
                     tcPaperStruct.setPaperStruct(null);
                     tcPaperStruct.setPaperStruct(null);
                 }
                 }
                 tcPaperStruct.updateInfo(sysUser.getId());
                 tcPaperStruct.updateInfo(sysUser.getId());
             } else {
             } else {
-                tcPaperStructService.remove(examId, courseCode, paperNumber, teachCourseId);
-                MarkPaper markPaper = printCommonService.getMarkPaper(examId, courseCode, paperNumber);
+                tcPaperStructService.remove(examId, courseId, paperNumber, teachCourseId);
                 CourseWeightResult courseWeightResult = trBasicInfoService.findCourseWeightResultRmi(teachCourseId);
                 CourseWeightResult courseWeightResult = trBasicInfoService.findCourseWeightResultRmi(teachCourseId);
-                tcPaperStruct = new TCPaperStruct(examId, courseCode, markPaper.getCourseName(), paperNumber, teachCourseId, JacksonUtil.parseJson(paperStructDimensionResultList), sysUser.getId(), courseWeightResult.getDimensionSign());
+                tcPaperStruct = new TCPaperStruct(examId, courseId, paperNumber, teachCourseId, JacksonUtil.parseJson(paperStructDimensionResultList), sysUser.getId(), courseWeightResult.getDimensionSign());
                 List<MarkQuestion> markQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndPaperType(examId, paperNumber, null);
                 List<MarkQuestion> markQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndPaperType(examId, paperNumber, null);
                 if (CollectionUtils.isEmpty(markQuestionList)) {
                 if (CollectionUtils.isEmpty(markQuestionList)) {
                     throw ExceptionResultEnum.ERROR.exception("未找到试卷结构");
                     throw ExceptionResultEnum.ERROR.exception("未找到试卷结构");
@@ -264,8 +242,8 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
                     Collections.sort(paperStructDbList);
                     Collections.sort(paperStructDbList);
                     Collections.sort(paperStructList);
                     Collections.sort(paperStructList);
 
 
-                    tcFinalScoreService.remove(examId, courseCode, paperNumber, teachCourseId);
-                    trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, false);
+                    tcFinalScoreService.remove(examId, courseId, paperNumber, teachCourseId);
+                    trBasicInfoService.clearReportData(examId, courseId, paperNumber, teachCourseId, false);
                 }
                 }
             }
             }
             tcPaperStructService.saveOrUpdate(tcPaperStruct);
             tcPaperStructService.saveOrUpdate(tcPaperStruct);
@@ -288,17 +266,11 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
 
 
     /**
     /**
      * 根据考试id/科目编辑/试卷编码查询数据
      * 根据考试id/科目编辑/试卷编码查询数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
     @Override
     @Override
-    public TCPaperStruct queryPaperStruct(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
+    public TCPaperStruct queryPaperStruct(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
         QueryWrapper<TCPaperStruct> queryWrapper = new QueryWrapper<>();
         QueryWrapper<TCPaperStruct> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(TCPaperStruct::getExamId, examId).eq(TCPaperStruct::getCourseCode, courseCode);
+        queryWrapper.lambda().eq(TCPaperStruct::getExamId, examId).eq(TCPaperStruct::getCourseId, courseId);
         if (Objects.nonNull(paperNumber)) {
         if (Objects.nonNull(paperNumber)) {
             queryWrapper.lambda().and(w -> w.eq(TCPaperStruct::getPaperNumber, paperNumber).or().isNull(TCPaperStruct::getPaperNumber));
             queryWrapper.lambda().and(w -> w.eq(TCPaperStruct::getPaperNumber, paperNumber).or().isNull(TCPaperStruct::getPaperNumber));
         }
         }
@@ -308,15 +280,10 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
 
 
     /**
     /**
      * 获取试卷结构同步锁
      * 获取试卷结构同步锁
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
      */
      */
     @Override
     @Override
-    public void getPaperStructSyncLock(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
-        String lockKey = SystemConstant.REDIS_PAPER_STRUCT_FLOW_PREFIX + SystemConstant.SYNC + examId + "_" + courseCode + "_" + paperNumber + "_" + teachCourseId;
+    public void getPaperStructSyncLock(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
+        String lockKey = SystemConstant.REDIS_PAPER_STRUCT_FLOW_PREFIX + SystemConstant.SYNC + examId + "_" + courseId + "_" + paperNumber + "_" + teachCourseId;
         Object o = redisUtil.get(lockKey);
         Object o = redisUtil.get(lockKey);
         if (Objects.nonNull(o)) {
         if (Objects.nonNull(o)) {
             throw ExceptionResultEnum.ERROR.exception("正在同步试卷蓝图数据,请稍候再试!");
             throw ExceptionResultEnum.ERROR.exception("正在同步试卷蓝图数据,请稍候再试!");
@@ -325,15 +292,10 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
 
 
     /**
     /**
      * 获取试卷结构导入锁
      * 获取试卷结构导入锁
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
      */
      */
     @Override
     @Override
-    public void getPaperStructImportLock(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
-        String lockKey = SystemConstant.REDIS_PAPER_STRUCT_FLOW_PREFIX + SystemConstant.IMPORT + examId + "_" + courseCode + "_" + paperNumber + "_" + teachCourseId;
+    public void getPaperStructImportLock(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
+        String lockKey = SystemConstant.REDIS_PAPER_STRUCT_FLOW_PREFIX + SystemConstant.IMPORT + examId + "_" + courseId + "_" + paperNumber + "_" + teachCourseId;
         Object o = redisUtil.get(lockKey);
         Object o = redisUtil.get(lockKey);
         if (Objects.nonNull(o)) {
         if (Objects.nonNull(o)) {
             throw ExceptionResultEnum.ERROR.exception("正在导入试卷蓝图数据,请稍候再试!");
             throw ExceptionResultEnum.ERROR.exception("正在导入试卷蓝图数据,请稍候再试!");

+ 9 - 30
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCUsualScoreServiceImpl.java

@@ -56,23 +56,15 @@ public class TCUsualScoreServiceImpl extends ServiceImpl<TCUsualScoreMapper, TCU
 
 
     /**
     /**
      * 导入平时成绩excel
      * 导入平时成绩excel
-     *
-     * @param file
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
-     * @throws IOException
      */
      */
     @Override
     @Override
     @Transactional
     @Transactional
-    public Map<String, String> usualScoreExcelImport(MultipartFile file, Long examId, String courseCode, String paperNumber, Long teachCourseId) throws IOException {
+    public Map<String, String> usualScoreExcelImport(MultipartFile file, Long examId, Long courseId, String paperNumber, Long teachCourseId) throws IOException {
         log.debug("导入Excel开始...");
         log.debug("导入Excel开始...");
         long start = System.currentTimeMillis();
         long start = System.currentTimeMillis();
         Map<String, String> messageMap = new LinkedHashMap<>();
         Map<String, String> messageMap = new LinkedHashMap<>();
         try {
         try {
-            MarkPaper markPaper = printCommonService.scoreImportExcelVaild(file, examId, courseCode, paperNumber);
+            MarkPaper markPaper = printCommonService.scoreImportExcelVaild(file, examId, courseId, paperNumber);
             Double totalScore = 100d;
             Double totalScore = 100d;
 
 
             StringJoiner errorData = new StringJoiner("");
             StringJoiner errorData = new StringJoiner("");
@@ -101,7 +93,7 @@ public class TCUsualScoreServiceImpl extends ServiceImpl<TCUsualScoreMapper, TCU
                         }
                         }
                         boolean error = false;
                         boolean error = false;
                         List<TCUsualScoreDto> tcUsualScoreDtoList = new ArrayList<>();
                         List<TCUsualScoreDto> tcUsualScoreDtoList = new ArrayList<>();
-                        TCUsualScore tcUsualScore = new TCUsualScore(examId, courseCode, markPaper.getCourseName(), paperNumber, teachCourseId, sysUser.getId());
+                        TCUsualScore tcUsualScore = new TCUsualScore(examId, courseId, paperNumber, teachCourseId, sysUser.getId());
                         for (int j = 0; j < strs.length; j++) {
                         for (int j = 0; j < strs.length; j++) {
                             if (Objects.isNull(strs[j]) || Objects.equals(strs[j].trim(), "")) {
                             if (Objects.isNull(strs[j]) || Objects.equals(strs[j].trim(), "")) {
                                 errorData.add("excel第").add((i + 1) + "").add("行[").add(columnNames[j] + "]为空;").add("\r\n");
                                 errorData.add("excel第").add((i + 1) + "").add("行[").add(columnNames[j] + "]为空;").add("\r\n");
@@ -137,11 +129,11 @@ public class TCUsualScoreServiceImpl extends ServiceImpl<TCUsualScoreMapper, TCU
                 }
                 }
                 if (!CollectionUtils.isEmpty(tcUsualScoreList)) {
                 if (!CollectionUtils.isEmpty(tcUsualScoreList)) {
                     successData.add("共导入").add(tcUsualScoreList.size() + "").add("条数据");
                     successData.add("共导入").add(tcUsualScoreList.size() + "").add("条数据");
-                    List<TCUsualScore> tcUsualScoreDbSourceList = tcUsualScoreService.queryUsualScore(examId, courseCode, paperNumber, teachCourseId);
+                    List<TCUsualScore> tcUsualScoreDbSourceList = tcUsualScoreService.queryUsualScore(examId, courseId, paperNumber, teachCourseId);
                     if (CollectionUtils.isEmpty(tcUsualScoreDbSourceList) || !CollectionUtils.isEqualCollection(tcUsualScoreDbSourceList, tcUsualScoreList)) {
                     if (CollectionUtils.isEmpty(tcUsualScoreDbSourceList) || !CollectionUtils.isEqualCollection(tcUsualScoreDbSourceList, tcUsualScoreList)) {
                         tcUsualScoreService.removeByIds(tcUsualScoreDbSourceList.stream().map(s -> s.getId()).collect(Collectors.toList()));
                         tcUsualScoreService.removeByIds(tcUsualScoreDbSourceList.stream().map(s -> s.getId()).collect(Collectors.toList()));
                         tcUsualScoreService.saveBatch(tcUsualScoreList);
                         tcUsualScoreService.saveBatch(tcUsualScoreList);
-                        trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, false);
+                        trBasicInfoService.clearReportData(examId, courseId, paperNumber, teachCourseId, false);
                     }
                     }
                 }
                 }
             }
             }
@@ -167,32 +159,19 @@ public class TCUsualScoreServiceImpl extends ServiceImpl<TCUsualScoreMapper, TCU
 
 
     /**
     /**
      * 平时成绩列表(分页)
      * 平时成绩列表(分页)
-     *
-     * @param iPage
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
     @Override
     @Override
-    public IPage<TCUsualScore> usualScoreList(IPage<Map> iPage, Long examId, String courseCode, String paperNumber, Long teachCourseId) {
-        return this.baseMapper.usualScoreList(iPage, examId, courseCode, paperNumber, teachCourseId);
+    public IPage<TCUsualScore> usualScoreList(IPage<Map> iPage, Long examId, Long courseId, String paperNumber, Long teachCourseId) {
+        return this.baseMapper.usualScoreList(iPage, examId, courseId, paperNumber, teachCourseId);
     }
     }
 
 
     /**
     /**
      * 根据考试id/课程编码/试卷编码查询数据库数据
      * 根据考试id/课程编码/试卷编码查询数据库数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
     @Override
     @Override
-    public List<TCUsualScore> queryUsualScore(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
+    public List<TCUsualScore> queryUsualScore(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
         QueryWrapper<TCUsualScore> queryWrapper = new QueryWrapper<>();
         QueryWrapper<TCUsualScore> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(TCUsualScore::getExamId, examId).eq(TCUsualScore::getCourseCode, courseCode);
+        queryWrapper.lambda().eq(TCUsualScore::getExamId, examId).eq(TCUsualScore::getCourseId, courseId);
         if (Objects.nonNull(paperNumber)) {
         if (Objects.nonNull(paperNumber)) {
             queryWrapper.lambda().and(w -> w.eq(TCUsualScore::getPaperNumber, paperNumber).or().isNull(TCUsualScore::getPaperNumber));
             queryWrapper.lambda().and(w -> w.eq(TCUsualScore::getPaperNumber, paperNumber).or().isNull(TCUsualScore::getPaperNumber));
         }
         }

+ 22 - 39
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TRBasicInfoServiceImpl.java

@@ -87,17 +87,11 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
 
 
     /**
     /**
      * 根据考试id/课程编码/试卷编码查询数据库数据
      * 根据考试id/课程编码/试卷编码查询数据库数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
     @Override
     @Override
-    public TRBasicInfo queryBasicInfo(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
+    public TRBasicInfo queryBasicInfo(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
         QueryWrapper<TRBasicInfo> queryWrapper = new QueryWrapper<>();
         QueryWrapper<TRBasicInfo> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(TRBasicInfo::getExamId, examId).eq(TRBasicInfo::getCourseCode, courseCode);
+        queryWrapper.lambda().eq(TRBasicInfo::getExamId, examId).eq(TRBasicInfo::getCourseId, courseId);
         if (Objects.nonNull(paperNumber)) {
         if (Objects.nonNull(paperNumber)) {
             queryWrapper.lambda().and(w -> w.eq(TRBasicInfo::getPaperNumber, paperNumber).or().isNull(TRBasicInfo::getPaperNumber));
             queryWrapper.lambda().and(w -> w.eq(TRBasicInfo::getPaperNumber, paperNumber).or().isNull(TRBasicInfo::getPaperNumber));
         }
         }
@@ -114,11 +108,11 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
      */
      */
     @Override
     @Override
     public ReportScoreViewDto getScoreList(TRBasicInfo trBasicInfo, MarkPaper markPaper) {
     public ReportScoreViewDto getScoreList(TRBasicInfo trBasicInfo, MarkPaper markPaper) {
-        FinalScoreDto finalScoreDto = tcFinalScoreService.finalScoreScoreOverView(trBasicInfo.getExamId(), trBasicInfo.getCourseCode(), trBasicInfo.getPaperNumber(), trBasicInfo.getTeachCourseId());
+        FinalScoreDto finalScoreDto = tcFinalScoreService.finalScoreScoreOverView(trBasicInfo.getExamId(), trBasicInfo.getCourseId(), trBasicInfo.getPaperNumber(), trBasicInfo.getTeachCourseId());
         Objects.requireNonNull(finalScoreDto, "未找到期末成绩分数信息");
         Objects.requireNonNull(finalScoreDto, "未找到期末成绩分数信息");
 
 
         ReportScoreViewDto reportScoreViewDto = null;
         ReportScoreViewDto reportScoreViewDto = null;
-        TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(markPaper.getExamId(), markPaper.getCourseCode(), markPaper.getPaperNumber(), trBasicInfo.getTeachCourseId());
+        TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(markPaper.getExamId(), markPaper.getCourseId(), markPaper.getPaperNumber(), trBasicInfo.getTeachCourseId());
         if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStruct()) && Objects.nonNull(tcPaperStruct.getTotalScore())) {
         if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStruct()) && Objects.nonNull(tcPaperStruct.getTotalScore())) {
             markPaper = new MarkPaper(markPaper.getExamId(), markPaper.getCourseId(), markPaper.getPaperNumber(), tcPaperStruct.getTotalScore(), tcPaperStruct.getPassScore());
             markPaper = new MarkPaper(markPaper.getExamId(), markPaper.getCourseId(), markPaper.getPaperNumber(), tcPaperStruct.getTotalScore(), tcPaperStruct.getPassScore());
         }
         }
@@ -147,7 +141,7 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
     public Map<String, Object> getReportCalculateParams(TRBasicInfo trBasicInfo, List<PaperStructDimensionResult> paperStructDimensionResultList, CourseWeightResult courseWeightResult) {
     public Map<String, Object> getReportCalculateParams(TRBasicInfo trBasicInfo, List<PaperStructDimensionResult> paperStructDimensionResultList, CourseWeightResult courseWeightResult) {
         Map<String, Object> paramsMap = new HashMap<>();
         Map<String, Object> paramsMap = new HashMap<>();
         //查询考生数据
         //查询考生数据
-        List<FinalScoreResult> finalScoreResultList = tcFinalScoreService.examStudentOverview(trBasicInfo.getExamId(), trBasicInfo.getCourseCode(), trBasicInfo.getPaperNumber(), trBasicInfo.getTeachCourseId());//考生成绩
+        List<FinalScoreResult> finalScoreResultList = tcFinalScoreService.examStudentOverview(trBasicInfo.getExamId(), trBasicInfo.getCourseId(), trBasicInfo.getPaperNumber(), trBasicInfo.getTeachCourseId());//考生成绩
         if (CollectionUtils.isEmpty(finalScoreResultList)) {
         if (CollectionUtils.isEmpty(finalScoreResultList)) {
             throw ExceptionResultEnum.ERROR.exception("成绩数据异常,平时成绩与期末成绩里考生名单不一致,请检查");
             throw ExceptionResultEnum.ERROR.exception("成绩数据异常,平时成绩与期末成绩里考生名单不一致,请检查");
         }
         }
@@ -392,16 +386,16 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
         }
         }
 
 
         if (Objects.isNull(trBasicInfo)) {
         if (Objects.isNull(trBasicInfo)) {
-            trBasicInfo = new TRBasicInfo(markPaper.getExamId(), markPaper.getCourseCode(), markPaper.getCourseName(), markPaper.getPaperNumber(), teachCourseId, basicSemester.getName(), teachingObject, teacher, null, userId);
+            trBasicInfo = new TRBasicInfo(markPaper.getExamId(), markPaper.getCourseId(), markPaper.getPaperNumber(), teachCourseId, basicSemester.getName(), teachingObject, teacher, null, userId);
         } else {
         } else {
-            trBasicInfo.setBasicInfo(markPaper.getExamId(), markPaper.getCourseCode(), markPaper.getCourseName(), markPaper.getPaperNumber(), basicSemester.getName(), teachingObject, teacher, null);
+            trBasicInfo.setBasicInfo(markPaper.getExamId(), markPaper.getCourseId(), markPaper.getPaperNumber(), basicSemester.getName(), teachingObject, teacher, null);
         }
         }
         //课程基本情况
         //课程基本情况
         ReportCourseBasicInfoDto reportCourseBasicInfoDto = new ReportCourseBasicInfoDto(trBasicInfo);
         ReportCourseBasicInfoDto reportCourseBasicInfoDto = new ReportCourseBasicInfoDto(trBasicInfo);
         trBasicInfo.getReportResult().setCourseBasicInfo(reportCourseBasicInfoDto);
         trBasicInfo.getReportResult().setCourseBasicInfo(reportCourseBasicInfoDto);
 
 
         //课程目标考核分布-题目信息
         //课程目标考核分布-题目信息
-        TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(markPaper.getExamId(), markPaper.getCourseCode(), markPaper.getPaperNumber(), teachCourseId);
+        TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(markPaper.getExamId(), markPaper.getCourseId(), markPaper.getPaperNumber(), teachCourseId);
         if (Objects.isNull(tcPaperStruct) || Objects.isNull(tcPaperStruct.getPaperStructDimension())) {
         if (Objects.isNull(tcPaperStruct) || Objects.isNull(tcPaperStruct.getPaperStructDimension())) {
             throw ExceptionResultEnum.ERROR.exception("未找到试卷蓝图信息");
             throw ExceptionResultEnum.ERROR.exception("未找到试卷蓝图信息");
         }
         }
@@ -450,7 +444,8 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
         }
         }
         reportCourseBasicInfoDto.setParticipantCount(examStudentNewList.size() - 3);
         reportCourseBasicInfoDto.setParticipantCount(examStudentNewList.size() - 3);
         trBasicInfo.setParticipantCount(examStudentNewList.size() - 3);
         trBasicInfo.setParticipantCount(examStudentNewList.size() - 3);
-        trBasicInfo.getReportResult().setCommonInfo(new ReportCommonDto(markPaper.getExamId(), markPaper.getCourseCode(), markPaper.getCourseName(), markPaper.getPaperNumber()));
+        BasicCourse basicCourse = basicCourseService.getById(markPaper.getCourseId());
+        trBasicInfo.getReportResult().setCommonInfo(new ReportCommonDto(markPaper.getExamId(), markPaper.getCourseId(), basicCourse.getCode(), basicCourse.getName(), markPaper.getPaperNumber()));
         return trBasicInfo;
         return trBasicInfo;
     }
     }
 
 
@@ -810,18 +805,12 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
 
 
     /**
     /**
      * 根据考试id/课程编码/试卷编码删除数据
      * 根据考试id/课程编码/试卷编码删除数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @return
      */
      */
     @Override
     @Override
     @Transactional
     @Transactional
-    public Boolean remove(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
+    public Boolean remove(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
         QueryWrapper<TRBasicInfo> queryWrapper = new QueryWrapper<>();
         QueryWrapper<TRBasicInfo> queryWrapper = new QueryWrapper<>();
-        queryWrapper.lambda().eq(TRBasicInfo::getExamId, examId).eq(TRBasicInfo::getCourseCode, courseCode);
+        queryWrapper.lambda().eq(TRBasicInfo::getExamId, examId).eq(TRBasicInfo::getCourseId, courseId);
         if (Objects.nonNull(paperNumber)) {
         if (Objects.nonNull(paperNumber)) {
             queryWrapper.lambda().and(w -> w.eq(TRBasicInfo::getPaperNumber, paperNumber).or().isNull(TRBasicInfo::getPaperNumber));
             queryWrapper.lambda().and(w -> w.eq(TRBasicInfo::getPaperNumber, paperNumber).or().isNull(TRBasicInfo::getPaperNumber));
         }
         }
@@ -867,20 +856,14 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
 
 
     /**
     /**
      * 清除报告数据
      * 清除报告数据
-     *
-     * @param examId
-     * @param courseCode
-     * @param paperNumber
-     * @param teachCourseId
-     * @param clearDimension
      */
      */
     @Override
     @Override
     @Transactional
     @Transactional
-    public void clearReportData(Long examId, String courseCode, String paperNumber, Long teachCourseId, boolean clearDimension) {
-        trExamStudentService.remove(examId, courseCode, paperNumber, teachCourseId);
-        trBasicInfoService.remove(examId, courseCode, paperNumber, teachCourseId);
+    public void clearReportData(Long examId, Long courseId, String paperNumber, Long teachCourseId, boolean clearDimension) {
+        trExamStudentService.remove(examId, courseId, paperNumber, teachCourseId);
+        trBasicInfoService.remove(examId, courseId, paperNumber, teachCourseId);
         if (clearDimension) {
         if (clearDimension) {
-            TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseCode, paperNumber, teachCourseId);
+            TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseId, paperNumber, teachCourseId);
             if (Objects.nonNull(tcPaperStruct)) {
             if (Objects.nonNull(tcPaperStruct)) {
                 tcPaperStruct.setPaperStructDimension(null);
                 tcPaperStruct.setPaperStructDimension(null);
                 SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
                 SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
@@ -946,20 +929,20 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
         //开始、结束分数区间
         //开始、结束分数区间
         Double startInterval = 0.5d, endInterval = 9.5d, increaseStartScore = passScore - startInterval,
         Double startInterval = 0.5d, endInterval = 9.5d, increaseStartScore = passScore - startInterval,
                 increaseEndScore = increaseStartScore + startInterval + endInterval;
                 increaseEndScore = increaseStartScore + startInterval + endInterval;
-        scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseCode(), paperNumber, teachCourseId, 1.0d, increaseStartScore));
+        scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseId(), paperNumber, teachCourseId, 1.0d, increaseStartScore));
         increaseStartScore = increaseStartScore + startInterval;
         increaseStartScore = increaseStartScore + startInterval;
         increaseEndScore = increaseStartScore + endInterval;
         increaseEndScore = increaseStartScore + endInterval;
         if (totalScore.doubleValue() - increaseEndScore.doubleValue() == startInterval || increaseEndScore.doubleValue() >= totalScore.doubleValue()) {
         if (totalScore.doubleValue() - increaseEndScore.doubleValue() == startInterval || increaseEndScore.doubleValue() >= totalScore.doubleValue()) {
             increaseEndScore = totalScore;
             increaseEndScore = totalScore;
-            scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseCode(), paperNumber, teachCourseId, increaseStartScore, increaseEndScore));
+            scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseId(), paperNumber, teachCourseId, increaseStartScore, increaseEndScore));
         } else {
         } else {
             while (increaseEndScore.doubleValue() < totalScore.doubleValue()) {
             while (increaseEndScore.doubleValue() < totalScore.doubleValue()) {
-                scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseCode(), paperNumber, teachCourseId, increaseStartScore, increaseEndScore));
+                scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseId(), paperNumber, teachCourseId, increaseStartScore, increaseEndScore));
                 increaseStartScore = increaseEndScore + startInterval;
                 increaseStartScore = increaseEndScore + startInterval;
                 increaseEndScore = increaseStartScore + endInterval;
                 increaseEndScore = increaseStartScore + endInterval;
                 if (totalScore.doubleValue() - increaseEndScore.doubleValue() == startInterval || increaseEndScore.doubleValue() >= totalScore.doubleValue()) {
                 if (totalScore.doubleValue() - increaseEndScore.doubleValue() == startInterval || increaseEndScore.doubleValue() >= totalScore.doubleValue()) {
                     increaseEndScore = totalScore;
                     increaseEndScore = totalScore;
-                    scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseCode(), paperNumber, teachCourseId, increaseStartScore, increaseEndScore));
+                    scoreRange.add(getScoreRangeVo(finalScoreDto.getStudentCount(), examId, markPaper.getCourseId(), paperNumber, teachCourseId, increaseStartScore, increaseEndScore));
                 }
                 }
             }
             }
         }
         }
@@ -1079,8 +1062,8 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
      * @param end
      * @param end
      * @return
      * @return
      */
      */
-    protected ScoreRangeVo getScoreRangeVo(int toltal, Long examId, String courseCode, String paperNumber, Long teachCourseId, Double start, Double end) {
-        int count = tcFinalScoreService.getCountByScoreRange(examId, courseCode, paperNumber, teachCourseId, start, end);
+    protected ScoreRangeVo getScoreRangeVo(int toltal, Long examId, Long courseId, String paperNumber, Long teachCourseId, Double start, Double end) {
+        int count = tcFinalScoreService.getCountByScoreRange(examId, courseId, paperNumber, teachCourseId, start, end);
         Double rate = null;
         Double rate = null;
         if (toltal != 0) {
         if (toltal != 0) {
             rate = new BigDecimal(count).divide(new BigDecimal(toltal), 2, BigDecimal.ROUND_HALF_UP).setScale(2, BigDecimal.ROUND_HALF_UP).multiply(SystemConstant.PERCENT).doubleValue();
             rate = new BigDecimal(count).divide(new BigDecimal(toltal), 2, BigDecimal.ROUND_HALF_UP).setScale(2, BigDecimal.ROUND_HALF_UP).multiply(SystemConstant.PERCENT).doubleValue();

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

@@ -160,8 +160,8 @@ public class TRExamStudentServiceImpl extends ServiceImpl<TRExamStudentMapper, T
      */
      */
     @Override
     @Override
     @Transactional
     @Transactional
-    public Boolean remove(Long examId, String courseCode, String paperNumber, Long teachCourseId) {
-        TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(examId, courseCode, paperNumber, teachCourseId);
+    public Boolean remove(Long examId, Long courseId, String paperNumber, Long teachCourseId) {
+        TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(examId, courseId, paperNumber, teachCourseId);
         return Objects.nonNull(trBasicInfo) ? trExamStudentService.remove(trBasicInfo.getId()) : false;
         return Objects.nonNull(trBasicInfo) ? trExamStudentService.remove(trBasicInfo.getId()) : false;
     }
     }
 
 

+ 10 - 10
distributed-print-business/src/main/resources/mapper/TCFinalScoreMapper.xml

@@ -8,8 +8,8 @@
             <if test="examId != null and examId != ''">
             <if test="examId != null and examId != ''">
                 and t.exam_id = #{examId}
                 and t.exam_id = #{examId}
             </if>
             </if>
-            <if test="courseCode != null and courseCode != ''">
-                and t.course_code = #{courseCode}
+            <if test="courseId != null">
+                and t.course_id = #{courseId}
             </if>
             </if>
             <if test="paperNumber != null and paperNumber != ''">
             <if test="paperNumber != null and paperNumber != ''">
                 and t.paper_number = #{paperNumber}
                 and t.paper_number = #{paperNumber}
@@ -27,13 +27,13 @@
             min(case when tcfs.score is not null then tcfs.score else null end) finalScoreMinScore,
             min(case when tcfs.score is not null then tcfs.score else null end) finalScoreMinScore,
             avg(case when tcfs.score is not null then tcfs.score else null end) finalScoreAvgScore
             avg(case when tcfs.score is not null then tcfs.score else null end) finalScoreAvgScore
             from t_c_final_score tcfs
             from t_c_final_score tcfs
-            join t_c_usual_score tcus on tcfs.exam_id = tcus.exam_id and tcfs.course_code = tcus.course_code and tcfs.teach_course_id = tcus.teach_course_id and tcfs.student_code = tcus.student_code
+            join t_c_usual_score tcus on tcfs.exam_id = tcus.exam_id and tcfs.course_id = tcus.course_id and tcfs.teach_course_id = tcus.teach_course_id and tcfs.student_code = tcus.student_code
         <where>
         <where>
             <if test="examId != null and examId != ''">
             <if test="examId != null and examId != ''">
                 and tcfs.exam_id = #{examId}
                 and tcfs.exam_id = #{examId}
             </if>
             </if>
-            <if test="courseCode != null and courseCode != ''">
-                and tcfs.course_code = #{courseCode}
+            <if test="courseId != null">
+                and tcfs.course_id = #{courseId}
             </if>
             </if>
             <if test="paperNumber != null and paperNumber != ''">
             <if test="paperNumber != null and paperNumber != ''">
                 and tcfs.paper_number = #{paperNumber}
                 and tcfs.paper_number = #{paperNumber}
@@ -51,8 +51,8 @@
             <if test="examId != null and examId != ''">
             <if test="examId != null and examId != ''">
                 and tcfs.exam_id = #{examId}
                 and tcfs.exam_id = #{examId}
             </if>
             </if>
-            <if test="courseCode != null and courseCode != ''">
-                and tcfs.course_code = #{courseCode}
+            <if test="courseId != null">
+                and tcfs.course_id = #{courseId}
             </if>
             </if>
             <if test="paperNumber != null and paperNumber != ''">
             <if test="paperNumber != null and paperNumber != ''">
                 and tcfs.paper_number = #{paperNumber}
                 and tcfs.paper_number = #{paperNumber}
@@ -73,14 +73,14 @@
             tcus.score as usualScore,
             tcus.score as usualScore,
             es.teach_clazz_name as administrativeClass
             es.teach_clazz_name as administrativeClass
         from t_c_final_score tcfs
         from t_c_final_score tcfs
-        join t_c_usual_score tcus on tcfs.exam_id = tcus.exam_id and tcfs.course_code = tcus.course_code and tcfs.teach_course_id = tcus.teach_course_id and tcfs.student_code = tcus.student_code
+        join t_c_usual_score tcus on tcfs.exam_id = tcus.exam_id and tcfs.course_id = tcus.course_id and tcfs.teach_course_id = tcus.teach_course_id and tcfs.student_code = tcus.student_code
         left join exam_student es on es.exam_id = tcfs.exam_id and es.paper_number = tcfs.paper_number and es.student_code = tcfs.student_code
         left join exam_student es on es.exam_id = tcfs.exam_id and es.paper_number = tcfs.paper_number and es.student_code = tcfs.student_code
         <where>
         <where>
             <if test="examId != null and examId != ''">
             <if test="examId != null and examId != ''">
                 and tcfs.exam_id = #{examId}
                 and tcfs.exam_id = #{examId}
             </if>
             </if>
-            <if test="courseCode != null and courseCode != ''">
-                and tcfs.course_code = #{courseCode}
+            <if test="courseId != null">
+                and tcfs.course_id = #{courseId}
             </if>
             </if>
             <if test="paperNumber != null and paperNumber != ''">
             <if test="paperNumber != null and paperNumber != ''">
                 and tcfs.paper_number = #{paperNumber}
                 and tcfs.paper_number = #{paperNumber}

+ 8 - 7
distributed-print-business/src/main/resources/mapper/TCUsualScoreMapper.xml

@@ -6,7 +6,8 @@
         SELECT distinct
         SELECT distinct
                  bs.id as semesterId,
                  bs.id as semesterId,
                  tc.exam_id as examId,
                  tc.exam_id as examId,
-                 tc.course_code as courseCode,
+                 tc.course_id as courseId,
+                 bc.code as courseCode,
                  bc.name as courseName,
                  bc.name as courseName,
                  tc.id AS teachCourseId,
                  tc.id AS teachCourseId,
                  creator.real_name AS userName,
                  creator.real_name AS userName,
@@ -15,15 +16,15 @@
             teach_course tc
             teach_course tc
             left join basic_exam be on be.id = tc.exam_id
             left join basic_exam be on be.id = tc.exam_id
             left join basic_semester bs on bs.id = be.semester_id
             left join basic_semester bs on bs.id = be.semester_id
-            left join basic_course bc on bc.code = tc.course_code and bc.school_id = be.school_id
+            left join basic_course bc on tc.course_id = bc.id
             left join sys_user su on tc.user_id = su.id
             left join sys_user su on tc.user_id = su.id
             left join sys_user creator on creator.id = tc.user_id
             left join sys_user creator on creator.id = tc.user_id
         <where>
         <where>
             <if test="examId != null and examId != ''">
             <if test="examId != null and examId != ''">
                 and tc.exam_id = #{examId}
                 and tc.exam_id = #{examId}
             </if>
             </if>
-            <if test="courseCode != null and courseCode != ''">
-                and tc.course_code = #{courseCode}
+            <if test="courseId != null">
+                and tc.course_id = #{courseId}
             </if>
             </if>
             <if test="dpr != null">
             <if test="dpr != null">
                 <if test="dpr.requestUserId != null">
                 <if test="dpr.requestUserId != null">
@@ -40,7 +41,7 @@
                 </if>
                 </if>
             </if>
             </if>
         </where>
         </where>
-        ORDER BY tc.course_code
+        ORDER BY bc.code
     </select>
     </select>
 
 
     <select id="usualScoreList" resultType="com.qmth.distributed.print.business.entity.TCUsualScore">
     <select id="usualScoreList" resultType="com.qmth.distributed.print.business.entity.TCUsualScore">
@@ -49,8 +50,8 @@
             <if test="examId != null and examId != ''">
             <if test="examId != null and examId != ''">
                 and t.exam_id = #{examId}
                 and t.exam_id = #{examId}
             </if>
             </if>
-            <if test="courseCode != null and courseCode != ''">
-                and t.course_code = #{courseCode}
+            <if test="courseId != null">
+                and t.course_id = #{courseId}
             </if>
             </if>
             <if test="paperNumber != null and paperNumber != ''">
             <if test="paperNumber != null and paperNumber != ''">
                 and t.paper_number = #{paperNumber}
                 and t.paper_number = #{paperNumber}

+ 31 - 0
distributed-print/install/mysql/upgrade/3.4.0.sql

@@ -91,6 +91,19 @@ ALTER TABLE `mark_document`
     CHANGE COLUMN `course_code` `course_code` VARCHAR(32) CHARACTER SET 'utf8mb4' NULL COMMENT '课程代码' ,
     CHANGE COLUMN `course_code` `course_code` VARCHAR(32) CHARACTER SET 'utf8mb4' NULL COMMENT '课程代码' ,
     CHANGE COLUMN `course_name` `course_name` VARCHAR(100) CHARACTER SET 'utf8mb4' NULL COMMENT '科目名称' ;
     CHANGE COLUMN `course_name` `course_name` VARCHAR(100) CHARACTER SET 'utf8mb4' NULL COMMENT '科目名称' ;
 
 
+ALTER TABLE `t_c_final_score`
+    ADD COLUMN `course_id` BIGINT(20) NULL COMMENT '课程ID(basic_course表ID)' AFTER `exam_id`,
+CHANGE COLUMN `course_code` `course_code` VARCHAR(100) CHARACTER SET 'utf8mb4' NULL COMMENT '课程编码' ;
+ALTER TABLE `t_r_basic_info`
+    ADD COLUMN `course_id` BIGINT(20) NULL COMMENT '课程ID(basic_course表ID)' AFTER `exam_id`,
+CHANGE COLUMN `course_code` `course_code` VARCHAR(100) CHARACTER SET 'utf8mb4' NULL COMMENT '课程编码' ;
+ALTER TABLE `t_c_paper_struct`
+    ADD COLUMN `course_id` BIGINT(20) NULL COMMENT '课程ID(basic_course表ID)' AFTER `exam_id`,
+CHANGE COLUMN `course_code` `course_code` VARCHAR(100) CHARACTER SET 'utf8mb4' NULL COMMENT '课程编码' ;
+ALTER TABLE `t_c_usual_score`
+    ADD COLUMN `course_id` BIGINT(20) NULL COMMENT '课程ID(basic_course表ID)' AFTER `exam_id`,
+CHANGE COLUMN `course_code` `course_code` VARCHAR(100) CHARACTER SET 'utf8mb4' NULL COMMENT '课程编码' ;
+
 
 
 update exam_task a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
 update exam_task a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
 update exam_card a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
 update exam_card a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
@@ -111,6 +124,10 @@ update mark_paper a left join basic_exam be on a.exam_id = be.id left join basic
 update mark_task a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
 update mark_task a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
 update mark_paper_package a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
 update mark_paper_package a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
 update client_status a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
 update client_status a set a.course_id = (select bc.id from basic_course bc where a.school_id = bc.school_id and a.course_code = bc.code) where a.course_id is null;
+update t_c_final_score a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
+update t_r_basic_info a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
+update t_c_paper_struct a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
+update t_c_usual_score a left join basic_exam be on a.exam_id = be.id left join basic_course bc on be.school_id = bc.school_id and a.course_code = bc.code set a.course_id = bc.id where a.course_id is null;
 
 
 ALTER TABLE `exam_print_plan` DROP COLUMN `third_relate_name`, DROP COLUMN `third_relate_id`;
 ALTER TABLE `exam_print_plan` DROP COLUMN `third_relate_name`, DROP COLUMN `third_relate_id`;
 ALTER TABLE `exam_student` DROP COLUMN `can_delete`;
 ALTER TABLE `exam_student` DROP COLUMN `can_delete`;
@@ -179,6 +196,20 @@ UPDATE `sys_privilege` SET `related` = '184,414' WHERE (`id` = '408');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('1149', '评卷设置(批量)', 'BatchMarkConfig', 'BUTTON', '897', '8', 'AUTH', '1150', '1', '0', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES ('1149', '评卷设置(批量)', 'BatchMarkConfig', 'BUTTON', '897', '8', 'AUTH', '1150', '1', '0', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1150', '评卷设置保存', '/api/admin/mark/setting/paper/batch_save', 'URL', '897', '19', 'AUTH', '1', '1', '1');
 INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `enable`, `default_auth`, `front_display`) VALUES ('1150', '评卷设置保存', '/api/admin/mark/setting/paper/batch_save', 'URL', '897', '19', 'AUTH', '1', '1', '1');
 
 
+ALTER TABLE `t_c_final_score`
+DROP INDEX `t_c_score_end_exam_unique` ,
+ADD UNIQUE INDEX `t_c_score_end_exam_unique` (`exam_id` ASC, `course_id` ASC, `paper_number` ASC, `student_code` ASC, `name` ASC);
+
+ALTER TABLE `t_c_final_score`
+DROP INDEX `t_c_final_score_unique` ,
+ADD UNIQUE INDEX `t_c_final_score_unique` (`exam_id` ASC, `course_id` ASC, `teach_course_id` ASC, `student_code` ASC, `name` ASC);
+
+ALTER TABLE `t_c_usual_score`
+DROP INDEX `t_c_usual_score_unique` ,
+ADD UNIQUE INDEX `t_c_usual_score_unique` (`exam_id` ASC, `course_id` ASC, `teach_course_id` ASC, `student_code` ASC, `name` ASC),
+DROP INDEX `t_c_score_normal_unique` ,
+ADD UNIQUE INDEX `t_c_score_normal_unique` (`exam_id` ASC, `course_id` ASC, `paper_number` ASC, `student_code` ASC, `name` ASC);
+
 
 
 -- drop table if exists exam_detail_course_paper_type;
 -- drop table if exists exam_detail_course_paper_type;
 -- drop table if exists basic_template_org;
 -- drop table if exists basic_template_org;

+ 19 - 19
distributed-print/src/main/java/com/qmth/distributed/print/api/TCFinalScoreController.java

@@ -83,11 +83,11 @@ public class TCFinalScoreController {
     @RequestMapping(value = "/final_score/template_download", method = RequestMethod.POST)
     @RequestMapping(value = "/final_score/template_download", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "下载成功", response = Object.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "下载成功", response = Object.class)})
     public void finalScoreTemplateDownload(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
     public void finalScoreTemplateDownload(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                                           @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                           @ApiParam(value = "课程ID", required = true) @RequestParam Long courseId,
                                            @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                            @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                            @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
                                            @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
-        printCommonService.getLock(examId, courseCode, paperNumber, teachCourseId);
-        TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseCode, paperNumber, teachCourseId);
+        printCommonService.getLock(examId, courseId, paperNumber, teachCourseId);
+        TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseId, paperNumber, teachCourseId);
         List<ExcelField> excelFieldList = new ArrayList<>();
         List<ExcelField> excelFieldList = new ArrayList<>();
         excelFieldList.addAll(new ArrayList<>(Arrays.asList(new ExcelField("studentCode", "学号", true), new ExcelField("name", "姓名", true), new ExcelField("score", "成绩", true))));
         excelFieldList.addAll(new ArrayList<>(Arrays.asList(new ExcelField("studentCode", "学号", true), new ExcelField("name", "姓名", true), new ExcelField("score", "成绩", true))));
         if (Objects.isNull(tcPaperStruct) || Objects.isNull(tcPaperStruct.getPaperStruct())) {
         if (Objects.isNull(tcPaperStruct) || Objects.isNull(tcPaperStruct.getPaperStruct())) {
@@ -119,18 +119,18 @@ public class TCFinalScoreController {
     @ApiResponses({@ApiResponse(code = 200, message = "导入成功", response = EditResult.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "导入成功", response = EditResult.class)})
     public Result finalScoreImport(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
     public Result finalScoreImport(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
                                    @ApiParam(value = "考试id", required = true) @RequestParam Long examId,
                                    @ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                                   @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                   @ApiParam(value = "课程ID", required = true) @RequestParam Long courseId,
                                    @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                    @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                    @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
                                    @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
-        printCommonService.getLock(examId, courseCode, paperNumber, teachCourseId);
-        String lockKey = SystemConstant.REDIS_FINAL_SCORE_DATA_FLOW_PREFIX + SystemConstant.IMPORT + examId + "_" + courseCode + "_" + paperNumber + "_" + teachCourseId;
+        printCommonService.getLock(examId, courseId, paperNumber, teachCourseId);
+        String lockKey = SystemConstant.REDIS_FINAL_SCORE_DATA_FLOW_PREFIX + SystemConstant.IMPORT + examId + "_" + courseId + "_" + paperNumber + "_" + teachCourseId;
         boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_LOCK_IMPORT_EXAM_DATA_TIME_OUT);
         boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_LOCK_IMPORT_EXAM_DATA_TIME_OUT);
         if (!lock) {
         if (!lock) {
             throw ExceptionResultEnum.ERROR.exception("正在导入数据,请稍候再试!");
             throw ExceptionResultEnum.ERROR.exception("正在导入数据,请稍候再试!");
         }
         }
         Map<String, String> map = null;
         Map<String, String> map = null;
         try {
         try {
-            map = tcFinalScoreService.finalScoreExcelImport(file, examId, courseCode, paperNumber, teachCourseId);
+            map = tcFinalScoreService.finalScoreExcelImport(file, examId, courseId, paperNumber, teachCourseId);
         } catch (Exception e) {
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
             log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
             if (e instanceof ApiException) {
@@ -149,9 +149,9 @@ public class TCFinalScoreController {
     @ApiResponses({@ApiResponse(code = 200, message = "同步成功", response = EditResult.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "同步成功", response = EditResult.class)})
     @OperationLogDetail(operationType = OperationTypeEnum.SYNC)
     @OperationLogDetail(operationType = OperationTypeEnum.SYNC)
     public Result finalScoreSyncChoosePaper(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
     public Result finalScoreSyncChoosePaper(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                                            @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                            @ApiParam(value = "课程ID", required = true) @RequestParam Long courseId,
                                             @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) {
                                             @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) {
-        return ResultUtil.ok(markPaperService.list(new QueryWrapper<MarkPaper>().lambda().eq(MarkPaper::getExamId, examId).eq(MarkPaper::getCourseCode, courseCode)));
+        return ResultUtil.ok(markPaperService.list(new QueryWrapper<MarkPaper>().lambda().eq(MarkPaper::getExamId, examId).eq(MarkPaper::getCourseId, courseId)));
     }
     }
 
 
     @ApiOperation(value = "同步期末成绩")
     @ApiOperation(value = "同步期末成绩")
@@ -160,18 +160,18 @@ public class TCFinalScoreController {
     @OperationLogDetail(operationType = OperationTypeEnum.SYNC)
     @OperationLogDetail(operationType = OperationTypeEnum.SYNC)
     @Aac(rateLimit = @RateLimit(count = 1, period = 1000L))
     @Aac(rateLimit = @RateLimit(count = 1, period = 1000L))
     public Result finalScoreSync(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
     public Result finalScoreSync(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                                 @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                 @ApiParam(value = "课程ID", required = true) @RequestParam Long courseId,
                                  @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
                                  @ApiParam(value = "试卷编号", required = true) @RequestParam String paperNumber,
                                  @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
                                  @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
-        printCommonService.getLock(examId, courseCode, paperNumber, teachCourseId);
-        String lockKey = SystemConstant.REDIS_FINAL_SCORE_DATA_FLOW_PREFIX + SystemConstant.SYNC + examId + "_" + courseCode + "_" + paperNumber + "_" + teachCourseId;
+        printCommonService.getLock(examId, courseId, paperNumber, teachCourseId);
+        String lockKey = SystemConstant.REDIS_FINAL_SCORE_DATA_FLOW_PREFIX + SystemConstant.SYNC + examId + "_" + courseId + "_" + paperNumber + "_" + teachCourseId;
         boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_LOCK_IMPORT_EXAM_DATA_TIME_OUT);
         boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_LOCK_IMPORT_EXAM_DATA_TIME_OUT);
         if (!lock) {
         if (!lock) {
             throw ExceptionResultEnum.ERROR.exception("正在同步数据,请稍候再试!");
             throw ExceptionResultEnum.ERROR.exception("正在同步数据,请稍候再试!");
         }
         }
         Map<String, String> map = null;
         Map<String, String> map = null;
         try {
         try {
-            map = tcFinalScoreService.finalScoreSync(examId, courseCode, paperNumber, teachCourseId);
+            map = tcFinalScoreService.finalScoreSync(examId, courseId, paperNumber, teachCourseId);
         } catch (Exception e) {
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
             log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
             if (e instanceof ApiException) {
@@ -189,12 +189,12 @@ public class TCFinalScoreController {
     @RequestMapping(value = "/final_score/list", method = RequestMethod.POST)
     @RequestMapping(value = "/final_score/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = TCFinalScore.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = TCFinalScore.class)})
     public Result finalScoreList(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
     public Result finalScoreList(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                                 @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                 @ApiParam(value = "课程ID", required = true) @RequestParam Long courseId,
                                  @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                  @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                  @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId,
                                  @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId,
                                  @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                  @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                  @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) throws IOException {
                                  @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) throws IOException {
-        return ResultUtil.ok(tcFinalScoreService.finalScoreList(new Page<>(pageNumber, pageSize), examId, courseCode, paperNumber, teachCourseId));
+        return ResultUtil.ok(tcFinalScoreService.finalScoreList(new Page<>(pageNumber, pageSize), examId, courseId, paperNumber, teachCourseId));
     }
     }
 
 
     @ApiOperation(value = "期末成绩编辑")
     @ApiOperation(value = "期末成绩编辑")
@@ -219,7 +219,7 @@ public class TCFinalScoreController {
         TCFinalScore tcFinalScoreDb = tcFinalScoreService.getById(tcFinalScore.getId());
         TCFinalScore tcFinalScoreDb = tcFinalScoreService.getById(tcFinalScore.getId());
         Objects.requireNonNull(tcFinalScoreDb, "未找到期末成绩信息");
         Objects.requireNonNull(tcFinalScoreDb, "未找到期末成绩信息");
 
 
-        printCommonService.getLock(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseCode(), tcFinalScoreDb.getPaperNumber(), tcFinalScore.getTeachCourseId());
+        printCommonService.getLock(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseId(), tcFinalScoreDb.getPaperNumber(), tcFinalScore.getTeachCourseId());
 
 
         List<TCFinalScoreDto> tcFinalScoreDtoList = GsonUtil.fromJson(tcFinalScore.getScoreDetail(), new TypeToken<List<TCFinalScoreDto>>() {
         List<TCFinalScoreDto> tcFinalScoreDtoList = GsonUtil.fromJson(tcFinalScore.getScoreDetail(), new TypeToken<List<TCFinalScoreDto>>() {
         }.getType());
         }.getType());
@@ -234,7 +234,7 @@ public class TCFinalScoreController {
         tcFinalScoreDb.updateInfo(tcFinalScore, sysUser.getId());
         tcFinalScoreDb.updateInfo(tcFinalScore, sysUser.getId());
 
 
         if (!tcFinalScoreSource.equals(tcFinalScoreDb)) {
         if (!tcFinalScoreSource.equals(tcFinalScoreDb)) {
-            trBasicInfoService.clearReportData(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseCode(), tcFinalScoreDb.getPaperNumber(), tcFinalScoreDb.getTeachCourseId(), false);
+            trBasicInfoService.clearReportData(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseId(), tcFinalScoreDb.getPaperNumber(), tcFinalScoreDb.getTeachCourseId(), false);
             tcFinalScoreService.updateById(tcFinalScoreDb);
             tcFinalScoreService.updateById(tcFinalScoreDb);
         }
         }
         return ResultUtil.ok(true);
         return ResultUtil.ok(true);
@@ -251,7 +251,7 @@ public class TCFinalScoreController {
         TCFinalScore tcFinalScoreDb = tcFinalScoreService.getById(id);
         TCFinalScore tcFinalScoreDb = tcFinalScoreService.getById(id);
         Objects.requireNonNull(tcFinalScoreDb, "未找到期末成绩信息");
         Objects.requireNonNull(tcFinalScoreDb, "未找到期末成绩信息");
 
 
-        printCommonService.getLock(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseCode(), tcFinalScoreDb.getPaperNumber(), teachCourseId);
+        printCommonService.getLock(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseId(), tcFinalScoreDb.getPaperNumber(), teachCourseId);
 
 
         TCFinalScore tcFinalScoreSource = new TCFinalScore();
         TCFinalScore tcFinalScoreSource = new TCFinalScore();
         BeanUtils.copyProperties(tcFinalScoreDb, tcFinalScoreSource);
         BeanUtils.copyProperties(tcFinalScoreDb, tcFinalScoreSource);
@@ -259,7 +259,7 @@ public class TCFinalScoreController {
         if (!tcFinalScoreSource.equals(tcFinalScoreDb)) {
         if (!tcFinalScoreSource.equals(tcFinalScoreDb)) {
             SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
             SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
             tcFinalScoreDb.updateInfo(sysUser.getId());
             tcFinalScoreDb.updateInfo(sysUser.getId());
-            trBasicInfoService.clearReportData(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseCode(), tcFinalScoreDb.getPaperNumber(), teachCourseId, false);
+            trBasicInfoService.clearReportData(tcFinalScoreDb.getExamId(), tcFinalScoreDb.getCourseId(), tcFinalScoreDb.getPaperNumber(), teachCourseId, false);
             tcFinalScoreService.updateById(tcFinalScoreDb);
             tcFinalScoreService.updateById(tcFinalScoreDb);
         }
         }
         return ResultUtil.ok(true);
         return ResultUtil.ok(true);

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

@@ -79,18 +79,18 @@ public class TCPaperStructController {
     @ApiResponses({@ApiResponse(code = 200, message = "导入成功", response = EditResult.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "导入成功", response = EditResult.class)})
     public Result finalScorePaperStructImport(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
     public Result finalScorePaperStructImport(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
                                               @ApiParam(value = "考试id", required = true) @RequestParam Long examId,
                                               @ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                                              @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                              @ApiParam(value = "科目ID", required = true) @RequestParam Long courseId,
                                               @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                               @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                               @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
                                               @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
-        printCommonService.getLock(examId, courseCode, paperNumber, teachCourseId);
-        String lockKey = SystemConstant.REDIS_PAPER_STRUCT_FLOW_PREFIX + SystemConstant.IMPORT + examId + "_" + courseCode + "_" + paperNumber + "_" + teachCourseId;
+        printCommonService.getLock(examId, courseId, paperNumber, teachCourseId);
+        String lockKey = SystemConstant.REDIS_PAPER_STRUCT_FLOW_PREFIX + SystemConstant.IMPORT + examId + "_" + courseId + "_" + paperNumber + "_" + teachCourseId;
         boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_PAPER_STRUCT_TIME_OUT);
         boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_PAPER_STRUCT_TIME_OUT);
         if (!lock) {
         if (!lock) {
             throw ExceptionResultEnum.ERROR.exception("正在导入数据,请稍候再试!");
             throw ExceptionResultEnum.ERROR.exception("正在导入数据,请稍候再试!");
         }
         }
         Map<String, String> map = null;
         Map<String, String> map = null;
         try {
         try {
-            map = tcPaperStructService.paperStructExcelImport(file, examId, courseCode, paperNumber, teachCourseId);
+            map = tcPaperStructService.paperStructExcelImport(file, examId, courseId, paperNumber, teachCourseId);
         } catch (Exception e) {
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
             log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
             if (e instanceof ApiException) {
@@ -110,19 +110,19 @@ public class TCPaperStructController {
     @ApiResponses({@ApiResponse(code = 200, message = "同步成功", response = EditResult.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "同步成功", response = EditResult.class)})
     @Aac(rateLimit = @RateLimit(count = 1, period = 1000L))
     @Aac(rateLimit = @RateLimit(count = 1, period = 1000L))
     public Result finalScorePaperStructDimensionSync(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
     public Result finalScorePaperStructDimensionSync(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                                                     @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                                     @ApiParam(value = "课程ID", required = true) @RequestParam Long courseId,
                                                      @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                                      @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                                      @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
                                                      @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
         Objects.requireNonNull(paperNumber, "未查询到题和知识点对应关系请手动关联");
         Objects.requireNonNull(paperNumber, "未查询到题和知识点对应关系请手动关联");
-        printCommonService.getLock(examId, courseCode, paperNumber, teachCourseId);
-        String lockKey = SystemConstant.REDIS_PAPER_STRUCT_FLOW_PREFIX + SystemConstant.SYNC + examId + "_" + courseCode + "_" + paperNumber + "_" + teachCourseId;
+        printCommonService.getLock(examId, courseId, paperNumber, teachCourseId);
+        String lockKey = SystemConstant.REDIS_PAPER_STRUCT_FLOW_PREFIX + SystemConstant.SYNC + examId + "_" + courseId + "_" + paperNumber + "_" + teachCourseId;
         boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_PAPER_STRUCT_TIME_OUT);
         boolean lock = redisUtil.lock(lockKey, SystemConstant.REDIS_PAPER_STRUCT_TIME_OUT);
         if (!lock) {
         if (!lock) {
             throw ExceptionResultEnum.ERROR.exception("正在同步数据,请稍候再试!");
             throw ExceptionResultEnum.ERROR.exception("正在同步数据,请稍候再试!");
         }
         }
         Map<String, String> map = null;
         Map<String, String> map = null;
         try {
         try {
-            map = tcPaperStructService.paperStructSync(examId, courseCode, paperNumber, teachCourseId);
+            map = tcPaperStructService.paperStructSync(examId, courseId, paperNumber, teachCourseId);
         } catch (Exception e) {
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
             log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
             if (e instanceof ApiException) {
@@ -145,7 +145,7 @@ public class TCPaperStructController {
         if (bindingResult.hasErrors()) {
         if (bindingResult.hasErrors()) {
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
         }
         }
-        printCommonService.getLock(paperStructParams.getExamId(), paperStructParams.getCourseCode(), paperStructParams.getPaperNumber(), paperStructParams.getTeachCourseId());
+        printCommonService.getLock(paperStructParams.getExamId(), paperStructParams.getCourseId(), paperStructParams.getPaperNumber(), paperStructParams.getTeachCourseId());
         CourseWeightResult courseWeightResult = trBasicInfoService.findCourseWeightResultRmi(paperStructParams.getTeachCourseId());
         CourseWeightResult courseWeightResult = trBasicInfoService.findCourseWeightResultRmi(paperStructParams.getTeachCourseId());
         for (CourseWeightDto c : courseWeightResult.getSubmitForm()) {
         for (CourseWeightDto c : courseWeightResult.getSubmitForm()) {
             for (PaperStructDimensionResult paperStructDimensionResult : paperStructParams.getPaperStruct()) {
             for (PaperStructDimensionResult paperStructDimensionResult : paperStructParams.getPaperStruct()) {
@@ -171,17 +171,16 @@ public class TCPaperStructController {
             }).collect(Collectors.toList());
             }).collect(Collectors.toList());
         }
         }
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(paperStructParams.getExamId(), paperStructParams.getCourseCode(), paperStructParams.getPaperNumber(), paperStructParams.getTeachCourseId());
+        TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(paperStructParams.getExamId(), paperStructParams.getCourseId(), paperStructParams.getPaperNumber(), paperStructParams.getTeachCourseId());
         if (Objects.isNull(tcPaperStructDb)) {
         if (Objects.isNull(tcPaperStructDb)) {
-            MarkPaper markPaper = printCommonService.getMarkPaper(paperStructParams.getExamId(), paperStructParams.getCourseCode(), paperStructParams.getPaperNumber());
-            tcPaperStructDb = new TCPaperStruct(paperStructParams.getExamId(), paperStructParams.getCourseCode(), markPaper.getCourseName(), paperStructParams.getPaperNumber(), paperStructParams.getTeachCourseId(), JacksonUtil.parseJson(paperStructParams.getPaperStruct()), sysUser.getId(), courseWeightResult.getDimensionSign());
+            tcPaperStructDb = new TCPaperStruct(paperStructParams.getExamId(), paperStructParams.getCourseId(), paperStructParams.getPaperNumber(), paperStructParams.getTeachCourseId(), JacksonUtil.parseJson(paperStructParams.getPaperStruct()), sysUser.getId(), courseWeightResult.getDimensionSign());
             tcPaperStructService.save(tcPaperStructDb);
             tcPaperStructService.save(tcPaperStructDb);
         } else {
         } else {
             TCPaperStruct tcPaperStructSource = new TCPaperStruct();
             TCPaperStruct tcPaperStructSource = new TCPaperStruct();
             BeanUtils.copyProperties(tcPaperStructDb, tcPaperStructSource);
             BeanUtils.copyProperties(tcPaperStructDb, tcPaperStructSource);
             tcPaperStructDb.updateInfo(JacksonUtil.parseJson(paperStructParams.getPaperStruct()), sysUser.getId());
             tcPaperStructDb.updateInfo(JacksonUtil.parseJson(paperStructParams.getPaperStruct()), sysUser.getId());
             if (!tcPaperStructDb.equals(tcPaperStructSource)) {
             if (!tcPaperStructDb.equals(tcPaperStructSource)) {
-                trBasicInfoService.clearReportData(tcPaperStructDb.getExamId(), tcPaperStructDb.getCourseCode(), tcPaperStructDb.getPaperNumber(), paperStructParams.getTeachCourseId(), false);
+                trBasicInfoService.clearReportData(tcPaperStructDb.getExamId(), tcPaperStructDb.getCourseId(), tcPaperStructDb.getPaperNumber(), paperStructParams.getTeachCourseId(), false);
                 tcPaperStructDb.setDimensionSign(courseWeightResult.getDimensionSign());
                 tcPaperStructDb.setDimensionSign(courseWeightResult.getDimensionSign());
                 tcPaperStructService.updateById(tcPaperStructDb);
                 tcPaperStructService.updateById(tcPaperStructDb);
             }
             }
@@ -193,11 +192,11 @@ public class TCPaperStructController {
     @RequestMapping(value = "/final_score/paper_struct/query", method = RequestMethod.POST)
     @RequestMapping(value = "/final_score/paper_struct/query", method = RequestMethod.POST)
     @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,
     public Result finalScorePaperStructQuery(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                                             @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                             @ApiParam(value = "课程ID", required = true) @RequestParam Long courseId,
                                              @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                              @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
-                                             @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
+                                             @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) {
         List<PaperStructDimensionResult> paperStructDimensionResultList = null;
         List<PaperStructDimensionResult> paperStructDimensionResultList = null;
-        TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseCode, paperNumber, teachCourseId);
+        TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseId, paperNumber, teachCourseId);
         if (Objects.isNull(tcPaperStruct) || (Objects.isNull(tcPaperStruct.getPaperStruct()) && Objects.isNull(tcPaperStruct.getPaperStructDimension()))) {
         if (Objects.isNull(tcPaperStruct) || (Objects.isNull(tcPaperStruct.getPaperStruct()) && Objects.isNull(tcPaperStruct.getPaperStructDimension()))) {
             List<MarkQuestion> markQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndPaperType(examId, paperNumber, null);
             List<MarkQuestion> markQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndPaperType(examId, paperNumber, null);
             if (CollectionUtils.isEmpty(markQuestionList)) {
             if (CollectionUtils.isEmpty(markQuestionList)) {
@@ -210,7 +209,7 @@ public class TCPaperStructController {
         } else {
         } else {
             CourseWeightResult courseWeightResult = trBasicInfoService.findCourseWeightResultRmi(teachCourseId);
             CourseWeightResult courseWeightResult = trBasicInfoService.findCourseWeightResultRmi(teachCourseId);
             if (Objects.nonNull(tcPaperStruct.getDimensionSign()) && tcPaperStruct.getDimensionSign().longValue() != courseWeightResult.getDimensionSign().longValue()) {
             if (Objects.nonNull(tcPaperStruct.getDimensionSign()) && tcPaperStruct.getDimensionSign().longValue() != courseWeightResult.getDimensionSign().longValue()) {
-                trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, false);
+                trBasicInfoService.clearReportData(examId, courseId, paperNumber, teachCourseId, false);
                 paperStructDimensionResultList = this.getPaperStructDimensionResult(tcPaperStruct, paperStructDimensionResultList);
                 paperStructDimensionResultList = this.getPaperStructDimensionResult(tcPaperStruct, paperStructDimensionResultList);
             } else {
             } else {
                 paperStructDimensionResultList = this.getPaperStructDimensionResult(tcPaperStruct, paperStructDimensionResultList);
                 paperStructDimensionResultList = this.getPaperStructDimensionResult(tcPaperStruct, paperStructDimensionResultList);

+ 9 - 9
distributed-print/src/main/java/com/qmth/distributed/print/api/TCUsualScoreController.java

@@ -72,7 +72,7 @@ public class TCUsualScoreController {
     @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = ScoreResult.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = ScoreResult.class)})
     public Result scoreList(@ApiParam(value = "学期ID", required = true) @RequestParam(required = false) Long semesterId,
     public Result scoreList(@ApiParam(value = "学期ID", required = true) @RequestParam(required = false) Long semesterId,
                             @ApiParam(value = "考试ID", required = true) @RequestParam(required = false) Long examId,
                             @ApiParam(value = "考试ID", required = true) @RequestParam(required = false) Long examId,
-                            @ApiParam(value = "课程编码") @RequestParam(required = false) String courseCode,
+                            @ApiParam(value = "课程ID") @RequestParam(required = false) Long courseId,
                             @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                             @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                             @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
                             @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         if (semesterId == null) {
         if (semesterId == null) {
@@ -81,7 +81,7 @@ public class TCUsualScoreController {
         if (examId == null) {
         if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
         }
-        return ResultUtil.ok(printCommonService.scoreList(new Page<>(pageNumber, pageSize), examId, courseCode));
+        return ResultUtil.ok(printCommonService.scoreList(new Page<>(pageNumber, pageSize), examId, courseId));
     }
     }
 
 
     @ApiOperation(value = "导入平时成绩-模板下载")
     @ApiOperation(value = "导入平时成绩-模板下载")
@@ -89,7 +89,7 @@ public class TCUsualScoreController {
     @OperationLogDetail(operationType = OperationTypeEnum.EXPORT)
     @OperationLogDetail(operationType = OperationTypeEnum.EXPORT)
     @ApiResponses({@ApiResponse(code = 200, message = "下载成功", response = Object.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "下载成功", response = Object.class)})
     public void usualScoreTemplateDownload(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
     public void usualScoreTemplateDownload(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                                           @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                           @ApiParam(value = "课程ID", required = true) @RequestParam Long courseId,
                                            @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                            @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                            @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
                                            @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
         CourseWeightResult courseWeightResult = trBasicInfoService.findCourseWeightResultRmi(teachCourseId);
         CourseWeightResult courseWeightResult = trBasicInfoService.findCourseWeightResultRmi(teachCourseId);
@@ -117,22 +117,22 @@ public class TCUsualScoreController {
     @ApiResponses({@ApiResponse(code = 200, message = "导入成功", response = EditResult.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "导入成功", response = EditResult.class)})
     public Result usualScoreImport(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
     public Result usualScoreImport(@ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
                                    @ApiParam(value = "考试id", required = true) @RequestParam Long examId,
                                    @ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                                   @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                   @ApiParam(value = "课程ID", required = true) @RequestParam Long courseId,
                                    @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                    @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                    @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
                                    @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
-        return ResultUtil.ok(tcUsualScoreService.usualScoreExcelImport(file, examId, courseCode, paperNumber, teachCourseId));
+        return ResultUtil.ok(tcUsualScoreService.usualScoreExcelImport(file, examId, courseId, paperNumber, teachCourseId));
     }
     }
 
 
     @ApiOperation(value = "平时成绩列表")
     @ApiOperation(value = "平时成绩列表")
     @RequestMapping(value = "/usual_score/list", method = RequestMethod.POST)
     @RequestMapping(value = "/usual_score/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = TCUsualScore.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = TCUsualScore.class)})
     public Result usualScoreList(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
     public Result usualScoreList(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                                 @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                 @ApiParam(value = "课程ID", required = true) @RequestParam Long courseId,
                                  @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                  @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                  @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId,
                                  @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId,
                                  @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                  @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                                  @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) throws IOException {
                                  @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) throws IOException {
-        return ResultUtil.ok(tcUsualScoreService.usualScoreList(new Page<>(pageNumber, pageSize), examId, courseCode, paperNumber, teachCourseId));
+        return ResultUtil.ok(tcUsualScoreService.usualScoreList(new Page<>(pageNumber, pageSize), examId, courseId, paperNumber, teachCourseId));
     }
     }
 
 
     @ApiOperation(value = "平时成绩编辑")
     @ApiOperation(value = "平时成绩编辑")
@@ -172,7 +172,7 @@ public class TCUsualScoreController {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         tcUsualScoreDb.updateInfo(tcUsualScore, sysUser.getId());
         tcUsualScoreDb.updateInfo(tcUsualScore, sysUser.getId());
         if (!tcUsualScoreSource.equals(tcUsualScoreDb)) {
         if (!tcUsualScoreSource.equals(tcUsualScoreDb)) {
-            trBasicInfoService.clearReportData(tcUsualScoreDb.getExamId(), tcUsualScoreDb.getCourseCode(), tcUsualScoreDb.getPaperNumber(), tcUsualScoreDb.getTeachCourseId(), false);
+            trBasicInfoService.clearReportData(tcUsualScoreDb.getExamId(), tcUsualScoreDb.getCourseId(), tcUsualScoreDb.getPaperNumber(), tcUsualScoreDb.getTeachCourseId(), false);
             tcUsualScoreService.updateById(tcUsualScoreDb);
             tcUsualScoreService.updateById(tcUsualScoreDb);
         }
         }
         return ResultUtil.ok(true);
         return ResultUtil.ok(true);
@@ -194,7 +194,7 @@ public class TCUsualScoreController {
         if (!tcUsualScoreSource.equals(tcUsualScoreDb)) {
         if (!tcUsualScoreSource.equals(tcUsualScoreDb)) {
             SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
             SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
             tcUsualScoreDb.updateInfo(sysUser.getId());
             tcUsualScoreDb.updateInfo(sysUser.getId());
-            trBasicInfoService.clearReportData(tcUsualScoreDb.getExamId(), tcUsualScoreDb.getCourseCode(), tcUsualScoreDb.getPaperNumber(), tcUsualScoreDb.getTeachCourseId(), false);
+            trBasicInfoService.clearReportData(tcUsualScoreDb.getExamId(), tcUsualScoreDb.getCourseId(), tcUsualScoreDb.getPaperNumber(), tcUsualScoreDb.getTeachCourseId(), false);
             tcUsualScoreService.updateById(tcUsualScoreDb);
             tcUsualScoreService.updateById(tcUsualScoreDb);
         }
         }
         return ResultUtil.ok(true);
         return ResultUtil.ok(true);

+ 37 - 28
distributed-print/src/main/java/com/qmth/distributed/print/api/TRBasicInfoController.java

@@ -29,6 +29,7 @@ import com.qmth.distributed.print.business.entity.TRExamStudent;
 import com.qmth.distributed.print.business.service.*;
 import com.qmth.distributed.print.business.service.*;
 import com.qmth.teachcloud.common.annotation.OperationLogDetail;
 import com.qmth.teachcloud.common.annotation.OperationLogDetail;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.contant.SystemConstant;
+import com.qmth.teachcloud.common.entity.BasicCourse;
 import com.qmth.teachcloud.common.entity.BasicSchool;
 import com.qmth.teachcloud.common.entity.BasicSchool;
 import com.qmth.teachcloud.common.entity.SysConfig;
 import com.qmth.teachcloud.common.entity.SysConfig;
 import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.entity.SysUser;
@@ -36,6 +37,7 @@ import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.enums.FieldUniqueEnum;
 import com.qmth.teachcloud.common.enums.FieldUniqueEnum;
 import com.qmth.teachcloud.common.enums.ImportTemplateEnum;
 import com.qmth.teachcloud.common.enums.ImportTemplateEnum;
 import com.qmth.teachcloud.common.enums.log.OperationTypeEnum;
 import com.qmth.teachcloud.common.enums.log.OperationTypeEnum;
+import com.qmth.teachcloud.common.service.BasicCourseService;
 import com.qmth.teachcloud.common.service.CommonCacheService;
 import com.qmth.teachcloud.common.service.CommonCacheService;
 import com.qmth.teachcloud.common.service.FileUploadService;
 import com.qmth.teachcloud.common.service.FileUploadService;
 import com.qmth.teachcloud.common.util.*;
 import com.qmth.teachcloud.common.util.*;
@@ -96,13 +98,15 @@ public class TRBasicInfoController {
 
 
     @Resource
     @Resource
     TCUsualScoreService tcUsualScoreService;
     TCUsualScoreService tcUsualScoreService;
+    @Resource
+    BasicCourseService basicCourseService;
 
 
     @ApiOperation(value = "报告管理列表")
     @ApiOperation(value = "报告管理列表")
     @RequestMapping(value = "/report/list", method = RequestMethod.POST)
     @RequestMapping(value = "/report/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = ScoreResult.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = ScoreResult.class)})
     public Result reportList(@ApiParam(value = "学期ID", required = true) @RequestParam(required = false) Long semesterId,
     public Result reportList(@ApiParam(value = "学期ID", required = true) @RequestParam(required = false) Long semesterId,
                              @ApiParam(value = "考试ID", required = true) @RequestParam(required = false) Long examId,
                              @ApiParam(value = "考试ID", required = true) @RequestParam(required = false) Long examId,
-                             @ApiParam(value = "课程编码") @RequestParam(required = false) String courseCode,
+                             @ApiParam(value = "课程ID") @RequestParam(required = false) Long courseId,
                              @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                              @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
                              @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
                              @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         if (semesterId == null) {
         if (semesterId == null) {
@@ -111,7 +115,7 @@ public class TRBasicInfoController {
         if (examId == null) {
         if (examId == null) {
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
             throw ExceptionResultEnum.EXAM_ID_IS_NULL.exception();
         }
         }
-        return ResultUtil.ok(printCommonService.scoreList(new Page<>(pageNumber, pageSize), examId, courseCode));
+        return ResultUtil.ok(printCommonService.scoreList(new Page<>(pageNumber, pageSize), examId, courseId));
     }
     }
 
 
     @ApiOperation(value = "查看报告")
     @ApiOperation(value = "查看报告")
@@ -119,14 +123,14 @@ public class TRBasicInfoController {
     @ApiResponses({@ApiResponse(code = 200, message = "查看报告", response = ReportResult.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "查看报告", response = ReportResult.class)})
     @Transactional
     @Transactional
     public Result reportView(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
     public Result reportView(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                             @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                             @ApiParam(value = "课程ID", required = true) @RequestParam Long courseId,
                              @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                              @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                              @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) {
                              @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(examId, courseCode, paperNumber, teachCourseId);
+        TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(examId, courseId, paperNumber, teachCourseId);
 
 
         CourseWeightResult courseWeightResult = trBasicInfoService.findCourseWeightResultRmi(teachCourseId);
         CourseWeightResult courseWeightResult = trBasicInfoService.findCourseWeightResultRmi(teachCourseId);
-        TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseCode, paperNumber, teachCourseId);
+        TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseId, paperNumber, teachCourseId);
         if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStructDimension())) {
         if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStructDimension())) {
             List<PaperStructDimensionResult> paperStructDimensionResultList = GsonUtil.fromJson(tcPaperStruct.getPaperStructDimension(), new TypeToken<List<PaperStructDimensionResult>>() {
             List<PaperStructDimensionResult> paperStructDimensionResultList = GsonUtil.fromJson(tcPaperStruct.getPaperStructDimension(), new TypeToken<List<PaperStructDimensionResult>>() {
             }.getType());
             }.getType());
@@ -135,19 +139,19 @@ public class TRBasicInfoController {
                 Objects.requireNonNull(c.getTotalWeight(), "[" + c.getCourseTargetName() + "]未设置权重");
                 Objects.requireNonNull(c.getTotalWeight(), "[" + c.getCourseTargetName() + "]未设置权重");
                 Objects.requireNonNull(c.getTotalScore(), "[" + c.getCourseTargetName() + "]未设置目标分值");
                 Objects.requireNonNull(c.getTotalScore(), "[" + c.getCourseTargetName() + "]未设置目标分值");
                 if (new BigDecimal(score).compareTo(c.getTotalWeight()) == 1) {
                 if (new BigDecimal(score).compareTo(c.getTotalWeight()) == 1) {
-                    trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, false);
+                    trBasicInfoService.clearReportData(examId, courseId, paperNumber, teachCourseId, false);
                     throw ExceptionResultEnum.ERROR.exception("[" + c.getCourseTargetName() + "]包含的小题总分与权重设置不一致,请到期末成绩--试卷蓝图设置里调整");
                     throw ExceptionResultEnum.ERROR.exception("[" + c.getCourseTargetName() + "]包含的小题总分与权重设置不一致,请到期末成绩--试卷蓝图设置里调整");
                 }
                 }
             }
             }
         }
         }
 
 
-        MarkPaper markPaper = printCommonService.getMarkPaper(examId, courseCode, tcPaperStruct.getPaperNumber());
+        MarkPaper markPaper = printCommonService.getMarkPaper(examId, courseId, tcPaperStruct.getPaperNumber());
         if (Objects.isNull(trBasicInfo)) {
         if (Objects.isNull(trBasicInfo)) {
             trBasicInfo = trBasicInfoService.getReportView(trBasicInfo, markPaper, sysUser.getId(), courseWeightResult, teachCourseId);
             trBasicInfo = trBasicInfoService.getReportView(trBasicInfo, markPaper, sysUser.getId(), courseWeightResult, teachCourseId);
         } else {
         } else {
             ReportCourseEvaluationResultDto reportCourseEvaluationResultDto = Objects.nonNull(trBasicInfo.getCourseEvaluationResult()) ? JSONObject.parseObject(trBasicInfo.getCourseEvaluationResult(), ReportCourseEvaluationResultDto.class) : null;
             ReportCourseEvaluationResultDto reportCourseEvaluationResultDto = Objects.nonNull(trBasicInfo.getCourseEvaluationResult()) ? JSONObject.parseObject(trBasicInfo.getCourseEvaluationResult(), ReportCourseEvaluationResultDto.class) : null;
             if (Objects.nonNull(reportCourseEvaluationResultDto.getWeightSettingSign()) && reportCourseEvaluationResultDto.getWeightSettingSign().longValue() != courseWeightResult.getWeightSettingSign().longValue()) {
             if (Objects.nonNull(reportCourseEvaluationResultDto.getWeightSettingSign()) && reportCourseEvaluationResultDto.getWeightSettingSign().longValue() != courseWeightResult.getWeightSettingSign().longValue()) {
-                trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getDimensionSign()) && tcPaperStruct.getDimensionSign().longValue() != courseWeightResult.getDimensionSign().longValue() ? true : false);
+                trBasicInfoService.clearReportData(examId, courseId, paperNumber, teachCourseId, Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getDimensionSign()) && tcPaperStruct.getDimensionSign().longValue() != courseWeightResult.getDimensionSign().longValue() ? true : false);
                 trBasicInfo = trBasicInfoService.getReportView(trBasicInfo, markPaper, sysUser.getId(), courseWeightResult, teachCourseId);
                 trBasicInfo = trBasicInfoService.getReportView(trBasicInfo, markPaper, sysUser.getId(), courseWeightResult, teachCourseId);
             } else {
             } else {
                 ReportCourseBasicInfoDto reportCourseBasicInfoDto = new ReportCourseBasicInfoDto(trBasicInfo);
                 ReportCourseBasicInfoDto reportCourseBasicInfoDto = new ReportCourseBasicInfoDto(trBasicInfo);
@@ -161,7 +165,8 @@ public class TRBasicInfoController {
                     }
                     }
                     reportCourseEvaluationResultDetailDto = new ReportCourseEvaluationResultDetailDto(examStudentList);
                     reportCourseEvaluationResultDetailDto = new ReportCourseEvaluationResultDetailDto(examStudentList);
                 }
                 }
-                trBasicInfo.setReportResult(new ReportResult(new ReportCommonDto(examId, courseCode, markPaper.getCourseName(), paperNumber), reportCourseBasicInfoDto, reportCourseEvaluationSpreadDto, reportCourseEvaluationResultDto, reportCourseEvaluationResultDetailDto));
+                BasicCourse basicCourse = basicCourseService.getById(courseId);
+                trBasicInfo.setReportResult(new ReportResult(new ReportCommonDto(examId, courseId, basicCourse.getCode(), basicCourse.getName(), paperNumber), reportCourseBasicInfoDto, reportCourseEvaluationSpreadDto, reportCourseEvaluationResultDto, reportCourseEvaluationResultDetailDto));
             }
             }
         }
         }
         trBasicInfo.updateInfo(sysUser.getId());
         trBasicInfo.updateInfo(sysUser.getId());
@@ -182,11 +187,11 @@ public class TRBasicInfoController {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         TRBasicInfo trBasicInfoDb = null;
         TRBasicInfo trBasicInfoDb = null;
         try {
         try {
-            trBasicInfoDb = trBasicInfoService.queryBasicInfo(trBasicInfo.getExamId(), trBasicInfo.getCourseCode(), trBasicInfo.getPaperNumber(), trBasicInfo.getTeachCourseId());
+            trBasicInfoDb = trBasicInfoService.queryBasicInfo(trBasicInfo.getExamId(), trBasicInfo.getCourseId(), trBasicInfo.getPaperNumber(), trBasicInfo.getTeachCourseId());
             if (Objects.isNull(trBasicInfoDb)) {
             if (Objects.isNull(trBasicInfoDb)) {
                 trBasicInfoDb = new TRBasicInfo(trBasicInfo, sysUser.getId());
                 trBasicInfoDb = new TRBasicInfo(trBasicInfo, sysUser.getId());
-                TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(trBasicInfo.getExamId(), trBasicInfo.getCourseCode(), trBasicInfo.getPaperNumber(), trBasicInfo.getTeachCourseId());
-                MarkPaper markPaper = printCommonService.getMarkPaper(trBasicInfo.getExamId(), trBasicInfo.getCourseCode(), Objects.nonNull(tcPaperStruct) ? tcPaperStruct.getPaperNumber() : trBasicInfo.getPaperNumber());
+                TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(trBasicInfo.getExamId(), trBasicInfo.getCourseId(), trBasicInfo.getPaperNumber(), trBasicInfo.getTeachCourseId());
+                MarkPaper markPaper = printCommonService.getMarkPaper(trBasicInfo.getExamId(), trBasicInfo.getCourseId(), Objects.nonNull(tcPaperStruct) ? tcPaperStruct.getPaperNumber() : trBasicInfo.getPaperNumber());
                 trBasicInfoDb = trBasicInfoService.getReportView(trBasicInfoDb, markPaper, sysUser.getId(), trBasicInfoService.findCourseWeightResultRmi(trBasicInfo.getTeachCourseId()), trBasicInfo.getTeachCourseId());
                 trBasicInfoDb = trBasicInfoService.getReportView(trBasicInfoDb, markPaper, sysUser.getId(), trBasicInfoService.findCourseWeightResultRmi(trBasicInfo.getTeachCourseId()), trBasicInfo.getTeachCourseId());
             } else {
             } else {
                 trBasicInfoDb.updateInfo(trBasicInfo, sysUser.getId());
                 trBasicInfoDb.updateInfo(trBasicInfo, sysUser.getId());
@@ -212,7 +217,7 @@ public class TRBasicInfoController {
     @ApiResponses({@ApiResponse(code = 200, message = "下载成功", response = Object.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "下载成功", response = Object.class)})
     @Aac(rateLimit = @RateLimit(count = 1, period = 1000L))
     @Aac(rateLimit = @RateLimit(count = 1, period = 1000L))
     public void reportExport(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
     public void reportExport(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                             @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                             @ApiParam(value = "课程ID", required = true) @RequestParam Long courseId,
                              @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                              @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                              @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
                              @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
         File txtFileTemp = null, fileTemp = null;
         File txtFileTemp = null, fileTemp = null;
@@ -220,13 +225,13 @@ public class TRBasicInfoController {
             Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
             Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
             BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
             BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
 
 
-            TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(examId, courseCode, paperNumber, teachCourseId);
+            TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(examId, courseId, paperNumber, teachCourseId);
             Objects.requireNonNull(trBasicInfo, "没有报告信息");
             Objects.requireNonNull(trBasicInfo, "没有报告信息");
             Objects.requireNonNull(trBasicInfo.getCourseEvaluationResult(), "没有课程目标信息");
             Objects.requireNonNull(trBasicInfo.getCourseEvaluationResult(), "没有课程目标信息");
             Objects.requireNonNull(trBasicInfo.getCourseEvaluationResultDetail(), "没有课程考生信息");
             Objects.requireNonNull(trBasicInfo.getCourseEvaluationResultDetail(), "没有课程考生信息");
 
 
             CourseWeightResult courseWeightResult = trBasicInfoService.findCourseWeightResultRmi(teachCourseId);
             CourseWeightResult courseWeightResult = trBasicInfoService.findCourseWeightResultRmi(teachCourseId);
-            TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseCode, paperNumber, teachCourseId);
+            TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseId, paperNumber, teachCourseId);
             if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStructDimension())) {
             if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStructDimension())) {
                 List<PaperStructDimensionResult> paperStructDimensionResultList = GsonUtil.fromJson(tcPaperStruct.getPaperStructDimension(), new TypeToken<List<PaperStructDimensionResult>>() {
                 List<PaperStructDimensionResult> paperStructDimensionResultList = GsonUtil.fromJson(tcPaperStruct.getPaperStructDimension(), new TypeToken<List<PaperStructDimensionResult>>() {
                 }.getType());
                 }.getType());
@@ -235,7 +240,7 @@ public class TRBasicInfoController {
                     Objects.requireNonNull(c.getTotalWeight(), "[" + c.getCourseTargetName() + "]未设置权重");
                     Objects.requireNonNull(c.getTotalWeight(), "[" + c.getCourseTargetName() + "]未设置权重");
                     Objects.requireNonNull(c.getTotalScore(), "[" + c.getCourseTargetName() + "]未设置目标分值");
                     Objects.requireNonNull(c.getTotalScore(), "[" + c.getCourseTargetName() + "]未设置目标分值");
                     if (new BigDecimal(score).compareTo(c.getTotalWeight()) == 1) {
                     if (new BigDecimal(score).compareTo(c.getTotalWeight()) == 1) {
-                        trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, false);
+                        trBasicInfoService.clearReportData(examId, courseId, paperNumber, teachCourseId, false);
                         throw ExceptionResultEnum.ERROR.exception("[" + c.getCourseTargetName() + "]包含的小题总分与权重设置不一致,请到期末成绩--试卷蓝图设置里调整");
                         throw ExceptionResultEnum.ERROR.exception("[" + c.getCourseTargetName() + "]包含的小题总分与权重设置不一致,请到期末成绩--试卷蓝图设置里调整");
                     }
                     }
                 }
                 }
@@ -243,9 +248,9 @@ public class TRBasicInfoController {
 
 
             ReportCourseEvaluationResultDto reportCourseEvaluationResultDto = JSONObject.parseObject(trBasicInfo.getCourseEvaluationResult(), ReportCourseEvaluationResultDto.class);
             ReportCourseEvaluationResultDto reportCourseEvaluationResultDto = JSONObject.parseObject(trBasicInfo.getCourseEvaluationResult(), ReportCourseEvaluationResultDto.class);
             if (Objects.nonNull(reportCourseEvaluationResultDto.getWeightSettingSign()) && reportCourseEvaluationResultDto.getWeightSettingSign().longValue() != courseWeightResult.getWeightSettingSign().longValue()) {
             if (Objects.nonNull(reportCourseEvaluationResultDto.getWeightSettingSign()) && reportCourseEvaluationResultDto.getWeightSettingSign().longValue() != courseWeightResult.getWeightSettingSign().longValue()) {
-                trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getDimensionSign()) && tcPaperStruct.getDimensionSign().longValue() != courseWeightResult.getDimensionSign().longValue() ? true : false);
-                this.reportView(examId, courseCode, paperNumber, teachCourseId);
-                this.reportExport(examId, courseCode, paperNumber, teachCourseId);
+                trBasicInfoService.clearReportData(examId, courseId, paperNumber, teachCourseId, Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getDimensionSign()) && tcPaperStruct.getDimensionSign().longValue() != courseWeightResult.getDimensionSign().longValue() ? true : false);
+                this.reportView(examId, courseId, paperNumber, teachCourseId);
+                this.reportExport(examId, courseId, paperNumber, teachCourseId);
             } else {
             } else {
                 //评价样本的基本信息
                 //评价样本的基本信息
                 String period = Objects.nonNull(trBasicInfo.getPeriod()) ? trBasicInfo.getPeriod() : null;
                 String period = Objects.nonNull(trBasicInfo.getPeriod()) ? trBasicInfo.getPeriod() : null;
@@ -260,13 +265,17 @@ public class TRBasicInfoController {
                     courseTarget.add("      ").add(s.getTargetName()).add("——").add(s.getGraduationRequirementPoint()).add("\r\n");
                     courseTarget.add("      ").add(s.getTargetName()).add("——").add(s.getGraduationRequirementPoint()).add("\r\n");
                 }).collect(Collectors.toList());
                 }).collect(Collectors.toList());
 
 
-                CourseBasicBean courseBasicBean = new CourseBasicBean(trBasicInfo.getCourseName(),
-                        trBasicInfo.getCourseCode(), null, trBasicInfo.getCourseType(),
+                BasicCourse basicCourse = basicCourseService.getById(trBasicInfo.getCourseId());
+                if(basicCourse == null){
+                    throw ExceptionResultEnum.ERROR.exception("课程不存在");
+                }
+                CourseBasicBean courseBasicBean = new CourseBasicBean(basicCourse.getName(),
+                        basicCourse.getCode(), null, trBasicInfo.getCourseType(),
                         period, null, null, trBasicInfo.getDirector(),
                         period, null, null, trBasicInfo.getDirector(),
                         DateUtil.format(new Date(trBasicInfo.getCreateTime()), SystemConstant.DEFAULT_DATE_PATTERN),
                         DateUtil.format(new Date(trBasicInfo.getCreateTime()), SystemConstant.DEFAULT_DATE_PATTERN),
                         courseTarget.toString(), reportCourseEvaluationResultDto.getTargetList().size());
                         courseTarget.toString(), reportCourseEvaluationResultDto.getTargetList().size());
 
 
-                CourseReportBean courseReportBean = new CourseReportBean(trBasicInfo.getOpenTime() + "《" + trBasicInfo.getCourseName() + "》", courseBasicBean);
+                CourseReportBean courseReportBean = new CourseReportBean(trBasicInfo.getOpenTime() + "《" + basicCourse.getName() + "》", courseBasicBean);
                 //table1-课程目标目标与毕业要求指标点的对应关系
                 //table1-课程目标目标与毕业要求指标点的对应关系
                 courseReportBean.setCourseTargetTable1(trBasicInfoService.buildWordTable1(courseTargetWordDtoList));
                 courseReportBean.setCourseTargetTable1(trBasicInfoService.buildWordTable1(courseTargetWordDtoList));
 
 
@@ -321,12 +330,12 @@ public class TRBasicInfoController {
     @RequestMapping(value = "/report/change", method = RequestMethod.POST)
     @RequestMapping(value = "/report/change", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "下载成功", response = Object.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "下载成功", response = Object.class)})
     public Result reportDataChange(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
     public Result reportDataChange(@ApiParam(value = "考试id", required = true) @RequestParam Long examId,
-                                   @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                                   @ApiParam(value = "课程ID", required = true) @RequestParam Long courseId,
                                    @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                    @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,
                                    @ApiParam(value = "true:报告,false:成绩管理", required = true) @RequestParam boolean report,
                                    @ApiParam(value = "true:报告,false:成绩管理", required = true) @RequestParam boolean report,
-                                   @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) throws IOException {
+                                   @ApiParam(value = "教学课程id", required = true) @RequestParam Long teachCourseId) {
         ReportChangeResult reportChangeResult = new ReportChangeResult();
         ReportChangeResult reportChangeResult = new ReportChangeResult();
-        List<TCUsualScore> tcUsualScoreList = tcUsualScoreService.queryUsualScore(examId, courseCode, paperNumber, teachCourseId);
+        List<TCUsualScore> tcUsualScoreList = tcUsualScoreService.queryUsualScore(examId, courseId, paperNumber, teachCourseId);
         if (CollectionUtils.isNotEmpty(tcUsualScoreList)) {
         if (CollectionUtils.isNotEmpty(tcUsualScoreList)) {
             Set<String> usualScoreCourseSet = new LinkedHashSet<>();
             Set<String> usualScoreCourseSet = new LinkedHashSet<>();
             TCUsualScore tcUsualScore = tcUsualScoreList.get(0);
             TCUsualScore tcUsualScore = tcUsualScoreList.get(0);
@@ -356,7 +365,7 @@ public class TRBasicInfoController {
                 }
                 }
             }
             }
 
 
-            TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(examId, courseCode, paperNumber, teachCourseId);
+            TRBasicInfo trBasicInfo = trBasicInfoService.queryBasicInfo(examId, courseId, paperNumber, teachCourseId);
             if (Objects.nonNull(trBasicInfo) && Objects.nonNull(trBasicInfo.getCourseEvaluationResultDetail())) {
             if (Objects.nonNull(trBasicInfo) && Objects.nonNull(trBasicInfo.getCourseEvaluationResultDetail())) {
                 JSONObject jsonObject = JSONObject.parseObject(trBasicInfo.getCourseEvaluationResultDetail());
                 JSONObject jsonObject = JSONObject.parseObject(trBasicInfo.getCourseEvaluationResultDetail());
                 List<CourseTargetWordDto> courseTargetWordDtoList = JSONArray.parseArray(jsonObject.get("targetWordMap").toString(), CourseTargetWordDto.class);
                 List<CourseTargetWordDto> courseTargetWordDtoList = JSONArray.parseArray(jsonObject.get("targetWordMap").toString(), CourseTargetWordDto.class);
@@ -371,7 +380,7 @@ public class TRBasicInfoController {
             }
             }
 
 
             if (!report) {
             if (!report) {
-                TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseCode, paperNumber, teachCourseId);
+                TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(examId, courseId, paperNumber, teachCourseId);
                 if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStructDimension())) {
                 if (Objects.nonNull(tcPaperStruct) && Objects.nonNull(tcPaperStruct.getPaperStructDimension())) {
                     List<PaperStructDimensionResult> paperStructDimensionResultList = GsonUtil.fromJson(tcPaperStruct.getPaperStructDimension(), new TypeToken<List<PaperStructDimensionResult>>() {
                     List<PaperStructDimensionResult> paperStructDimensionResultList = GsonUtil.fromJson(tcPaperStruct.getPaperStructDimension(), new TypeToken<List<PaperStructDimensionResult>>() {
                     }.getType());
                     }.getType());
@@ -390,7 +399,7 @@ public class TRBasicInfoController {
                         }
                         }
                     }
                     }
                     if (reportChangeResult.isTargetScoreChange()) {
                     if (reportChangeResult.isTargetScoreChange()) {
-                        trBasicInfoService.clearReportData(examId, courseCode, paperNumber, teachCourseId, false);
+                        trBasicInfoService.clearReportData(examId, courseId, paperNumber, teachCourseId, false);
                         reportChangeResult.setTargetScoreChangeStr(stringJoiner.toString());
                         reportChangeResult.setTargetScoreChangeStr(stringJoiner.toString());
                     }
                     }
                 }
                 }

+ 22 - 13
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/archivescore/MarkStudentScoreVo.java

@@ -6,8 +6,9 @@ import java.util.List;
 
 
 public class MarkStudentScoreVo {
 public class MarkStudentScoreVo {
     private Long examId;
     private Long examId;
-    private String courseCode;
-    private String courseName;
+    private Long courseId;
+//    private String courseCode;
+//    private String courseName;
     private String paperNumber;
     private String paperNumber;
     private String studentCode;
     private String studentCode;
     private String studentName;
     private String studentName;
@@ -26,21 +27,29 @@ public class MarkStudentScoreVo {
         this.examId = examId;
         this.examId = examId;
     }
     }
 
 
-    public String getCourseCode() {
-        return courseCode;
+    public Long getCourseId() {
+        return courseId;
     }
     }
 
 
-    public void setCourseCode(String courseCode) {
-        this.courseCode = courseCode;
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
     }
     }
 
 
-    public String getCourseName() {
-        return courseName;
-    }
-
-    public void setCourseName(String courseName) {
-        this.courseName = courseName;
-    }
+//    public String getCourseCode() {
+//        return courseCode;
+//    }
+//
+//    public void setCourseCode(String courseCode) {
+//        this.courseCode = courseCode;
+//    }
+//
+//    public String getCourseName() {
+//        return courseName;
+//    }
+//
+//    public void setCourseName(String courseName) {
+//        this.courseName = courseName;
+//    }
 
 
     public String getPaperNumber() {
     public String getPaperNumber() {
         return paperNumber;
         return paperNumber;

+ 3 - 3
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkStudentServiceImpl.java

@@ -976,7 +976,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
     public void scoreExport(ArchiveStudentQuery query, HttpServletResponse response) {
     public void scoreExport(ArchiveStudentQuery query, HttpServletResponse response) {
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         //生成表头
         //生成表头
-        String[] columnName = new String[]{"学生姓名", "学号", "学院", "班级", "课程代码", "课程名称", "客观分", "主观分",
+        String[] columnName = new String[]{"学生姓名", "学号", "学院", "班级", "课程代码", "课程名称","状态", "客观分", "主观分",
                 "成绩"};
                 "成绩"};
         List<MarkQuestion> oQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndGroupNumber(query.getExamId(), query.getPaperNumber(), null, true);
         List<MarkQuestion> oQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndGroupNumber(query.getExamId(), query.getPaperNumber(), null, true);
         List<MarkQuestion> sQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndGroupNumber(query.getExamId(), query.getPaperNumber(), null, false);
         List<MarkQuestion> sQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndGroupNumber(query.getExamId(), query.getPaperNumber(), null, false);
@@ -1000,6 +1000,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
             valueList.add(s.getClassName());
             valueList.add(s.getClassName());
             valueList.add(s.getCourseCode());
             valueList.add(s.getCourseCode());
             valueList.add(s.getCourseName());
             valueList.add(s.getCourseName());
+            valueList.add(s.getStatus().getName());
             valueList.add(s.getObjectiveScore() == null ? "" : s.getObjectiveScore().toString());
             valueList.add(s.getObjectiveScore() == null ? "" : s.getObjectiveScore().toString());
             valueList.add(s.getSubjectiveScore() == null ? "" : s.getSubjectiveScore().toString());
             valueList.add(s.getSubjectiveScore() == null ? "" : s.getSubjectiveScore().toString());
             valueList.add(s.getTotalScore() == null ? "" : s.getTotalScore().toString());
             valueList.add(s.getTotalScore() == null ? "" : s.getTotalScore().toString());
@@ -1437,8 +1438,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
         for (MarkStudentVo markStudent : markStudentList) {
         for (MarkStudentVo markStudent : markStudentList) {
             MarkStudentScoreVo markStudentScoreVo = new MarkStudentScoreVo();
             MarkStudentScoreVo markStudentScoreVo = new MarkStudentScoreVo();
             markStudentScoreVo.setExamId(markStudent.getExamId());
             markStudentScoreVo.setExamId(markStudent.getExamId());
-            markStudentScoreVo.setCourseCode(markStudent.getCourseCode());
-            markStudentScoreVo.setCourseName(markStudent.getCourseName());
+            markStudentScoreVo.setCourseId(markStudent.getCourseId());
             markStudentScoreVo.setPaperNumber(markStudent.getPaperNumber());
             markStudentScoreVo.setPaperNumber(markStudent.getPaperNumber());
             markStudentScoreVo.setStudentCode(markStudent.getStudentCode());
             markStudentScoreVo.setStudentCode(markStudent.getStudentCode());
             markStudentScoreVo.setStudentName(markStudent.getStudentName());
             markStudentScoreVo.setStudentName(markStudent.getStudentName());