|
@@ -265,9 +265,12 @@
|
|
|
avg(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) avgScore,
|
|
|
max(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) maxScore,
|
|
|
min(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) minScore,
|
|
|
- sum(case when s.objective_score+s.subjective_score >=t.pass_score then 1 else 0 end) passCount,
|
|
|
- sum(case when s.objective_score+s.subjective_score >=t.excellent_score then 1 else 0 end) excellentCount
|
|
|
- FROM mark_student s
|
|
|
+ sum(case when s.objective_score+s.subjective_score >=t.total_score * t.pass_score/100 then 1 else 0 end) passCount,
|
|
|
+ sum(case when s.objective_score+s.subjective_score >=t.total_score * t.excellent_score/100 then 1 else 0 end) excellentCount
|
|
|
+ FROM mark_student s
|
|
|
+ left join mark_paper t on s.exam_id = t.exam_id
|
|
|
+ and s.paper_number = t.paper_number
|
|
|
+ and s.paper_type = t.paper_type
|
|
|
WHERE
|
|
|
s.exam_id = #{examId} and s.paper_number = #{paperNumber}
|
|
|
</select>
|
|
@@ -288,11 +291,14 @@
|
|
|
avg(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) avgScore,
|
|
|
max(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) maxScore,
|
|
|
min(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) minScore,
|
|
|
- sum(case when s.objective_score+s.subjective_score >=t.pass_score then 1 else 0 end) passCount,
|
|
|
- sum(case when s.objective_score+s.subjective_score >=t.excellent_score then 1 else 0 end) excellentCount
|
|
|
+ sum(case when s.objective_score+s.subjective_score >=t.total_score * t.pass_score/100 then 1 else 0 end) passCount,
|
|
|
+ sum(case when s.objective_score+s.subjective_score >=t.total_score * t.excellent_score/100 then 1 else 0 end) excellentCount
|
|
|
FROM mark_student s
|
|
|
+ left join mark_paper t on s.exam_id = t.exam_id
|
|
|
+ and s.paper_number = t.paper_number
|
|
|
+ and s.paper_type = t.paper_type
|
|
|
WHERE
|
|
|
- s.exam_id = #{examId} and s.paper_number = #{paperNumber}
|
|
|
+ s.exam_id = #{examId} and s.paper_number = #{paperNumber} and s.college is not null
|
|
|
group by s.college
|
|
|
</select>
|
|
|
<select id="classData" resultType="com.qmth.teachcloud.mark.bean.archivescore.ClassVo">
|
|
@@ -303,11 +309,14 @@
|
|
|
avg(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) avgScore,
|
|
|
max(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) maxScore,
|
|
|
min(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) minScore,
|
|
|
- sum(case when s.objective_score+s.subjective_score >=t.pass_score then 1 else 0 end) passCount,
|
|
|
- sum(case when s.objective_score+s.subjective_score >=t.excellent_score then 1 else 0 end) excellentCount
|
|
|
+ sum(case when s.objective_score+s.subjective_score >=t.total_score * t.pass_score/100 then 1 else 0 end) passCount,
|
|
|
+ sum(case when s.objective_score+s.subjective_score >=t.total_score * t.excellent_score/100 then 1 else 0 end) excellentCount
|
|
|
FROM mark_student s
|
|
|
+ left join mark_paper t on s.exam_id = t.exam_id
|
|
|
+ and s.paper_number = t.paper_number
|
|
|
+ and s.paper_type = t.paper_type
|
|
|
WHERE
|
|
|
- s.exam_id = #{examId} and s.paper_number = #{paperNumber}
|
|
|
+ s.exam_id = #{examId} and s.paper_number = #{paperNumber} and s.class_name is not null
|
|
|
group by s.class_name
|
|
|
</select>
|
|
|
<select id="teacher" resultType="com.qmth.teachcloud.mark.bean.archivescore.TeacherVo">
|
|
@@ -318,11 +327,14 @@
|
|
|
avg(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) avgScore,
|
|
|
max(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) maxScore,
|
|
|
min(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) minScore,
|
|
|
- sum(case when s.objective_score+s.subjective_score >=t.pass_score then 1 else 0 end) passCount,
|
|
|
- sum(case when s.objective_score+s.subjective_score >=t.excellent_score then 1 else 0 end) excellentCount
|
|
|
+ sum(case when s.objective_score+s.subjective_score >=t.total_score * t.pass_score/100 then 1 else 0 end) passCount,
|
|
|
+ sum(case when s.objective_score+s.subjective_score >=t.total_score * t.excellent_score/100 then 1 else 0 end) excellentCount
|
|
|
FROM mark_student s
|
|
|
+ left join mark_paper t on s.exam_id = t.exam_id
|
|
|
+ and s.paper_number = t.paper_number
|
|
|
+ and s.paper_type = t.paper_type
|
|
|
WHERE
|
|
|
- s.exam_id = #{examId} and s.paper_number = #{paperNumber}
|
|
|
+ s.exam_id = #{examId} and s.paper_number = #{paperNumber} and s.teacher is not null
|
|
|
group by s.teacher
|
|
|
</select>
|
|
|
<select id="findOne" resultType="com.qmth.teachcloud.mark.bean.student.StudentVo"
|
|
@@ -356,11 +368,14 @@
|
|
|
avg(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) avgScore,
|
|
|
max(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) maxScore,
|
|
|
min(case when s.is_absent !=1 then s.objective_score+s.subjective_score else null end) minScore,
|
|
|
- sum(case when s.objective_score+s.subjective_score >=t.pass_score then 1 else 0 end) passCount,
|
|
|
- sum(case when s.objective_score+s.subjective_score >=t.excellent_score then 1 else 0 end) excellentCount
|
|
|
+ sum(case when s.objective_score+s.subjective_score >=t.total_score * t.pass_score/100 then 1 else 0 end) passCount,
|
|
|
+ sum(case when s.objective_score+s.subjective_score >=t.total_score * t.excellent_score/100 then 1 else 0 end) excellentCount
|
|
|
FROM mark_student s
|
|
|
+ left join mark_paper t on s.exam_id = t.exam_id
|
|
|
+ and s.paper_number = t.paper_number
|
|
|
+ and s.paper_type = t.paper_type
|
|
|
WHERE
|
|
|
- s.exam_id = #{examId} and s.paper_number = #{paperNumber}
|
|
|
+ s.exam_id = #{examId} and s.paper_number = #{paperNumber} and s.class_name is not null
|
|
|
group by s.teacher, s.class_name
|
|
|
</select>
|
|
|
</mapper>
|