Sfoglia il codice sorgente

Merge branch 'dev_v2.1.0' into release_v2.1.0
merge

wangliang 4 anni fa
parent
commit
6755d24aa5
14 ha cambiato i file con 743 aggiunte e 18 eliminazioni
  1. 29 10
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/TAExamCourseDto.java
  2. 331 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/TAExamCourseExportDto.java
  3. 44 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/result/TAExamCourseResult.java
  4. 223 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/entity/TBExamination.java
  5. 1 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TBExamStudentMapper.java
  6. 16 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TBExaminationMapper.java
  7. 16 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBExaminationService.java
  8. 9 2
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamStudentServiceImpl.java
  9. 20 0
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExaminationServiceImpl.java
  10. 5 1
      teachcloud-report-business/src/main/resources/mapper/TAExamCourseMapper.xml
  11. 2 1
      teachcloud-report-business/src/main/resources/mapper/TAExamTotalMapper.xml
  12. 5 0
      teachcloud-report-business/src/main/resources/mapper/TBExaminationMapper.xml
  13. 23 3
      teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/CourseController.java
  14. 19 0
      teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/TBExaminationController.java

+ 29 - 10
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/TAExamCourseDto.java

@@ -18,7 +18,7 @@ import java.util.Objects;
 public class TAExamCourseDto implements Serializable {
 
     @ExcelProperty(name = "课程(代码)", width = 40, index = 1)
-    private String courseCodeName;
+    private String courseNameCode;
 
     @ExcelProperty(name = "开课学院", width = 30, index = 2)
     private String teachCollegeName;
@@ -65,6 +65,17 @@ public class TAExamCourseDto implements Serializable {
     @ApiModelProperty(value = "应届不通过人数")
     private Integer currentNotPassCount;
 
+    @ApiModelProperty(value = "往届实际考试人数")
+    private Integer pastRealityCount;
+
+    public Integer getPastRealityCount() {
+        return pastRealityCount;
+    }
+
+    public void setPastRealityCount(Integer pastRealityCount) {
+        this.pastRealityCount = pastRealityCount;
+    }
+
     public Integer getNotPassCount() {
         return notPassCount;
     }
@@ -105,16 +116,16 @@ public class TAExamCourseDto implements Serializable {
         this.courseName = courseName;
     }
 
-    public String getCourseCodeName() {
+    public String getCourseNameCode() {
         if (Objects.nonNull(courseCode) && Objects.nonNull(courseName)) {
-            return courseCode + "(" + courseName + ")";
+            return courseName + "(" + courseCode + ")";
         } else {
-            return courseCodeName;
+            return courseNameCode;
         }
     }
 
-    public void setCourseCodeName(String courseCodeName) {
-        this.courseCodeName = courseCodeName;
+    public void setCourseNameCode(String courseNameCode) {
+        this.courseNameCode = courseNameCode;
     }
 
     public String getTeachCollegeName() {
@@ -142,7 +153,11 @@ public class TAExamCourseDto implements Serializable {
     }
 
     public String getCurrentRealityRate() {
-        return currentRealityRate + "(" + currentRealityCount + ")";
+        if (Objects.nonNull(currentRealityRate)) {
+            return new BigDecimal(currentRealityRate).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + currentRealityCount + ")";
+        } else {
+            return currentRealityRate;
+        }
     }
 
     public void setCurrentRealityRate(String currentRealityRate) {
@@ -150,7 +165,11 @@ public class TAExamCourseDto implements Serializable {
     }
 
     public String getPastRealityRate() {
-        return pastRealityRate + "(" + pastRealityRate + ")";
+        if (Objects.nonNull(pastRealityRate)) {
+            return new BigDecimal(pastRealityRate).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + pastRealityCount + ")";
+        } else {
+            return pastRealityRate;
+        }
     }
 
     public void setPastRealityRate(String pastRealityRate) {
@@ -159,7 +178,7 @@ public class TAExamCourseDto implements Serializable {
 
     public BigDecimal getAvgScore() {
         if (Objects.nonNull(avgScore)) {
-            return avgScore.setScale(SystemConstant.CALCULATE_SCALE, BigDecimal.ROUND_HALF_UP);
+            return avgScore.setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP);
         } else {
             return avgScore;
         }
@@ -187,7 +206,7 @@ public class TAExamCourseDto implements Serializable {
 
     public BigDecimal getPaperCurrentAvgScore() {
         if (Objects.nonNull(paperCurrentAvgScore)) {
-            return paperCurrentAvgScore.setScale(SystemConstant.CALCULATE_SCALE, BigDecimal.ROUND_HALF_UP);
+            return paperCurrentAvgScore.setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP);
         } else {
             return paperCurrentAvgScore;
         }

+ 331 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/dto/excel/TAExamCourseExportDto.java

@@ -0,0 +1,331 @@
+package com.qmth.teachcloud.report.business.bean.dto.excel;
+
+import com.qmth.teachcloud.common.annotation.ExcelProperty;
+import com.qmth.teachcloud.common.contant.SystemConstant;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Objects;
+
+/**
+ * @Description: TAExamCourseDto
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2021/6/17
+ */
+public class TAExamCourseExportDto implements Serializable {
+
+    @ExcelProperty(name = "课程(代码)", width = 40, index = 1)
+    private String courseNameCode;
+
+    @ExcelProperty(name = "开课学院", width = 30, index = 2)
+    private String teachCollegeName;
+
+    @ExcelProperty(name = "考查学院", width = 30, index = 3)
+    private Integer inspectCollegeCount;
+
+    @ExcelProperty(name = "有效人数", width = 30, index = 4)
+    private Integer realityCount;
+
+    @ExcelProperty(name = "应届占比(人数)", width = 50, index = 5)
+    private String currentRealityRate;
+
+    @ExcelProperty(name = "非应届占比(人数)", width = 50, index = 6)
+    private String pastRealityRate;
+
+    @ExcelProperty(name = "缺考", width = 30, index = 7)
+    private Integer absentCount;
+
+    @ExcelProperty(name = "总体平均分-赋分前", width = 50, index = 8)
+    private BigDecimal avgScoreBefore;
+
+    @ExcelProperty(name = "总体不及格率(人数)-赋分前", width = 50, index = 9)
+    private String notPassRateBefore;
+
+    @ExcelProperty(name = "应届平均分-赋分前", width = 50, index = 10)
+    private BigDecimal currentAvgScoreBefore;
+
+    @ExcelProperty(name = "应届不及格率(人数)-赋分前", width = 50, index = 11)
+    private String currentNotPassRateBefore;
+
+    @ExcelProperty(name = "赋分系数", width = 30, index = 12)
+    private BigDecimal coefficient;
+
+    @ExcelProperty(name = "总体平均分-赋分后", width = 50, index = 13)
+    private BigDecimal avgScoreAfter;
+
+    @ExcelProperty(name = "总体不及格率(人数)-赋分后", width = 50, index = 14)
+    private String notPassRateAfter;
+
+    @ExcelProperty(name = "应届平均分-赋分后", width = 50, index = 15)
+    private BigDecimal currentAvgScoreAfter;
+
+    @ExcelProperty(name = "应届不及格率(人数)-赋分后", width = 50, index = 16)
+    private String currentNotPassRateAfter;
+
+    @ApiModelProperty(value = "科目编码")
+    private String courseCode;
+
+    @ApiModelProperty(value = "科目名称")
+    private String courseName;
+
+    @ApiModelProperty(value = "应届实际考试人数")
+    private Integer currentRealityCount;
+
+    @ApiModelProperty(value = "往届实际考试人数")
+    private Integer pastRealityCount;
+
+    @ApiModelProperty(value = "不通过人数(赋分前)")
+    private Integer notPassCountBefore;
+
+    @ApiModelProperty(value = "应届不通过人数(赋分前)")
+    private Integer currentNotPassCountBefore;
+
+    @ApiModelProperty(value = "不通过人数(赋分后)")
+    private Integer notPassCountAfter;
+
+    @ApiModelProperty(value = "应届不通过人数(赋分后)")
+    private Integer currentNotPassCountAfter;
+
+    public Integer getPastRealityCount() {
+        return pastRealityCount;
+    }
+
+    public void setPastRealityCount(Integer pastRealityCount) {
+        this.pastRealityCount = pastRealityCount;
+    }
+
+    public Integer getCurrentRealityCount() {
+        return currentRealityCount;
+    }
+
+    public void setCurrentRealityCount(Integer currentRealityCount) {
+        this.currentRealityCount = currentRealityCount;
+    }
+
+    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 getCourseNameCode() {
+        if (Objects.nonNull(courseCode) && Objects.nonNull(courseName)) {
+            return courseName + "(" + courseCode + ")";
+        } else {
+            return courseNameCode;
+        }
+    }
+
+    public void setCourseNameCode(String courseNameCode) {
+        this.courseNameCode = courseNameCode;
+    }
+
+    public String getTeachCollegeName() {
+        return teachCollegeName;
+    }
+
+    public void setTeachCollegeName(String teachCollegeName) {
+        this.teachCollegeName = teachCollegeName;
+    }
+
+    public Integer getInspectCollegeCount() {
+        return inspectCollegeCount;
+    }
+
+    public void setInspectCollegeCount(Integer inspectCollegeCount) {
+        this.inspectCollegeCount = inspectCollegeCount;
+    }
+
+    public Integer getRealityCount() {
+        return realityCount;
+    }
+
+    public void setRealityCount(Integer realityCount) {
+        this.realityCount = realityCount;
+    }
+
+    public String getCurrentRealityRate() {
+        if (Objects.nonNull(currentRealityRate)) {
+            return new BigDecimal(currentRealityRate).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + currentRealityCount + ")";
+        } else {
+            return currentRealityRate;
+        }
+    }
+
+    public void setCurrentRealityRate(String currentRealityRate) {
+        this.currentRealityRate = currentRealityRate;
+    }
+
+    public String getPastRealityRate() {
+        if (Objects.nonNull(pastRealityRate)) {
+            return new BigDecimal(pastRealityRate).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + pastRealityCount + ")";
+        } else {
+            return pastRealityRate;
+        }
+    }
+
+    public void setPastRealityRate(String pastRealityRate) {
+        this.pastRealityRate = pastRealityRate;
+    }
+
+    public Integer getAbsentCount() {
+        return absentCount;
+    }
+
+    public void setAbsentCount(Integer absentCount) {
+        this.absentCount = absentCount;
+    }
+
+    public BigDecimal getAvgScoreBefore() {
+        if (Objects.nonNull(avgScoreBefore)) {
+            return avgScoreBefore.setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP);
+        } else {
+            return avgScoreBefore;
+        }
+    }
+
+    public void setAvgScoreBefore(BigDecimal avgScoreBefore) {
+        this.avgScoreBefore = avgScoreBefore;
+    }
+
+    public String getNotPassRateBefore() {
+        if (Objects.nonNull(notPassRateBefore)) {
+            return new BigDecimal(notPassRateBefore).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + notPassCountBefore + ")";
+        } else {
+            return notPassRateBefore;
+        }
+    }
+
+    public void setNotPassRateBefore(String notPassRateBefore) {
+        this.notPassRateBefore = notPassRateBefore;
+    }
+
+    public BigDecimal getCurrentAvgScoreBefore() {
+        if (Objects.nonNull(currentAvgScoreBefore)) {
+            return currentAvgScoreBefore.setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP);
+        } else {
+            return currentAvgScoreBefore;
+        }
+    }
+
+    public void setCurrentAvgScoreBefore(BigDecimal currentAvgScoreBefore) {
+        this.currentAvgScoreBefore = currentAvgScoreBefore;
+    }
+
+    public String getCurrentNotPassRateBefore() {
+        if (Objects.nonNull(currentNotPassRateBefore)) {
+            return new BigDecimal(currentNotPassRateBefore).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + currentNotPassCountBefore + ")";
+        } else {
+            return currentNotPassRateBefore;
+        }
+    }
+
+    public void setCurrentNotPassRateBefore(String currentNotPassRateBefore) {
+        this.currentNotPassRateBefore = currentNotPassRateBefore;
+    }
+
+    public BigDecimal getCoefficient() {
+        if (Objects.nonNull(coefficient)) {
+            return coefficient.setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP);
+        } else {
+            return coefficient;
+        }
+    }
+
+    public void setCoefficient(BigDecimal coefficient) {
+        this.coefficient = coefficient;
+    }
+
+    public BigDecimal getAvgScoreAfter() {
+        if (Objects.nonNull(avgScoreAfter)) {
+            return avgScoreAfter.setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP);
+        } else {
+            return avgScoreAfter;
+        }
+    }
+
+    public void setAvgScoreAfter(BigDecimal avgScoreAfter) {
+        this.avgScoreAfter = avgScoreAfter;
+    }
+
+    public String getNotPassRateAfter() {
+        if (Objects.nonNull(notPassRateAfter)) {
+            return new BigDecimal(notPassRateAfter).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + notPassCountAfter + ")";
+        } else {
+            return notPassRateAfter;
+        }
+    }
+
+    public void setNotPassRateAfter(String notPassRateAfter) {
+        this.notPassRateAfter = notPassRateAfter;
+    }
+
+    public BigDecimal getCurrentAvgScoreAfter() {
+        if (Objects.nonNull(currentAvgScoreAfter)) {
+            return currentAvgScoreAfter.setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP);
+        } else {
+            return currentAvgScoreAfter;
+        }
+    }
+
+    public void setCurrentAvgScoreAfter(BigDecimal currentAvgScoreAfter) {
+        this.currentAvgScoreAfter = currentAvgScoreAfter;
+    }
+
+    public String getCurrentNotPassRateAfter() {
+        if (Objects.nonNull(currentNotPassRateAfter)) {
+            return new BigDecimal(currentNotPassRateAfter).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + currentNotPassCountAfter + ")";
+        } else {
+            return currentNotPassRateAfter;
+        }
+    }
+
+    public void setCurrentNotPassRateAfter(String currentNotPassRateAfter) {
+        this.currentNotPassRateAfter = currentNotPassRateAfter;
+    }
+
+    public Integer getNotPassCountBefore() {
+        return notPassCountBefore;
+    }
+
+    public void setNotPassCountBefore(Integer notPassCountBefore) {
+        this.notPassCountBefore = notPassCountBefore;
+    }
+
+    public Integer getCurrentNotPassCountBefore() {
+        return currentNotPassCountBefore;
+    }
+
+    public void setCurrentNotPassCountBefore(Integer currentNotPassCountBefore) {
+        this.currentNotPassCountBefore = currentNotPassCountBefore;
+    }
+
+    public Integer getNotPassCountAfter() {
+        return notPassCountAfter;
+    }
+
+    public void setNotPassCountAfter(Integer notPassCountAfter) {
+        this.notPassCountAfter = notPassCountAfter;
+    }
+
+    public Integer getCurrentNotPassCountAfter() {
+        return currentNotPassCountAfter;
+    }
+
+    public void setCurrentNotPassCountAfter(Integer currentNotPassCountAfter) {
+        this.currentNotPassCountAfter = currentNotPassCountAfter;
+    }
+}

+ 44 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/result/TAExamCourseResult.java

@@ -44,12 +44,56 @@ public class TAExamCourseResult extends TAExamCourse implements Serializable {
     @ApiModelProperty(value = "应届不及格率-赋分后")
     private BigDecimal currentNotPassRateAfter;
 
+    @ApiModelProperty(value = "不通过人数(赋分前)")
+    private Integer notPassCountBefore;
+
+    @ApiModelProperty(value = "应届不通过人数(赋分前)")
+    private Integer currentNotPassCountBefore;
+
+    @ApiModelProperty(value = "不通过人数(赋分后)")
+    private Integer notPassCountAfter;
+
+    @ApiModelProperty(value = "应届不通过人数(赋分后)")
+    private Integer currentNotPassCountAfter;
+
     @ApiModelProperty(value = "发布状态(UN_COMPUTE:未计算、UN_PUBLISH:未发布、PUBLISH:已发布)")
     private PublishStatusEnum status;
 
     @ApiModelProperty(value = "发布状态(UN_COMPUTE:未计算、UN_PUBLISH:未发布、PUBLISH:已发布)")
     private String publishStatus;
 
+    public Integer getNotPassCountBefore() {
+        return notPassCountBefore;
+    }
+
+    public void setNotPassCountBefore(Integer notPassCountBefore) {
+        this.notPassCountBefore = notPassCountBefore;
+    }
+
+    public Integer getCurrentNotPassCountBefore() {
+        return currentNotPassCountBefore;
+    }
+
+    public void setCurrentNotPassCountBefore(Integer currentNotPassCountBefore) {
+        this.currentNotPassCountBefore = currentNotPassCountBefore;
+    }
+
+    public Integer getNotPassCountAfter() {
+        return notPassCountAfter;
+    }
+
+    public void setNotPassCountAfter(Integer notPassCountAfter) {
+        this.notPassCountAfter = notPassCountAfter;
+    }
+
+    public Integer getCurrentNotPassCountAfter() {
+        return currentNotPassCountAfter;
+    }
+
+    public void setCurrentNotPassCountAfter(Integer currentNotPassCountAfter) {
+        this.currentNotPassCountAfter = currentNotPassCountAfter;
+    }
+
     public PublishStatusEnum getStatus() {
         return status;
     }

+ 223 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/entity/TBExamination.java

@@ -0,0 +1,223 @@
+package com.qmth.teachcloud.report.business.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 考务数据基础表
+ * </p>
+ *
+ * @author wangliang
+ * @since 2021-06-22
+ */
+@ApiModel(value = "TBExamination对象", description = "考务数据基础表")
+public class TBExamination implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "主键")
+    @JsonSerialize(using = ToStringSerializer.class)
+    @TableId(value = "id")
+    private Long id;
+
+    @ApiModelProperty(value = "学校id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    @TableField(value = "school_id")
+    private Long schoolId;
+
+    @ApiModelProperty(value = "考试id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    @TableField(value = "exam_id")
+    private Long examId;
+
+    @ApiModelProperty(value = "教务课头号")
+    @TableField(value = "course_header_code")
+    private String courseHeaderCode;
+
+    @ApiModelProperty(value = "教务课程号")
+    @TableField(value = "examination_course_code")
+    private String examinationCourseCode;
+
+    @ApiModelProperty(value = "课程名称")
+    @TableField(value = "course_name")
+    private String courseName;
+
+    @ApiModelProperty(value = "教师编号")
+    @TableField(value = "teacher_code")
+    private String teacherCode;
+
+    @ApiModelProperty(value = "教师名称")
+    @TableField(value = "teacher_name")
+    private String teacherName;
+
+    @ApiModelProperty(value = "开课学院名称")
+    @TableField(value = "teach_college_name")
+    private String teachCollegeName;
+
+    @ApiModelProperty(value = "学分")
+    @TableField(value = "credit")
+    private String credit;
+
+    @ApiModelProperty(value = "学号")
+    @TableField(value = "student_code")
+    private String studentCode;
+
+    @ApiModelProperty(value = "学生名称")
+    @TableField(value = "student_name")
+    private String studentName;
+
+    @ApiModelProperty(value = "考察学院名称")
+    @TableField(value = "inspect_college_name")
+    private String inspectCollegeName;
+
+    @ApiModelProperty(value = "专业")
+    @TableField(value = "major")
+    private String major;
+
+    @ApiModelProperty(value = "学习类型(应届、本届)")
+    @TableField(value = "study_type")
+    private String studyType;
+
+    @ApiModelProperty(value = "年级")
+    @TableField(value = "grade")
+    private String grade;
+
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getSchoolId() {
+        return schoolId;
+    }
+
+    public void setSchoolId(Long schoolId) {
+        this.schoolId = schoolId;
+    }
+
+    public Long getExamId() {
+        return examId;
+    }
+
+    public void setExamId(Long examId) {
+        this.examId = examId;
+    }
+
+    public String getCourseHeaderCode() {
+        return courseHeaderCode;
+    }
+
+    public void setCourseHeaderCode(String courseHeaderCode) {
+        this.courseHeaderCode = courseHeaderCode;
+    }
+
+    public String getExaminationCourseCode() {
+        return examinationCourseCode;
+    }
+
+    public void setExaminationCourseCode(String examinationCourseCode) {
+        this.examinationCourseCode = examinationCourseCode;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public String getTeacherCode() {
+        return teacherCode;
+    }
+
+    public void setTeacherCode(String teacherCode) {
+        this.teacherCode = teacherCode;
+    }
+
+    public String getTeacherName() {
+        return teacherName;
+    }
+
+    public void setTeacherName(String teacherName) {
+        this.teacherName = teacherName;
+    }
+
+    public String getTeachCollegeName() {
+        return teachCollegeName;
+    }
+
+    public void setTeachCollegeName(String teachCollegeName) {
+        this.teachCollegeName = teachCollegeName;
+    }
+
+    public String getCredit() {
+        return credit;
+    }
+
+    public void setCredit(String credit) {
+        this.credit = credit;
+    }
+
+    public String getStudentCode() {
+        return studentCode;
+    }
+
+    public void setStudentCode(String studentCode) {
+        this.studentCode = studentCode;
+    }
+
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
+    public String getInspectCollegeName() {
+        return inspectCollegeName;
+    }
+
+    public void setInspectCollegeName(String inspectCollegeName) {
+        this.inspectCollegeName = inspectCollegeName;
+    }
+
+    public String getMajor() {
+        return major;
+    }
+
+    public void setMajor(String major) {
+        this.major = major;
+    }
+
+    public String getStudyType() {
+        return studyType;
+    }
+
+    public void setStudyType(String studyType) {
+        this.studyType = studyType;
+    }
+
+    public String getGrade() {
+        return grade;
+    }
+
+    public void setGrade(String grade) {
+        this.grade = grade;
+    }
+}

+ 1 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TBExamStudentMapper.java

@@ -79,7 +79,7 @@ public interface TBExamStudentMapper extends BaseMapper<TBExamStudent> {
      */
     IPage<TeachCollegeResult> listTeachCollegeResult(@Param("page") Page<TeachCollegeResult> page, @Param("schoolId") Long schoolId, @Param("semester") String semester, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("current") Boolean current, @Param("inspectCollegeId") Long inspectCollegeId, @Param("teachCollegeId") Long teachCollegeId, @Param("teacherId") Long teacherId, @Param("studentParam") String studentParam, @Param("collegeIds") List<Long> collegeIds, @Param("column") String column, @Param("order") String order);
 
-    List<TeachCollegeResult> listTeachCollegeResult(@Param("schoolId") Long schoolId, @Param("semester") String semester, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("current") Boolean current, @Param("inspectCollegeId") Long inspectCollegeId, @Param("teacherId") Long teacherId, @Param("studentParam") String studentParam, @Param("column") String column, @Param("order") String order);
+    List<TeachCollegeResult> listTeachCollegeResult(@Param("schoolId") Long schoolId, @Param("semester") String semester, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("current") Boolean current, @Param("inspectCollegeId") Long inspectCollegeId, @Param("teacherId") Long teacherId, @Param("studentParam") String studentParam, @Param("collegeIds") List<Long> collegeIds, @Param("column") String column, @Param("order") String order);
 
     /**
      * 考查成绩查询

+ 16 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TBExaminationMapper.java

@@ -0,0 +1,16 @@
+package com.qmth.teachcloud.report.business.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.qmth.teachcloud.report.business.entity.TBExamination;
+
+/**
+ * <p>
+ * 考务数据基础表 Mapper 接口
+ * </p>
+ *
+ * @author wangliang
+ * @since 2021-06-22
+ */
+public interface TBExaminationMapper extends BaseMapper<TBExamination> {
+
+}

+ 16 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBExaminationService.java

@@ -0,0 +1,16 @@
+package com.qmth.teachcloud.report.business.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.qmth.teachcloud.report.business.entity.TBExamination;
+
+/**
+ * <p>
+ * 考务数据基础表 服务类
+ * </p>
+ *
+ * @author wangliang
+ * @since 2021-06-22
+ */
+public interface TBExaminationService extends IService<TBExamination> {
+
+}

+ 9 - 2
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamStudentServiceImpl.java

@@ -224,7 +224,14 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
     @Override
     public void exportTeachCollegeResult(String semester, Long examId, String courseCode, Boolean current, Long inspectCollegeId, Long teacherId, String studentParam, HttpServletResponse response, String column, OrderEnum order) throws Exception {
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        List<TeachCollegeResult> list = tbExamStudentMapper.listTeachCollegeResult(schoolId, semester, examId, courseCode, current, inspectCollegeId, teacherId, studentParam, column, Objects.nonNull(order) ? order.name() : null);
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        List<Long> collegeIds = sysOrgService.findCollegeIds(sysUser.getOrgId());
+        List<TeachCollegeResult> list = null;
+        if (Objects.nonNull(collegeIds) && collegeIds.size() > 0) {
+            list = tbExamStudentMapper.listTeachCollegeResult(schoolId, semester, examId, courseCode, current, inspectCollegeId, teacherId, studentParam, collegeIds, column, Objects.nonNull(order) ? order.name() : null);
+        } else {
+            list = tbExamStudentMapper.listTeachCollegeResult(schoolId, semester, examId, courseCode, current, inspectCollegeId, teacherId, studentParam, Objects.nonNull(sysUser.getOrgId()) ? Arrays.asList(sysUser.getOrgId()) : null, column, Objects.nonNull(order) ? order.name() : null);
+        }
         ExcelUtil.excelExport("开课成绩查询", TeachCollegeResult.class, list, response);
     }
 
@@ -250,7 +257,7 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
     public void exportInspectCollegeResult(String semester, Long examId, String courseCode, Boolean current, Long teachCollegeId, Long teacherId, String studentParam, HttpServletResponse response, String column, OrderEnum order) throws Exception {
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         List<InspectCollegeResult> list = tbExamStudentMapper.listInspectCollegeResult(schoolId, semester, examId, courseCode, current, teachCollegeId, teacherId, studentParam, column, Objects.nonNull(order) ? order.name() : null);
-        ExcelUtil.excelExport("开课成绩查询", TeachCollegeResult.class, list, response);
+        ExcelUtil.excelExport("开课成绩查询", InspectCollegeResult.class, list, response);
     }
 
     /**

+ 20 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExaminationServiceImpl.java

@@ -0,0 +1,20 @@
+package com.qmth.teachcloud.report.business.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.qmth.teachcloud.report.business.entity.TBExamination;
+import com.qmth.teachcloud.report.business.mapper.TBExaminationMapper;
+import com.qmth.teachcloud.report.business.service.TBExaminationService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 考务数据基础表 服务实现类
+ * </p>
+ *
+ * @author wangliang
+ * @since 2021-06-22
+ */
+@Service
+public class TBExaminationServiceImpl extends ServiceImpl<TBExaminationMapper, TBExamination> implements TBExaminationService {
+
+}

+ 5 - 1
teachcloud-report-business/src/main/resources/mapper/TAExamCourseMapper.xml

@@ -26,7 +26,11 @@
             (1 - taec.pass_rate) as notPassRateAfter,
             taec.current_avg_score as currentAvgScoreAfter,
             (1 - taec.current_pass_rate) as currentNotPassRateAfter,
-            taec.coefficient
+            taec.coefficient,
+            (taec.reality_count - taec.pass_count) as notPassCountBefore,
+            (taec.current_reality_count - taec.current_pass_count) as currentNotPassCountBefore,
+            (taec.current_reality_count - taec.current_pass_count) as notPassCountAfter,
+            (taec.current_reality_count - taec.current_pass_count) as currentNotPassCountAfter
     </sql>
 
     <sql id="commonCondition">

+ 2 - 1
teachcloud-report-business/src/main/resources/mapper/TAExamTotalMapper.xml

@@ -51,7 +51,8 @@
         round(a.paper_current_avg_score,1) as paperCurrentAvgScore,
         round((1 - a.current_pass_rate) * 100,1) as currentNotPassRate,
         (a.reality_count - a.pass_count) as notPassCount,
-        (a.current_reality_count - a.current_pass_count) as currentNotPassCount
+        (a.current_reality_count - a.current_pass_count) as currentNotPassCount,
+        a.past_reality_count as pastRealityCount
         FROM
         t_a_exam_course a
         LEFT JOIN

+ 5 - 0
teachcloud-report-business/src/main/resources/mapper/TBExaminationMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.qmth.teachcloud.report.business.mapper.TBExaminationMapper">
+
+</mapper>

+ 23 - 3
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/CourseController.java

@@ -1,16 +1,19 @@
 package com.qmth.teachcloud.report.api;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.google.common.reflect.TypeToken;
+import com.google.gson.Gson;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.enums.TaskTypeEnum;
 import com.qmth.teachcloud.common.service.TBTaskService;
-import com.qmth.teachcloud.common.util.Result;
-import com.qmth.teachcloud.common.util.ResultUtil;
-import com.qmth.teachcloud.common.util.ServletUtil;
+import com.qmth.teachcloud.common.util.*;
+import com.qmth.teachcloud.report.business.bean.dto.excel.TAExamCourseDto;
+import com.qmth.teachcloud.report.business.bean.dto.excel.TAExamCourseExportDto;
 import com.qmth.teachcloud.report.business.bean.result.*;
 import com.qmth.teachcloud.report.business.bean.result.inspectCourseExamTotal.InspectCourseTotalReportResult;
 import com.qmth.teachcloud.report.business.entity.TBExamCourse;
@@ -27,6 +30,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
@@ -68,6 +72,22 @@ public class CourseController {
         return ResultUtil.ok(taExamCourseService.surveyTeacherList(new Page<>(pageNumber, pageSize), SystemConstant.convertIdToLong(examId), semester, Objects.isNull(schoolId) ? SystemConstant.convertIdToLong(String.valueOf(ServletUtil.getRequestHeaderSchoolId())) : SystemConstant.convertIdToLong(schoolId), column, order));
     }
 
+    @ApiOperation(value = "开课课程考试总览列表导出接口")
+    @RequestMapping(value = "/survey_teacher/export", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "考试科目信息", response = TAExamCourseResult.class)})
+    public void export(@ApiParam(value = "考试id", required = true) @RequestParam String examId,
+                       @ApiParam(value = "学期", required = true) @RequestParam SemesterEnum semester,
+                       @ApiParam(value = "学校id", required = false) @RequestParam(required = false) String schoolId,
+                       @ApiParam(value = "排序列", required = false) @RequestParam(required = false) String column,
+                       @ApiParam(value = "排序规则", required = false) @RequestParam(required = false) OrderEnum order,
+                       HttpServletResponse response) throws Exception {
+        IPage<TAExamCourseResult> taExamCourseResultIPage = taExamCourseService.surveyTeacherList(new Page<>(SystemConstant.PAGE_NUMBER, SystemConstant.PAGE_SIZE), SystemConstant.convertIdToLong(examId), semester, Objects.isNull(schoolId) ? SystemConstant.convertIdToLong(String.valueOf(ServletUtil.getRequestHeaderSchoolId())) : SystemConstant.convertIdToLong(schoolId), column, order);
+        Gson gson = new Gson();
+        List<TAExamCourseExportDto> taExamCourseExportDtoList = gson.fromJson(JacksonUtil.parseJson(taExamCourseResultIPage.getRecords()), new TypeToken<List<TAExamCourseExportDto>>() {
+        }.getType());
+        ExcelUtil.excelExport("开课课程考试总览", TAExamCourseExportDto.class, taExamCourseExportDtoList, response);
+    }
+
     @ApiOperation(value = "开课课程考试总览-教师各课堂成绩排名接口")
     @RequestMapping(value = "/survey_teacher/teacher_view", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "考试科目信息", response = TAExamCourseCollegeTeacherResult.class)})

+ 19 - 0
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/TBExaminationController.java

@@ -0,0 +1,19 @@
+package com.qmth.teachcloud.report.api;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 考务数据基础表 前端控制器
+ * </p>
+ *
+ * @author wangliang
+ * @since 2021-06-22
+ */
+@RestController
+@RequestMapping("/t-bexamination")
+public class TBExaminationController {
+
+}