Browse Source

Merge remote-tracking branch 'cloud-schoolapi/ywx'

tags/正式版本
王宁 2 years ago
parent
commit
0c497a17ae

+ 5
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/paper/PaperAnalyzeService.java View File

137
      * @return com.xhkjedu.sstudy.vo.paper.QuestionAnalyzeVo
137
      * @return com.xhkjedu.sstudy.vo.paper.QuestionAnalyzeVo
138
      **/
138
      **/
139
     public QuestionAnalyzeVo getQuestionDetailAnalyze(AnalyzeQuestionVo question) {
139
     public QuestionAnalyzeVo getQuestionDetailAnalyze(AnalyzeQuestionVo question) {
140
-        QuestionAnalyzeVo analyze = paperAnalyzeMapper.getQuestionDetailAnalyze(question);
141
         String questionpid = question.getQuestionpid();
140
         String questionpid = question.getQuestionpid();
142
         String questionid = question.getQuestionid();
141
         String questionid = question.getQuestionid();
143
-        if(N_Utils.isEmpty(questionpid)) question.setQuestionpid(questionid);
142
+        if(N_Utils.isEmpty(questionpid)) {
143
+            question.setQuestionpid(questionid);
144
+            questionpid=questionid;
145
+        }
146
+        QuestionAnalyzeVo analyze = paperAnalyzeMapper.getQuestionDetailAnalyze(question);
144
         if (!questionpid.equals(questionid)) {
147
         if (!questionpid.equals(questionid)) {
145
             List<Map> sonqlist = questionMapper.listSonQuestionsForDetail(questionpid);
148
             List<Map> sonqlist = questionMapper.listSonQuestionsForDetail(questionpid);
146
             analyze.setSonqlist(sonqlist);
149
             analyze.setSonqlist(sonqlist);

+ 1
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentService.java View File

145
                 q.setMhashear(mt.getHashear());
145
                 q.setMhashear(mt.getHashear());
146
                 q.setMhearfile(mt.getHearfile());
146
                 q.setMhearfile(mt.getHearfile());
147
                 q.setMqlevel(mt.getQlevel());
147
                 q.setMqlevel(mt.getQlevel());
148
+                q.setMctype(mt.getCtype());
148
             }
149
             }
149
         }
150
         }
150
         return list;
151
         return list;

+ 1
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/paperstudent/PaperStudentQuestionVo.java View File

108
     private String hearfile;//听力题文件地址
108
     private String hearfile;//听力题文件地址
109
     private Integer qlevel;//试题级别1单题2母题
109
     private Integer qlevel;//试题级别1单题2母题
110
     private Integer mqlevel;//母题试题级别1单题2母题
110
     private Integer mqlevel;//母题试题级别1单题2母题
111
+    private Integer mctype;//母题处理题型
111
     private Integer sorder;//子题排序
112
     private Integer sorder;//子题排序
112
     private String questionpid;//母题id
113
     private String questionpid;//母题id
113
     private String qn;//显示题号
114
     private String qn;//显示题号

+ 1
- 1
sstudy/src/main/resources/mapper/paperstudent/PaperStudentQuestionMapper.xml View File

11
         ,(CASE WHEN q.ctype IN(16,17) THEN JSON_LENGTH(q.qoption) ELSE 0 END)qoptioncount
11
         ,(CASE WHEN q.ctype IN(16,17) THEN JSON_LENGTH(q.qoption) ELSE 0 END)qoptioncount
12
         ,(CASE WHEN q.questionpid IS NULL THEN ''
12
         ,(CASE WHEN q.questionpid IS NULL THEN ''
13
         ELSE (SELECT json_object('qstem',fq.qstem,'qoption',fq.qoption,'qanswer',fq.qanswer,'qanalyze',fq.qanalyze
13
         ELSE (SELECT json_object('qstem',fq.qstem,'qoption',fq.qoption,'qanswer',fq.qanswer,'qanalyze',fq.qanalyze
14
-            ,'qtypename',fq.qtypename,'hashear',fq.hashear,'hearfile',fq.hearfile,'qlevel',fq.qlevel)
14
+            ,'qtypename',fq.qtypename,'hashear',fq.hashear,'hearfile',fq.hearfile,'qlevel',fq.qlevel,'ctype',fq.ctype)
15
         FROM t_question fq WHERE fq.questionid=q.questionpid) END)mqstem
15
         FROM t_question fq WHERE fq.questionid=q.questionpid) END)mqstem
16
         FROM t_paper_student_question psq LEFT JOIN t_question q ON psq.questionid=q.questionid
16
         FROM t_paper_student_question psq LEFT JOIN t_question q ON psq.questionid=q.questionid
17
         LEFT JOIN t_user u ON psq.studentid=u.userid
17
         LEFT JOIN t_user u ON psq.studentid=u.userid

+ 2
- 2
sstudy/src/main/resources/mapper/question/QuestionClassMapper.xml View File

3
 <mapper namespace="com.xhkjedu.sstudy.mapper.question.QuestionClassMapper">
3
 <mapper namespace="com.xhkjedu.sstudy.mapper.question.QuestionClassMapper">
4
     <!--作业统计按题-->
4
     <!--作业统计按题-->
5
     <select id="getQuestionAnalyze" resultType="com.xhkjedu.sstudy.model.question.TQuestionClass">
5
     <select id="getQuestionAnalyze" resultType="com.xhkjedu.sstudy.model.question.TQuestionClass">
6
-        select ptq.questionid,ptq.ptqorder qorder,ptq.ptqscore qscore,sum(ifnull(psq.stuscore,0))stuscore,ptq.schoolid,q.qtypeid
6
+        select ptq.questionpid,ptq.ptqorder qorder,ptq.mscore qscore,sum(ifnull(psq.stuscore,0))stuscore,ptq.schoolid,ptq.mqtypeid qtypeid
7
         ,(select count(*) from t_paper_student ps where ps.paperid=#{paperid} and ps.classid=#{classid}
7
         ,(select count(*) from t_paper_student ps where ps.paperid=#{paperid} and ps.classid=#{classid}
8
         <if test="qctype==3">and locate(concat('"',ptq.questionid,'"'),ps.questionids)>0</if>)stunum
8
         <if test="qctype==3">and locate(concat('"',ptq.questionid,'"'),ps.questionids)>0</if>)stunum
9
         from t_paper_qtype_question ptq left join t_question q on ptq.questionid=q.questionid
9
         from t_paper_qtype_question ptq left join t_question q on ptq.questionid=q.questionid
10
         left join t_paper_student_question psq on ptq.paperid = psq.paperid and ptq.questionid=psq.questionid and psq.classid=#{classid}
10
         left join t_paper_student_question psq on ptq.paperid = psq.paperid and ptq.questionid=psq.questionid and psq.classid=#{classid}
11
         where ptq.paperid=#{paperid}
11
         where ptq.paperid=#{paperid}
12
-        group by ptq.questionid having stunum!=0 order by ptq.ptqorder
12
+        group by ptq.ptqorder having stunum!=0 order by ptq.ptqorder
13
     </select>
13
     </select>
14
     <!--答题卡作业统计按题-->
14
     <!--答题卡作业统计按题-->
15
     <select id="getSQuestionAnalyze" resultType="com.xhkjedu.sstudy.model.question.TQuestionClass">
15
     <select id="getSQuestionAnalyze" resultType="com.xhkjedu.sstudy.model.question.TQuestionClass">

Loading…
Cancel
Save