|
@@ -299,11 +299,11 @@
|
|
ifnull(t.objectiveScore,0) as sumScore,
|
|
ifnull(t.objectiveScore,0) as sumScore,
|
|
t.examId,
|
|
t.examId,
|
|
t.examActivityId,
|
|
t.examActivityId,
|
|
|
|
+ t.paperId,
|
|
0 as subjectiveScore
|
|
0 as subjectiveScore
|
|
from
|
|
from
|
|
(
|
|
(
|
|
- select
|
|
|
|
- tee.id as examId,tee.name as examName,teea.id as examActivityId, teea.code as examActivityCode, tes.name, tes.`identity`, tees.course_code as courseCode, tees.course_name as courseName, tees.room_code as roomCode, tees.room_name as roomName, tees.grade, tees.class_no as classNo, (
|
|
|
|
|
|
+ select tee.id as examId,tee.name as examName,teea.id as examActivityId, teea.code as examActivityCode, tes.name, tes.`identity`, tees.course_code as courseCode, tees.course_name as courseName, tees.room_code as roomCode, tees.room_name as roomName, tees.grade, tees.class_no as classNo, (
|
|
select
|
|
select
|
|
count(1)
|
|
count(1)
|
|
from
|
|
from
|
|
@@ -312,12 +312,21 @@
|
|
toer.exam_student_id = tees.id) as examCount,
|
|
toer.exam_student_id = tees.id) as examCount,
|
|
(select sum(toer.breach_status) from t_oe_exam_record toer
|
|
(select sum(toer.breach_status) from t_oe_exam_record toer
|
|
where toer.exam_student_id = tees.id and toer.breach_status = 0) as breachCount,
|
|
where toer.exam_student_id = tees.id and toer.breach_status = 0) as breachCount,
|
|
- (select max(toer.objective_score) from t_oe_exam_record toer
|
|
|
|
- where toer.exam_student_id = tees.id and (toer.breach_status = 1 or breach_status is null) and (toer.status = 'FINISHED' or toer.status = 'PERSISTED')) as objectiveScore
|
|
|
|
|
|
+ temp.objective_score as objectiveScore,
|
|
|
|
+ temp.paper_id as paperId
|
|
from
|
|
from
|
|
t_e_student tes
|
|
t_e_student tes
|
|
left join t_e_exam_student tees on
|
|
left join t_e_exam_student tees on
|
|
tees.student_id = tes.id
|
|
tees.student_id = tes.id
|
|
|
|
+ left join (select
|
|
|
|
+ max(toer.objective_score) as objective_score,toer.paper_id,toer.exam_student_id
|
|
|
|
+ from
|
|
|
|
+ t_oe_exam_record toer
|
|
|
|
+ where
|
|
|
|
+ (toer.breach_status = 1
|
|
|
|
+ or breach_status is null)
|
|
|
|
+ and (toer.status = 'FINISHED'
|
|
|
|
+ or toer.status = 'PERSISTED') group by paper_id,exam_student_id) temp on temp.exam_student_id = tees.id
|
|
left join t_e_exam tee on
|
|
left join t_e_exam tee on
|
|
tee.id = tees.exam_id
|
|
tee.id = tees.exam_id
|
|
left join t_e_exam_activity teea on
|
|
left join t_e_exam_activity teea on
|