Browse Source

班级错题报告 v3.3.2

学生错题集 v3.3.2
课堂批量结束 v3.3.1
tags/正式3.4.0
雍文秀 2 years ago
parent
commit
3778990ca1

+ 1
- 1
sapi/src/main/resources/application.properties View File

100
 #每隔3s清除一下请求地址map
100
 #每隔3s清除一下请求地址map
101
 cron.deleteUriMap=0/3 * * * * ?
101
 cron.deleteUriMap=0/3 * * * * ?
102
 #版本号
102
 #版本号
103
-versionname=Test_v3.3.1
103
+versionname=Test_v3.3.2

+ 1
- 1
sapi/src/main/resources/mapper/classreport/ClassReportMapper.xml View File

257
         left join t_paper_student_question psq on psq.paperid=p.paperid and psq.classid=qc.classid
257
         left join t_paper_student_question psq on psq.paperid=p.paperid and psq.classid=qc.classid
258
         left join t_question_point qp on psq.questionid=qp.questionid
258
         left join t_question_point qp on psq.questionid=qp.questionid
259
         where qc.schoolid=#{type.schoolid} AND qc.classid=#{type.classid} AND p.subjectid=#{type.subjectid}
259
         where qc.schoolid=#{type.schoolid} AND qc.classid=#{type.classid} AND p.subjectid=#{type.subjectid}
260
-        and qc.qctype=1 and qp.pointid is not null
260
+        and qc.qctype in(1,3) and qp.pointid is not null
261
         <if test="type.reporttype==1">and YEARWEEK(FROM_UNIXTIME(qc.createtime,'%Y-%m-%d'),1)=YEARWEEK(now(),1)-#{type.basenum}</if>
261
         <if test="type.reporttype==1">and YEARWEEK(FROM_UNIXTIME(qc.createtime,'%Y-%m-%d'),1)=YEARWEEK(now(),1)-#{type.basenum}</if>
262
         <if test="type.reporttype==2">and MONTH(FROM_UNIXTIME(qc.createtime))=MONTH(now())-#{type.basenum}</if>
262
         <if test="type.reporttype==2">and MONTH(FROM_UNIXTIME(qc.createtime))=MONTH(now())-#{type.basenum}</if>
263
         <if test="type.reporttype==3">and YEARWEEK(FROM_UNIXTIME(qc.createtime,'%Y-%m-%d'),1)=YEARWEEK(now(),1)</if>
263
         <if test="type.reporttype==3">and YEARWEEK(FROM_UNIXTIME(qc.createtime,'%Y-%m-%d'),1)=YEARWEEK(now(),1)</if>

+ 1
- 1
sclass/src/main/resources/application.properties View File

63
 cron.deleteUriMap=0/3 * * * * ?
63
 cron.deleteUriMap=0/3 * * * * ?
64
 
64
 
65
 #版本号
65
 #版本号
66
-versionname=Test_v3.3.0
66
+versionname=Test_v3.3.1

+ 1
- 1
sclass/src/main/resources/mapper/classroom/ClassroomMapper.xml View File

383
     <update id="updateBatchRoomState" parameterType="java.util.List">
383
     <update id="updateBatchRoomState" parameterType="java.util.List">
384
         UPDATE t_classroom set roomstate=2,endtime=createtime+60 * 45 WHERE
384
         UPDATE t_classroom set roomstate=2,endtime=createtime+60 * 45 WHERE
385
         <foreach collection="list" item="classid" index="index" separator="or">
385
         <foreach collection="list" item="classid" index="index" separator="or">
