瀏覽代碼

Merge remote-tracking branch 'origin/dev_v2.1.0' into dev_v2.1.0

wangliang 4 年之前
父節點
當前提交
9491cfed33

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

@@ -23,9 +23,20 @@ public class SurveyTeacherViewResult implements Serializable {
     @ApiModelProperty(value = "分数分布")
     private SurveyTeacherExamCourseResult surveyTeacher;
 
+//    @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) {
         this.gradeDistribution = gradeDistribution;

+ 43 - 0
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/bean/result/TeachCourseSurveyResult.java

@@ -0,0 +1,43 @@
+package com.qmth.teachcloud.report.business.bean.result;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+/**
+ * @Description: 开课课程考试总览 - 图表查询接口
+ * @Author: CaoZixuan
+ * @Date: 2021-06-19
+ */
+public class TeachCourseSurveyResult {
+    @ApiModelProperty(value = "考试时间")
+    private String examTime;
+
+    @ApiModelProperty(value = "课程名称")
+    private String courseName;
+
+    @ApiModelProperty(value = "课程代码")
+    private String courseCode;
+
+    @ApiModelProperty(value = "满分")
+    private BigDecimal fullScore;
+
+    @ApiModelProperty(value = "全校应届实考")
+    private int schCurrentRealityCount;
+
+    @ApiModelProperty(value = "本院应届实考")
+    private int colCurrentRealityCount;
+
+    @ApiModelProperty(value = "本院应届缺考")
+    private int colCurrentAbsentCount;
+
+    @ApiModelProperty(value = "赋分系数")
+    private BigDecimal coefficient;
+
+    @ApiModelProperty(value = "开课学院名称")
+    private String teachCollegeName;
+
+    @ApiModelProperty(value = "考察学院集合")
+    private String inspectCollegeNames;
+
+}

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

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.qmth.teachcloud.report.business.bean.result.ExamCourseResult;
 import com.qmth.teachcloud.report.business.bean.result.TAExamCourseCollegeTeacherResult;
 import com.qmth.teachcloud.report.business.bean.result.TAExamCourseResult;
+import com.qmth.teachcloud.report.business.bean.result.TeachCourseSurveyResult;
 import com.qmth.teachcloud.report.business.entity.TAExamCourse;
 import com.qmth.teachcloud.report.business.enums.SemesterEnum;
 import org.apache.ibatis.annotations.Param;
@@ -30,7 +31,7 @@ public interface TAExamCourseMapper extends BaseMapper<TAExamCourse> {
      * @param schoolId
      * @return
      */
-    IPage<TAExamCourseResult> surveyTeacherList(IPage<Map> iPage, @Param("examId") Long examId, @Param("semester") String semester, @Param("schoolId") Long schoolId);
+    IPage<TAExamCourseResult> surveyTeacherList(IPage<Map> iPage, @Param("examId") Long examId, @Param("semester") String semester, @Param("schoolId") Long schoolId,@Param("collegeId") Long collegeId);
 
 
     ExamCourseResult getOverview(@Param("schoolId") Long schoolId, @Param("semester") String semester, @Param("examId") Long examId, @Param("courseCode") String courseCode);
@@ -63,4 +64,6 @@ public interface TAExamCourseMapper extends BaseMapper<TAExamCourse> {
      * @return
      */
     IPage<TAExamCourseCollegeTeacherResult> surveyTeacherTeacherView(IPage<Map> iPage, @Param("schoolId") Long schoolId, @Param("semester") String semester, @Param("examId") Long examId, @Param("courseCode") String courseCode);
+
+    TeachCourseSurveyResult getTeachCourseSurveyInfo(@Param("schoolId") Long schoolId, @Param("semester") String semester, @Param("examId") Long examId, @Param("courseCode") String courseCode);
 }

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

@@ -118,4 +118,13 @@ 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);
 }

+ 3 - 3
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/ReportCommonServiceImpl.java

@@ -310,9 +310,9 @@ public class ReportCommonServiceImpl implements ReportCommonService {
         } else {
             dimensionInfoDatasource = tbDimensionService.findDimensionByTeacherInfo(examId, courseCode, teacherId);
         }
-        if (dimensionInfoDatasource.size() < 1) {
-            throw ExceptionResultEnum.DATA_ERROR.exception();
-        }
+//        if (dimensionInfoDatasource.size() < 1) {
+//            throw ExceptionResultEnum.DATA_ERROR.exception();
+//        }
         List<ModuleDimensionResult> dimensionAnalyzeList = new ArrayList<>();
         Set<String> moduleSet = dimensionInfoDatasource.stream().map(e -> e.getModule()).collect(Collectors.toSet()); // 考查模块集合
         for (String module : moduleSet) {

+ 15 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TAExamCourseServiceImpl.java

@@ -49,6 +49,9 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
     @Resource
     TBPaperService tbPaperService;
 
+    @Resource
+    TAExamCourseService taExamCourseService;
+
     /**
      * 开课课程考试总览列表接口
      *
@@ -60,7 +63,9 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
      */
     @Override
     public IPage<TAExamCourseResult> surveyTeacherList(IPage<Map> iPage, Long examId, SemesterEnum semester, Long schoolId) {
-        return taExamCourseMapper.surveyTeacherList(iPage, examId, Objects.nonNull(semester) ? semester.name() : null, schoolId);
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        Long collegeId = sysUser.getOrgId();
+        return taExamCourseMapper.surveyTeacherList(iPage, examId, Objects.nonNull(semester) ? semester.name() : null, schoolId,collegeId);
     }
 
 
@@ -159,6 +164,9 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
         if (Objects.isNull(sysUser)) {
             throw ExceptionResultEnum.NOT_LOGIN.exception();
         }
+        // 开课课程考试概况
+        ExamCourseResult examCourseResult = taExamCourseService.getOverview(semester,examId,courseCode);
+
         //取总体和应届平均分
         SurveyTeacherExamCourseResult surveyTeacherExamCourseResult = reportCommonService.findAvgScore(schoolId, courseCode, examId);
 
@@ -301,4 +309,10 @@ 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);
+//    }
 }

+ 21 - 0
teachcloud-report-business/src/main/resources/mapper/TAExamCourseMapper.xml

@@ -52,6 +52,9 @@
             <if test="semester != null and semester != ''">
                 and tbe.semester = #{semester}
             </if>
+            <if test="collegeId != null and collegeId != ''">
+                and taec.teach_college_id = #{collegeId}
+            </if>
         </where>
     </select>
 
@@ -152,4 +155,22 @@
         </where>
         order by taecct.inspect_college_name
     </select>
+<!--    <select id="getTeachCourseSurveyInfo"-->
+<!--            resultType="com.qmth.teachcloud.report.business.bean.result.TeachCourseSurveyResult">-->
+
+<!--        <where>-->
+<!--            <if test="schoolId != null">-->
+<!--                and b.school_id = #{schoolId}-->
+<!--            </if>-->
+<!--            <if test="semester != null and semester != ''">-->
+<!--                and b.semester = #{semester}-->
+<!--            </if>-->
+<!--            <if test="examId != null">-->
+<!--                and a.exam_id = #{examId}-->
+<!--            </if>-->
+<!--            <if test="courseCode != null and courseCode != ''">-->
+<!--                and a.course_code = #{courseCode}-->
+<!--            </if>-->
+<!--        </where>-->
+<!--    </select>-->
 </mapper>