|
@@ -5,11 +5,12 @@
|
5
|
5
|
<select id="getPaperQuestion" resultType="com.xhkjedu.sstudy.vo.paperstudent.PaperStudentQuestionVo">
|
6
|
6
|
SELECT psq.psqid,psq.paperid,psq.studentid,psq.answered,psq.answertime,psq.costtime,psq.device,psq.checkcomm
|
7
|
7
|
,psq.useranswer,psq.converted,psq.useranswertext,psq.useranswertxt,psq.checked,psq.qscore,psq.stuscore,psq.qorder,u.username studentname,psq.psid
|
8
|
|
- ,q.questionid,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.ctype,q.complexity,q.qtypename
|
|
8
|
+ ,q.questionid,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.ctype,q.complexity,q.qtypename,q.hashear,q.hearfile
|
9
|
9
|
,(CASE WHEN psq.checked=1 AND psq.stuscore=psq.qscore THEN 1 ELSE 2 END)corrected
|
10
|
10
|
,(CASE WHEN q.ctype IN(16,17) THEN JSON_LENGTH(q.qoption) ELSE 0 END)qoptioncount
|
11
|
11
|
,(CASE WHEN q.questionpid IS NULL THEN ''
|
12
|
|
- ELSE (SELECT json_object('qstem',fq.qstem,'qoption',fq.qoption,'qanswer',fq.qanswer,'qanalyze',fq.qanalyze,'qtypename',fq.qtypename)
|
|
12
|
+ ELSE (SELECT json_object('qstem',fq.qstem,'qoption',fq.qoption,'qanswer',fq.qanswer,'qanalyze',fq.qanalyze
|
|
13
|
+ ,'qtypename',fq.qtypename,'hashear',fq.hashear,'hearfile',fq.hearfile)
|
13
|
14
|
FROM t_question fq WHERE fq.questionid=q.questionpid) END)mqstem
|
14
|
15
|
FROM t_paper_student_question psq LEFT JOIN t_question q ON psq.questionid=q.questionid
|
15
|
16
|
LEFT JOIN t_user u ON psq.studentid=u.userid
|