Browse Source

错题集搜素,学生靶向作业

tags/正式版本
雍文秀 2 years ago
parent
commit
953f43a981

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

@@ -99,7 +99,7 @@ public class PaperStudentWebService {
99 99
 
100 100
                     //学生作业id
101 101
                     List<TPaperStudentQuestion> stuques = list.stream().filter(
102
-                            (pq) -> stuids.stream().collect(Collectors.toList()).contains(pq.getQuestionid())).collect(Collectors.toList());
102
+                            (pq) -> stuids.stream().collect(Collectors.toList()).contains(pq.getQuestionpid())).collect(Collectors.toList());
103 103
 
104 104
                     if(N_Utils.isListNotEmpty(stuques)) savelist.addAll(stuques);
105 105
                 }

+ 4
- 0
sstudy/src/main/resources/mapper/paper/PaperAnalyzeMapper.xml View File

@@ -214,6 +214,8 @@
214 214
         ,psq.qorder,psq.qn,psq.psid
215 215
         ,q.questionid,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.ctype,q.complexity,q.hashear,q.hearfile,q.qlevel,q.sorder
216 216
         ,ifnull(q.questionpid,q.questionid)questionpid
217
+        ,(case when psq.questionid!=psq.questionpid then '' else (select group_concat(p.pointname separator '  ')
218
+        from t_question_point qp left join t_point p on qp.pointid=p.pointid where qp.questionid=q.questionid) end)pointname
217 219
         FROM t_paper_student_question psq LEFT JOIN t_question q ON psq.questionid=q.questionid
218 220
         LEFT JOIN t_paper_qtype_question tq ON psq.questionid=tq.questionid AND psq.paperid=tq.paperid
219 221
         LEFT JOIN t_paper_qtype t ON tq.ptid=t.ptid
@@ -490,6 +492,8 @@
490 492
     <!--作业母题列表-->
491 493
     <select id="listQuestionByQuestionIds" resultType="com.xhkjedu.sstudy.vo.paperstudent.PaperStudentQuestionVo">
492 494
         select questionid,ctype,qstem,qoption,qanswer,qanalyze,q.hashear,q.hearfile,q.qlevel
495
+        ,(select group_concat(p.pointname separator '  ') from t_question_point qp
496
+        left join t_point p on qp.pointid=p.pointid where qp.questionid=q.questionid)pointname
493 497
         from t_question q where questionid in
494 498
         <foreach collection="questionids" item="questionid" open="(" separator="," close=")">
495 499
             #{questionid}

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

@@ -61,8 +61,8 @@
61 61
             and p.directorid=#{question.directorid}
62 62
         </if>
63 63
         <if test="question.qtypeid!=null and question.qtypeid!='0'.toString() and question.qtypeid!=''">
64
-            <if test="qs.qtypeid!='tlt'">and qs.hashear=0 and qs.qtypeid=#{qs.qtypeid}</if>
65
-            <if test="qs.qtypeid=='tlt'">and qs.hashear=1</if>
64
+            <if test="question.qtypeid!='tlt'">and qs.hashear=0 and qs.qtypeid=#{question.qtypeid}</if>
65
+            <if test="question.qtypeid=='tlt'">and qs.hashear=1</if>
66 66
         </if>
67 67
         group by qs.questionid,qs.qctype order by qs.handletime desc,qs.qorder desc
68 68
     </select>

Loading…
Cancel
Save