Răsfoiți Sursa

日常更新

wangliang 4 ani în urmă
părinte
comite
e7a80d762d

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

@@ -18,11 +18,20 @@ import java.util.List;
 public interface TAExamCourseCollegeInspectMapper extends BaseMapper<TAExamCourseCollegeInspect> {
 
     /**
-     * 查找科目维度
+     * 查找学院科目维度
      *
      * @param examId
      * @param courseCode
      * @return
      */
     List<TAExamCourseCollegeInspectResult> findCourseDescriptiveStatisticsForCollege(@Param("examId") Long examId, @Param("courseCode") String courseCode);
+
+    /**
+     * 查找学校科目维度
+     *
+     * @param examId
+     * @param courseCode
+     * @return
+     */
+    List<TAExamCourseCollegeInspectResult> findCourseDescriptiveStatisticsForSchool(@Param("examId") Long examId, @Param("courseCode") String courseCode);
 }

+ 10 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TAExamCourseCollegeInspectService.java

@@ -17,11 +17,20 @@ import java.util.List;
 public interface TAExamCourseCollegeInspectService extends IService<TAExamCourseCollegeInspect> {
 
     /**
-     * 查找科目维度
+     * 查找学院科目维度
      *
      * @param examId
      * @param courseCode
      * @return
      */
     List<TAExamCourseCollegeInspectResult> findCourseDescriptiveStatisticsForCollege(Long examId, String courseCode);
+
+    /**
+     * 查找学校科目维度
+     *
+     * @param examId
+     * @param courseCode
+     * @return
+     */
+    List<TAExamCourseCollegeInspectResult> findCourseDescriptiveStatisticsForSchool(Long examId, String courseCode);
 }

+ 13 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TAExamCourseCollegeInspectServiceImpl.java

@@ -25,7 +25,7 @@ public class TAExamCourseCollegeInspectServiceImpl extends ServiceImpl<TAExamCou
     TAExamCourseCollegeInspectMapper taExamCourseCollegeInspectMapper;
 
     /**
-     * 查找科目维度
+     * 查找学院科目维度
      *
      * @param examId
      * @param courseCode
@@ -35,4 +35,16 @@ public class TAExamCourseCollegeInspectServiceImpl extends ServiceImpl<TAExamCou
     public List<TAExamCourseCollegeInspectResult> findCourseDescriptiveStatisticsForCollege(Long examId, String courseCode) {
         return taExamCourseCollegeInspectMapper.findCourseDescriptiveStatisticsForCollege(examId, courseCode);
     }
+
+    /**
+     * 查找学校科目维度
+     *
+     * @param examId
+     * @param courseCode
+     * @return
+     */
+    @Override
+    public List<TAExamCourseCollegeInspectResult> findCourseDescriptiveStatisticsForSchool(Long examId, String courseCode) {
+        return taExamCourseCollegeInspectMapper.findCourseDescriptiveStatisticsForSchool(examId, courseCode);
+    }
 }

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

@@ -13,7 +13,6 @@ import com.qmth.teachcloud.report.business.enums.SemesterEnum;
 import com.qmth.teachcloud.report.business.mapper.TAExamCourseMapper;
 import com.qmth.teachcloud.report.business.mapper.TAExamCourseRecordMapper;
 import com.qmth.teachcloud.report.business.service.*;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -150,8 +149,10 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
                 .eq(TBPaper::getCourseCode, courseCode);
         List<TBPaper> tbPaperList = tbPaperService.list(tbPaperQueryWrapper);
 
-        //查找科目学院维度
+        //查找学院科目维度
         List<TAExamCourseCollegeInspectResult> taExamCourseCollegeInspectResultList = taExamCourseCollegeInspectService.findCourseDescriptiveStatisticsForCollege(examId, courseCode);
+        //查找学校科目维度
+        List<TAExamCourseCollegeInspectResult> taExamCourseSchoolInspectResultList = taExamCourseCollegeInspectService.findCourseDescriptiveStatisticsForSchool(examId, courseCode);
 
         //查找维度
         List<CourseDimensionResult> courseDimensionResultList = tbDimensionService.findDimensionInfo(examId, courseCode, sysUser.getOrgId());

+ 28 - 0
teachcloud-report-business/src/main/resources/mapper/TAExamCourseCollegeInspectMapper.xml

@@ -33,4 +33,32 @@
             </if>
         </where>
     </select>
+
+    <select id="findCourseDescriptiveStatisticsForSchool" resultType="com.qmth.teachcloud.report.business.bean.result.TAExamCourseCollegeInspectResult">
+        SELECT
+            round(convert(current_min_score,decimal(10,4)),2) AS minScore,
+            round(convert(current_max_score,decimal(10,4)),2) AS maxScore,
+            round(convert(current_avg_score,decimal(10,4)),2) AS avgScore,
+            current_reality_count AS realityCount,
+            current_absent_count AS absentCount,
+            current_total_count AS totalCount,
+            round(convert(current_upper_quartile,decimal(10,4)),2) AS upperQuartile,
+            round(convert(current_median,decimal(10,4)),2) AS median,
+            round(convert(current_lower_quartile,decimal(10,4)),2) AS lowerQuartile,
+            current_mode,
+            round(convert(current_standard_deviation,decimal(10,4)),2) AS standardDeviation
+        FROM
+            t_a_exam_course taec
+        <where>
+            <if test="courseCode != null and courseCode != ''">
+                and taec.course_code = #{courseCode}
+            </if>
+            <if test="examId != null and examId != ''">
+                and taec.exam_id = #{examId}
+            </if>
+            <if test="schoolId != null and schoolId != ''">
+                and taec.school_id = #{schoolId}
+            </if>
+        </where>
+    </select>
 </mapper>