|
@@ -12,8 +12,8 @@
|
|
|
name_primary AS dimensionName,
|
|
|
interpretation,
|
|
|
total_count AS totalCount,
|
|
|
- round(CONVERT( papDio.score_rate * 100 , DECIMAL (10 , 4 )),2) AS schScoreRate,
|
|
|
- round(CONVERT( colDio.score_rate * 100 , DECIMAL (10 , 4 )),2) AS colScoreRate,
|
|
|
+ round(CONVERT( papDio.score_rate * 100 , DECIMAL (10 , 4 )),2) AS referenceScoreRate,
|
|
|
+ round(CONVERT( colDio.score_rate * 100 , DECIMAL (10 , 4 )),2) AS myScoreRate,
|
|
|
colDio.inspect_college_name AS collegeName,
|
|
|
round(colDio.score_rate, 1) as degree
|
|
|
FROM
|
|
@@ -69,8 +69,8 @@
|
|
|
name_primary AS dimensionName,
|
|
|
interpretation,
|
|
|
total_count AS totalCount,
|
|
|
- round(CONVERT( papDio.score_rate * 100 , DECIMAL (10 , 4 )),2) AS schScoreRate,
|
|
|
- round(CONVERT( colDio.score_rate * 100 , DECIMAL (10 , 4 )),2) AS colScoreRate,
|
|
|
+ round(CONVERT( papDio.score_rate * 100 , DECIMAL (10 , 4 )),2) AS referenceScoreRate,
|
|
|
+ round(CONVERT( colDio.score_rate * 100 , DECIMAL (10 , 4 )),2) AS myScoreRate,
|
|
|
colDio.teacher_name AS teacherName,
|
|
|
round(colDio.score_rate, 1) as degree
|
|
|
FROM
|
|
@@ -115,4 +115,78 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="findDimensionByTeacherCollegeInfo"
|
|
|
+ resultType="com.qmth.teachcloud.report.business.bean.result.CourseDimensionResult">
|
|
|
+ SELECT
|
|
|
+ tmp.exam_id AS examId,
|
|
|
+ (SELECT
|
|
|
+ tbe.exam_code
|
|
|
+ FROM
|
|
|
+ t_b_exam tbe
|
|
|
+ WHERE
|
|
|
+ tbe.id = tmp.exam_id) AS examCode,
|
|
|
+ tmp.course_code AS courseCode,
|
|
|
+ tmp.dimension_type AS module,
|
|
|
+ code_primary AS dimensionCode,
|
|
|
+ name_primary AS dimensionName,
|
|
|
+ interpretation,
|
|
|
+ total_count AS totalCount,
|
|
|
+ ROUND(CONVERT( colDio.score_rate * 100 , DECIMAL (10 , 4 )),
|
|
|
+ 2) AS referenceScoreRate,
|
|
|
+ ROUND(CONVERT( myDio.score_rate * 100 , DECIMAL (10 , 4 )),
|
|
|
+ 2) AS myScoreRate,
|
|
|
+ myDio.teacher_name AS teacherName,
|
|
|
+ ROUND(myDio.score_rate, 1) AS degree
|
|
|
+ FROM
|
|
|
+ (SELECT
|
|
|
+ exam_id,
|
|
|
+ course_code,
|
|
|
+ dimension_type,
|
|
|
+ code_primary,
|
|
|
+ name_primary,
|
|
|
+ interpretation
|
|
|
+ FROM
|
|
|
+ t_b_dimension
|
|
|
+ GROUP BY exam_id , course_code , dimension_type , code_primary , name_primary , interpretation) tmp
|
|
|
+ INNER JOIN
|
|
|
+ (SELECT
|
|
|
+ exam_id,
|
|
|
+ course_code,
|
|
|
+ dimension_type,
|
|
|
+ dimension_code,
|
|
|
+ AVG(score_rate) AS score_rate,
|
|
|
+ AVG(total_count) AS total_count
|
|
|
+ FROM
|
|
|
+ t_a_exam_course_dio
|
|
|
+ GROUP BY exam_id , course_code , dimension_type , dimension_code) papDio ON tmp.code_primary = papDio.dimension_code
|
|
|
+ AND tmp.dimension_type = papDio.dimension_type
|
|
|
+ AND tmp.exam_id = papDio.exam_id
|
|
|
+ AND tmp.course_code = papDio.course_code
|
|
|
+ INNER JOIN
|
|
|
+ t_a_exam_course_teacher_college_dio myDio ON tmp.code_primary = myDio.dimension_code
|
|
|
+ AND tmp.dimension_type = myDio.dimension_type
|
|
|
+ AND papDio.exam_id = myDio.exam_id
|
|
|
+ AND papDio.course_code = myDio.course_code
|
|
|
+ INNER JOIN
|
|
|
+ t_a_exam_course_college_inspect_dio colDio ON tmp.dimension_type = colDio.dimension_type
|
|
|
+ AND tmp.code_primary = colDio.dimension_code
|
|
|
+ AND colDio.exam_id = myDio.exam_id
|
|
|
+ AND colDio.course_code = myDio.course_code
|
|
|
+ AND colDio.inspect_college_id = myDio.inspect_college_id
|
|
|
+ <where>
|
|
|
+ <if test="examId != null and examId != ''">
|
|
|
+ and papDio.exam_id = #{examId}
|
|
|
+ </if>
|
|
|
+ <if test="courseCode != null and courseCode != ''">
|
|
|
+ and papDio.course_code = #{courseCode}
|
|
|
+ </if>
|
|
|
+ <if test="teacherId != null and teacherId > 0">
|
|
|
+ and myDio.teacher_id = #{teacherId}
|
|
|
+ </if>
|
|
|
+ <if test="inspectCollegeId != null and inspectCollegeId > 0">
|
|
|
+ and myDio.inspect_college_id = #{inspectCollegeId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|