caozixuan 4 lat temu
rodzic
commit
787e817d62

+ 12 - 11
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/result/SurveyTeacherViewResult.java

@@ -23,25 +23,18 @@ public class SurveyTeacherViewResult implements Serializable {
     @ApiModelProperty(value = "分数分布")
     private SurveyTeacherExamCourseResult surveyTeacher;
 
-//    @ApiModelProperty(value = "开课学院考试概况")
-//    private TeachCourseSurveyResult teachCourseSurveyResult;
+    @ApiModelProperty(value = "开课学院考试概况")
+    private TeachCourseSurveyResult teachCourseSurveyResult;
 
     public SurveyTeacherViewResult() {
 
     }
-//
-//    public SurveyTeacherViewResult(List<SurveyTeacherGradeDistributionResult> gradeDistribution, QuestionListResult questionInfo, SurveyTeacherExamCourseResult surveyTeacher, TeachCourseSurveyResult teachCourseSurveyResult) {
-//        this.gradeDistribution = gradeDistribution;
-//        this.questionInfo = questionInfo;
-//        this.surveyTeacher = surveyTeacher;
-//        this.teachCourseSurveyResult = teachCourseSurveyResult;
-//    }
 
-
-    public SurveyTeacherViewResult(List<SurveyTeacherGradeDistributionResult> gradeDistribution, QuestionListResult questionInfo, SurveyTeacherExamCourseResult surveyTeacher) {
+    public SurveyTeacherViewResult(List<SurveyTeacherGradeDistributionResult> gradeDistribution, QuestionListResult questionInfo, SurveyTeacherExamCourseResult surveyTeacher, TeachCourseSurveyResult teachCourseSurveyResult) {
         this.gradeDistribution = gradeDistribution;
         this.questionInfo = questionInfo;
         this.surveyTeacher = surveyTeacher;
+        this.teachCourseSurveyResult = teachCourseSurveyResult;
     }
 
     public List<SurveyTeacherGradeDistributionResult> getGradeDistribution() {
@@ -67,4 +60,12 @@ public class SurveyTeacherViewResult implements Serializable {
     public void setSurveyTeacher(SurveyTeacherExamCourseResult surveyTeacher) {
         this.surveyTeacher = surveyTeacher;
     }
+
+    public TeachCourseSurveyResult getTeachCourseSurveyResult() {
+        return teachCourseSurveyResult;
+    }
+
+    public void setTeachCourseSurveyResult(TeachCourseSurveyResult teachCourseSurveyResult) {
+        this.teachCourseSurveyResult = teachCourseSurveyResult;
+    }
 }

+ 85 - 6
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/result/TeachCourseSurveyResult.java

@@ -22,14 +22,14 @@ public class TeachCourseSurveyResult {
     @ApiModelProperty(value = "满分")
     private BigDecimal fullScore;
 
-    @ApiModelProperty(value = "全校应届实考")
-    private int schCurrentRealityCount;
+    @ApiModelProperty(value = "有效实考人数")
+    private int realityCount;
 
-    @ApiModelProperty(value = "本院应届实考")
-    private int colCurrentRealityCount;
+    @ApiModelProperty(value = "考察学院数量")
+    private int inspectCollegeCount;
 
-    @ApiModelProperty(value = "本院应届缺考")
-    private int colCurrentAbsentCount;
+    @ApiModelProperty(value = "缺考人数")
+    private int absentCount;
 
     @ApiModelProperty(value = "赋分系数")
     private BigDecimal coefficient;
@@ -40,4 +40,83 @@ public class TeachCourseSurveyResult {
     @ApiModelProperty(value = "考察学院集合")
     private String inspectCollegeNames;
 
+    public String getExamTime() {
+        return examTime;
+    }
+
+    public void setExamTime(String examTime) {
+        this.examTime = examTime;
+    }
+
+    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 BigDecimal getFullScore() {
+        return fullScore;
+    }
+
+    public void setFullScore(BigDecimal fullScore) {
+        this.fullScore = fullScore;
+    }
+
+    public int getRealityCount() {
+        return realityCount;
+    }
+
+    public void setRealityCount(int realityCount) {
+        this.realityCount = realityCount;
+    }
+
+    public int getInspectCollegeCount() {
+        return inspectCollegeCount;
+    }
+
+    public void setInspectCollegeCount(int inspectCollegeCount) {
+        this.inspectCollegeCount = inspectCollegeCount;
+    }
+
+    public int getAbsentCount() {
+        return absentCount;
+    }
+
+    public void setAbsentCount(int absentCount) {
+        this.absentCount = absentCount;
+    }
+
+    public BigDecimal getCoefficient() {
+        return coefficient;
+    }
+
+    public void setCoefficient(BigDecimal coefficient) {
+        this.coefficient = coefficient;
+    }
+
+    public String getTeachCollegeName() {
+        return teachCollegeName;
+    }
+
+    public void setTeachCollegeName(String teachCollegeName) {
+        this.teachCollegeName = teachCollegeName;
+    }
+
+    public String getInspectCollegeNames() {
+        return inspectCollegeNames;
+    }
+
+    public void setInspectCollegeNames(String inspectCollegeNames) {
+        this.inspectCollegeNames = inspectCollegeNames;
+    }
 }

+ 0 - 9
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TAExamCourseService.java

@@ -118,13 +118,4 @@ public interface TAExamCourseService extends IService<TAExamCourse> {
      * @return 结果
      */
     TrialCalculationResult trialCalculate(Long examId, String courseCode, BigDecimal coefficient);
-
-//    /**
-//     * 开课课程考试概况查询
-//     * @param semester 学期
-//     * @param examId 考试id
-//     * @param courseCode 课程编号
-//     * @return 结果
-//     */
-//    TeachCourseSurveyResult getTeachCourseSurveyInfo(SemesterEnum semester, Long examId, String courseCode);
 }

+ 34 - 6
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TAExamCourseServiceImpl.java

@@ -10,6 +10,7 @@ import com.qmth.teachcloud.common.util.ServletUtil;
 import com.qmth.teachcloud.report.business.bean.result.*;
 import com.qmth.teachcloud.report.business.entity.TAExamCourse;
 import com.qmth.teachcloud.report.business.entity.TAExamCourseRecord;
+import com.qmth.teachcloud.report.business.entity.TBExam;
 import com.qmth.teachcloud.report.business.entity.TBPaper;
 import com.qmth.teachcloud.report.business.enums.PublishStatusEnum;
 import com.qmth.teachcloud.report.business.enums.SemesterEnum;
@@ -17,6 +18,7 @@ import com.qmth.teachcloud.report.business.mapper.TAExamCourseMapper;
 import com.qmth.teachcloud.report.business.mapper.TAExamCourseRecordMapper;
 import com.qmth.teachcloud.report.business.service.ReportCommonService;
 import com.qmth.teachcloud.report.business.service.TAExamCourseService;
+import com.qmth.teachcloud.report.business.service.TBExamService;
 import com.qmth.teachcloud.report.business.service.TBPaperService;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
@@ -52,6 +54,9 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
     @Resource
     TAExamCourseService taExamCourseService;
 
+    @Resource
+    TBExamService tbExamService;
+
     /**
      * 开课课程考试总览列表接口
      *
@@ -164,6 +169,9 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
         if (Objects.isNull(sysUser)) {
             throw ExceptionResultEnum.NOT_LOGIN.exception();
         }
+        // 考试概况
+        TeachCourseSurveyResult teachCourseSurveyResult = this.getTeachCourseSurveyInfo(semester, examId, courseCode);
+
         //取总体和应届平均分
         SurveyTeacherExamCourseResult surveyTeacherExamCourseResult = reportCommonService.findAvgScore(schoolId, courseCode, examId);
 
@@ -171,7 +179,7 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
         List<SurveyTeacherGradeDistributionResult> surveyTeacherGradeDistributionResultList = reportCommonService.surveyTeacherDistribution(examId, courseCode, sysUser.getOrgId());
         //查找题目信息
         QuestionListResult questionListResult = reportCommonService.findQuestionInfo(examId, courseCode, sysUser.getOrgId());
-        return new SurveyTeacherViewResult(surveyTeacherGradeDistributionResultList, questionListResult, surveyTeacherExamCourseResult);
+        return new SurveyTeacherViewResult(surveyTeacherGradeDistributionResultList, questionListResult, surveyTeacherExamCourseResult,teachCourseSurveyResult);
     }
 
     /**
@@ -307,9 +315,29 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
         return trialCalculationResult;
     }
 
-//    @Override
-//    public TeachCourseSurveyResult getTeachCourseSurveyInfo(SemesterEnum semester, Long examId, String courseCode) {
-//        Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-//        return taExamCourseMapper.getOverview(schoolId, Objects.nonNull(semester) ? semester.name() : null, examId, courseCode);
-//    }
+
+    /**
+     * 获取开课课程考试课程总览
+     * @param semester 学期
+     * @param examId 考试id
+     * @param courseCode 课程编号
+     * @return 结果
+     */
+    private TeachCourseSurveyResult getTeachCourseSurveyInfo(SemesterEnum semester, Long examId, String courseCode) {
+        TBExam tbExam = tbExamService.getById(examId);
+
+        TAExamCourse taExamCourse = this.getOne(new QueryWrapper<TAExamCourse>().lambda().eq(TAExamCourse::getExamId,examId).eq(TAExamCourse::getCourseCode,courseCode));
+        TeachCourseSurveyResult teachCourseSurveyResult = new TeachCourseSurveyResult();
+        teachCourseSurveyResult.setExamTime(tbExam.getExamTime());
+        teachCourseSurveyResult.setCourseCode(taExamCourse.getCourseCode());
+        teachCourseSurveyResult.setCourseName(taExamCourse.getCourseName());
+        teachCourseSurveyResult.setFullScore(taExamCourse.getTotalScore());
+        teachCourseSurveyResult.setRealityCount(taExamCourse.getRealityCount());
+        teachCourseSurveyResult.setInspectCollegeCount(taExamCourse.getInspectCollegeCount());
+        teachCourseSurveyResult.setAbsentCount(taExamCourse.getAbsentCount());
+        teachCourseSurveyResult.setCoefficient(taExamCourse.getCoefficient());
+        teachCourseSurveyResult.setTeachCollegeName(taExamCourse.getTeachCollegeName());
+        teachCourseSurveyResult.setInspectCollegeNames(taExamCourse.getInspectCollegeNames());
+        return teachCourseSurveyResult;
+    }
 }