386
-            classid=#{classid} and roomstate=1
386
+            (classid=#{classid} and roomstate=1)
387
         </foreach>
387
         </foreach>
388
     </update>
388
     </update>
389
     <!--课堂回顾详情-->
389
     <!--课堂回顾详情-->

+ 3
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/question/QuestionStudentMapper.java View File

68
 
68
 
69
     /**
69
     /**
70
      * 结构试题详情
70
      * 结构试题详情
71
+     *
72
+     * @return com.xhkjedu.vo.question.QuestionStudentVo
71
      * @Param [questionid, studentid]
73
      * @Param [questionid, studentid]
72
      * @Author ywx
74
      * @Author ywx
73
      * @Date 2020/9/5 9:41
75
      * @Date 2020/9/5 9:41
74
-     * @return com.xhkjedu.vo.question.QuestionStudentVo
75
      **/
76
      **/
76
-    QuestionStudentVo detail(String questionid, Integer studentid);
77
+    QuestionStudentVo detail(@Param("questionid") String questionid, @Param("studentid") Integer studentid, @Param("qctype") Integer qctype);
77
 
78
 
78
     /**
79
     /**
79
      * 附件试题详情
80
      * 附件试题详情

+ 2
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionClassService.java View File

151
 
151
 
152
     //获取错题详情
152
     //获取错题详情
153
     private void listQuestionDetail(List<QuestionClassVo> all, List<QuestionClassVo> questions, List<QuestionClassVo> scantrons, List<TQuestionExplain> explainAll) {
153
     private void listQuestionDetail(List<QuestionClassVo> all, List<QuestionClassVo> questions, List<QuestionClassVo> scantrons, List<TQuestionExplain> explainAll) {
154
-        List<String> questionids = all.stream().filter(q -> q.getQctype() == 1).map(QuestionClassVo::getQuestionid).collect(Collectors.toList());
154
+        List<String> questionids = all.stream().filter(q -> q.getQctype() == 1 || q.getQctype() == 3)
155
+                .map(QuestionClassVo::getQuestionid).collect(Collectors.toList());
155
         List<String> sids = all.stream().filter(q -> q.getQctype() == 2).map(QuestionClassVo::getQuestionid).collect(Collectors.toList());
156
         List<String> sids = all.stream().filter(q -> q.getQctype() == 2).map(QuestionClassVo::getQuestionid).collect(Collectors.toList());
156
         if (N_Utils.isListNotEmpty(questionids)) questions.addAll(questionClassMapper.getQuestionById(questionids));
157
         if (N_Utils.isListNotEmpty(questionids)) questions.addAll(questionClassMapper.getQuestionById(questionids));
157
         if (N_Utils.isListNotEmpty(sids)) scantrons.addAll(questionClassMapper.getScantronById(sids));
158
         if (N_Utils.isListNotEmpty(sids)) scantrons.addAll(questionClassMapper.getScantronById(sids));

+ 3
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionStudentService.java View File

106
 
106
 
107
     //获取错题详情
107
     //获取错题详情
108
     private void listQuestionDetail(List<QuestionStudentVo> list, List<QuestionClassVo> questions, List<QuestionClassVo> scantrons, List<TQuestionExplain> explainAll) {
108
     private void listQuestionDetail(List<QuestionStudentVo> list, List<QuestionClassVo> questions, List<QuestionClassVo> scantrons, List<TQuestionExplain> explainAll) {
109
-        List<String> questionids = list.stream().filter(q -> q.getQctype() == 1).map(QuestionStudentVo::getQuestionid).collect(Collectors.toList());
109
+        List<String> questionids = list.stream().filter(q -> q.getQctype() == 1 || q.getQctype() == 3)
110
+                .map(QuestionStudentVo::getQuestionid).collect(Collectors.toList());
110
         List<String> sids = list.stream().filter(q -> q.getQctype() == 2).map(QuestionStudentVo::getQuestionid).collect(Collectors.toList());
111
         List<String> sids = list.stream().filter(q -> q.getQctype() == 2).map(QuestionStudentVo::getQuestionid).collect(Collectors.toList());
111
         if (N_Utils.isListNotEmpty(questionids)) questions.addAll(questionClassMapper.getQuestionById(questionids));
112
         if (N_Utils.isListNotEmpty(questionids)) questions.addAll(questionClassMapper.getQuestionById(questionids));
112
         if (N_Utils.isListNotEmpty(sids)) scantrons.addAll(questionClassMapper.getScantronById(sids));
113
         if (N_Utils.isListNotEmpty(sids)) scantrons.addAll(questionClassMapper.getScantronById(sids));
232
     public QuestionStudentVo detailStuWeb(String questionid, Integer qctype, Integer studentid) {
233
     public QuestionStudentVo detailStuWeb(String questionid, Integer qctype, Integer studentid) {
233
         QuestionStudentVo question = null;
234
         QuestionStudentVo question = null;
234
         if (qctype == 1 || qctype == 3) {
235
         if (qctype == 1 || qctype == 3) {
235
-            question = questionStudentMapper.detail(questionid, studentid);
236
+            question = questionStudentMapper.detail(questionid, studentid, qctype);
236
         } else {
237
         } else {
237
             question = questionStudentMapper.sdetail(questionid, studentid);
238
             question = questionStudentMapper.sdetail(questionid, studentid);
238
             if (question != null) {
239
             if (question != null) {

+ 1
- 1
sstudy/src/main/resources/application.properties View File

107
 dbname=xhkjedu_school_test
107
 dbname=xhkjedu_school_test
108
 
108
 
109
 #版本号
109
 #版本号
110
-versionname=Test_v3.3.1
110
+versionname=Test_v3.3.2

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

91
         <if test="question.pointid!=null and question.pointid!='0'.toString() and question.pointid!=''">
91
         <if test="question.pointid!=null and question.pointid!='0'.toString() and question.pointid!=''">
92
             left join t_question_point qp on q.questionid = qp.questionid
92
             left join t_question_point qp on q.questionid = qp.questionid
93
         </if>
93
         </if>
94
-        where qc.qctype=1 and qc.classid=#{question.classid}
94
+        where qc.qctype!=2 and qc.classid=#{question.classid}
95
         and UNIX_TIMESTAMP(FROM_UNIXTIME(qc.createtime,'%Y%m%d'))>=#{question.starttime}
95
         and UNIX_TIMESTAMP(FROM_UNIXTIME(qc.createtime,'%Y%m%d'))>=#{question.starttime}
96
         and UNIX_TIMESTAMP(FROM_UNIXTIME(qc.createtime,'%Y%m%d'))&lt;=#{question.stoptime}
96
         and UNIX_TIMESTAMP(FROM_UNIXTIME(qc.createtime,'%Y%m%d'))&lt;=#{question.stoptime}
97
         <if test="question.subjectid!=null and question.subjectid!='0'.toString() and question.subjectid!=''">
97
         <if test="question.subjectid!=null and question.subjectid!='0'.toString() and question.subjectid!=''">
166
         ,(select group_concat(p.pointname separator '  ') from t_question_point qp
166
         ,(select group_concat(p.pointname separator '  ') from t_question_point qp
167
         left join t_point p on qp.pointid = p.pointid where qp.questionid=q.questionid)pointname
167
         left join t_point p on qp.pointid = p.pointid where qp.questionid=q.questionid)pointname
168
         from (select max(qcid)qcid,questionid from t_question_class
168
         from (select max(qcid)qcid,questionid from t_question_class
169
-        where questionid=#{question.questionid} and classid=#{question.classid} and qctype=1)a
169
+        where questionid=#{question.questionid} and classid=#{question.classid} and qctype!=2)a
170
         left join t_question_class qc on a.qcid=qc.qcid
170
         left join t_question_class qc on a.qcid=qc.qcid
171
         left join t_question q on qc.questionid=q.questionid
171
         left join t_question q on qc.questionid=q.questionid
172
         left join t_paper_student_question psq on qc.paperid=psq.paperid and qc.classid=psq.classid
172
         left join t_paper_student_question psq on qc.paperid=psq.paperid and qc.classid=psq.classid
209
         ,(select group_concat(p.pointname separator '  ') from t_question_point qp
209
         ,(select group_concat(p.pointname separator '  ') from t_question_point qp
210
         left join t_point p on qp.pointid = p.pointid where qp.questionid=q.questionid)pointname
210
         left join t_point p on qp.pointid = p.pointid where qp.questionid=q.questionid)pointname
211
         from (select max(qcid)qcid,questionid from t_question_class
211
         from (select max(qcid)qcid,questionid from t_question_class
212
-        where questionid=#{question.questionid} and classid=#{question.classid} and qctype=1)a
212
+        where questionid=#{question.questionid} and classid=#{question.classid} and qctype!=2)a
213
         left join t_question_class qc on a.qcid=qc.qcid
213
         left join t_question_class qc on a.qcid=qc.qcid
214
         left join t_question q on qc.questionid=q.questionid
214
         left join t_question q on qc.questionid=q.questionid
215
         left join t_paper_student_question psq on qc.paperid=psq.paperid and qc.classid=psq.classid
215
         left join t_paper_student_question psq on qc.paperid=psq.paperid and qc.classid=psq.classid

+ 1
- 1
sstudy/src/main/resources/mapper/question/QuestionExplainMapper.xml View File

31
         from t_question_explain qe left join t_user u on qe.createid=u.userid
31
         from t_question_explain qe left join t_user u on qe.createid=u.userid
32
         where
32
         where
33
         <foreach collection="questions" item="question" index="index" separator="or">
33
         <foreach collection="questions" item="question" index="index" separator="or">
34
-            qe.questionid=#{question.questionid} and qe.qctype=#{question.qctype}
34
+            (qe.questionid=#{question.questionid} and qe.qctype=${question.qctype})
35
         </foreach>
35
         </foreach>
36
         order by qe.createtime desc
36
         order by qe.createtime desc
37
     </select>
37
     </select>

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

102
         ,(select group_concat(p.pointname separator '  ') from t_question_point qp
102
         ,(select group_concat(p.pointname separator '  ') from t_question_point qp
103
         left join t_point p on qp.pointid = p.pointid where qp.questionid=qs.questionid)pointname
103
         left join t_point p on qp.pointid = p.pointid where qp.questionid=qs.questionid)pointname
104
         from t_question_student qs left join t_question q on qs.questionid=q.questionid
104
         from t_question_student qs left join t_question q on qs.questionid=q.questionid
105
-        where qs.questionid=#{questionid} and qs.studentid=#{studentid} and qs.qctype=1 limit 1
105
+        where qs.questionid=#{questionid} and qs.studentid=#{studentid} and qs.qctype=#{qctype} limit 1
106
     </select>
106
     </select>
107
     <!--附件试题详情-->
107
     <!--附件试题详情-->
108
     <select id="sdetail" resultType="com.xhkjedu.sstudy.vo.question.QuestionStudentVo">
108
     <select id="sdetail" resultType="com.xhkjedu.sstudy.vo.question.QuestionStudentVo">

Loading…
Cancel
Save