Browse Source

学生报告错题集分数显示控制

tags/正式版本
雍文秀 2 years ago
parent
commit
333cb1a325

+ 5
- 4
sexam/src/main/java/com/xhkjedu/sexam/mapper/reportstu/ERstudentMapper.java View File

45
     List<Map> listStudentQuestionsFj(@Param("epid") Integer epid, @Param("studentid") Integer studentid
45
     List<Map> listStudentQuestionsFj(@Param("epid") Integer epid, @Param("studentid") Integer studentid
46
             ,@Param("showrank") Integer showrank);
46
             ,@Param("showrank") Integer showrank);
47
     //学生报告-错题集-各科目错题
47
     //学生报告-错题集-各科目错题
48
-    List<Map> listStudentSubjectErrorQues(@Param("examid") Integer examid, @Param("studentid") Integer studentid
49
-            ,@Param("showrank") Integer showrank);
48
+    List<Map> listStudentSubjectErrorQues(@Param("examid") Integer examid, @Param("studentid") Integer studentid);
50
     //学生报告-错题集-学生科目下错题
49
     //学生报告-错题集-学生科目下错题
51
-    List<Map> listStudentErrorQuestionsForTk(@Param("examid")Integer examid,@Param("studentid")Integer studentid,@Param("subjectid")String subjectid);
50
+    List<Map> listStudentErrorQuestionsForTk(@Param("examid") Integer examid, @Param("studentid") Integer studentid
51
+            , @Param("subjectid") String subjectid,@Param("showrank") Integer showrank);
52
     //学生报告-错题集-学生科目下错题(附件)
52
     //学生报告-错题集-学生科目下错题(附件)
53
-    List<Map> listStudentErrorQuestionsForFj(@Param("examid")Integer examid,@Param("studentid")Integer studentid,@Param("subjectid")String subjectid);
53
+    List<Map> listStudentErrorQuestionsForFj(@Param("examid") Integer examid, @Param("studentid") Integer studentid
54
+            , @Param("subjectid") String subjectid,@Param("showrank") Integer showrank);
54
     //学生报告-监控照片-考试科目下违规图片数量
55
     //学生报告-监控照片-考试科目下违规图片数量
55
     List<Map> listExamSubjectBadNums(@Param("examid")Integer examid,@Param("studentid")Integer studentid);
56
     List<Map> listExamSubjectBadNums(@Param("examid")Integer examid,@Param("studentid")Integer studentid);
56
     //学生报告-监控照片-学生单科图片
57
     //学生报告-监控照片-学生单科图片

+ 4
- 18
sexam/src/main/java/com/xhkjedu/sexam/service/report/EReportStudentService.java View File

431
      * @Date 2022/8/29 11:39
431
      * @Date 2022/8/29 11:39
432
      **/
432
      **/
433
     public List<Map> listStudentSubjectErrorQues(Integer examid, Integer studentid, Integer teacherid) {
433
     public List<Map> listStudentSubjectErrorQues(Integer examid, Integer studentid, Integer teacherid) {
434
-        Integer showrank;
435
-        EBase base = eBaseMapper.getShowRankById(examid);
436
-        if (!N_Utils.isEmptyInteger(teacherid)) {
437
-            showrank = base.getTeashowrank();
438
-        } else {
439
-            showrank = base.getStushowrank();
440
-        }
441
-        List<Map> list = eRstudentMapper.listStudentSubjectErrorQues(examid, studentid, showrank);
442
-        if (showrank == 0) return list;
434
+        List<Map> list = eRstudentMapper.listStudentSubjectErrorQues(examid, studentid);
443
         for (Map map : list) {
435
         for (Map map : list) {
444
             List<Map> queslist = (List<Map>) map.get("questions");
436
             List<Map> queslist = (List<Map>) map.get("questions");
445
             Integer ptype = Integer.parseInt(map.get("ptype").toString());
437
             Integer ptype = Integer.parseInt(map.get("ptype").toString());
481
         } else {
473
         } else {
482
             showrank = base.getStushowrank();
474
             showrank = base.getStushowrank();
483
         }
475
         }
484
-        if (showrank == 0) {
485
-            Map map = new HashMap();
486
-            map.put("questions", new ArrayList<>());
487
-            map.put("points", new ArrayList<>());
488
-            return map;
489
-        }
490
-        List<Map> list = eRstudentMapper.listStudentErrorQuestionsForTk(examid, studentid, subjectid);
476
+        List<Map> list = eRstudentMapper.listStudentErrorQuestionsForTk(examid, studentid, subjectid, showrank);
491
         Map panalyze = ePaperAnalyzeMapper.getPaperAnalzyeBySubjectid(examid, subjectid);
477
         Map panalyze = ePaperAnalyzeMapper.getPaperAnalzyeBySubjectid(examid, subjectid);
492
         String pointjson = panalyze.get("pointjson").toString();
478
         String pointjson = panalyze.get("pointjson").toString();
493
         List<Map> pointlist = JSON.parseArray(pointjson, Map.class);
479
         List<Map> pointlist = JSON.parseArray(pointjson, Map.class);
536
         } else {
522
         } else {
537
             showrank = base.getStushowrank();
523
             showrank = base.getStushowrank();
538
         }
524
         }
539
-        if (showrank == 0) return new ArrayList<>();
540
-        List<Map> list = eRstudentMapper.listStudentErrorQuestionsForFj(examid, studentid, subjectid);
525
+        List<Map> list = eRstudentMapper.listStudentErrorQuestionsForFj(examid, studentid, subjectid, showrank);
526
+        if(showrank == 0) return list;
541
         for (Map map : list) {
527
         for (Map map : list) {
542
             Double stuscore = Double.parseDouble(map.get("stuscore").toString());
528
             Double stuscore = Double.parseDouble(map.get("stuscore").toString());
543
             Double pscore = Double.parseDouble(map.get("qscore").toString());
529
             Double pscore = Double.parseDouble(map.get("qscore").toString());

+ 16
- 12
sexam/src/main/resources/mapper/report/ERstudentMapper.xml View File

306
         </collection>
306
         </collection>
307
     </resultMap>
307
     </resultMap>
308
     <select id="listStudentSubjectErrorQues" resultMap="listStudentSubjectErrorQues">
308
     <select id="listStudentSubjectErrorQues" resultMap="listStudentSubjectErrorQues">
309
-        <if test="showrank!=0">
310
         select sq.subjectid,st.subjectname,p.ptype,sq.epsqid,sq.eptqid,q.questionid,q.qlevel,q.questionpid
309
         select sq.subjectid,st.subjectname,p.ptype,sq.epsqid,sq.eptqid,q.questionid,q.qlevel,q.questionpid
311
         from e_paper_student_question sq
310
         from e_paper_student_question sq
312
         left join t_question q on q.questionid=sq.questionid
311
         left join t_question q on q.questionid=sq.questionid
314
         left join e_paper p on sq.epid=p.epid
313
         left join e_paper p on sq.epid=p.epid
315
         left join e_subject st on p.esid=st.esid
314
         left join e_subject st on p.esid=st.esid
316
         where sq.examid=#{examid} and sq.studentid=#{studentid} and st.pstate=2 and sq.stuscore &lt; sq.qscore group by sq.epsqid order by st.esid
315
         where sq.examid=#{examid} and sq.studentid=#{studentid} and st.pstate=2 and sq.stuscore &lt; sq.qscore group by sq.epsqid order by st.esid
317
-        </if>
318
-        <if test="showrank==0">
319
-        select st.subjectid,st.subjectname,p.ptype,0 num
320
-        from e_subject st left join e_paper p on st.esid=p.esid
321
-        where st.examid=#{examid} and st.pstate=2
322
-        </if>
323
     </select>
316
     </select>
324
     <!--学生报告-错题集-学生科目下错题(题库)-->
317
     <!--学生报告-错题集-学生科目下错题(题库)-->
325
     <select id="listStudentErrorQuestionsForTk" resultMap="listStudentQues">
318
     <select id="listStudentErrorQuestionsForTk" resultMap="listStudentQues">
326
-        select sq.epsqid,sq.eptqid,sq.ctype,sq.questionid,sq.qn,sq.qorder,sq.qscore,sq.stuscore,sq.answered,
319
+        select sq.epsqid,sq.eptqid,sq.ctype,sq.questionid,sq.qn,sq.qorder,sq.qscore,sq.answered,
327
                sq.answertype,sq.stuanswer,sq.stuanswertxt,pq.answer,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.hashear,q.hearfile,
320
                sq.answertype,sq.stuanswer,sq.stuanswertxt,pq.answer,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.hashear,q.hearfile,
328
                q.qlevel,q.sorder,q.complexity,q.questionpid,mq.questionid mquestionid,mq.qstem mqstem,mq.qoption mqoption,mq.qanswer mqanswer,
321
                q.qlevel,q.sorder,q.complexity,q.questionpid,mq.questionid mquestionid,mq.qstem mqstem,mq.qoption mqoption,mq.qanswer mqanswer,
329
                mq.qanalyze mqanalyze,mq.hashear mhashear,mq.hearfile mhearfile,mq.qlevel mqlevel,mq.ctype mctype,mq.snum msnum,
322
                mq.qanalyze mqanalyze,mq.hashear mhashear,mq.hearfile mhearfile,mq.qlevel mqlevel,mq.ctype mctype,mq.snum msnum,
330
-               mq.complexity mcomplexity,cq.classavgscore,cq.gradeavgscore
323
+               mq.complexity mcomplexity
324
+        <if test="showrank==0">
325
+            ,0 stuscore,0 classavgscore,0 gradeavgscore
326
+        </if>
327
+        <if test="showrank!=0">
328
+            ,sq.stuscore,cq.classavgscore,cq.gradeavgscore
329
+        </if>
331
         from e_paper_student_question sq left join t_question q on sq.questionid=q.questionid
330
         from e_paper_student_question sq left join t_question q on sq.questionid=q.questionid
332
         left join t_question mq on q.questionpid=mq.questionid
331
         left join t_question mq on q.questionpid=mq.questionid
333
         left join e_rclass_question cq on sq.epid=cq.epid and sq.classid=cq.classid and (sq.questionid=cq.questionid or mq.questionid=cq.questionid)
332
         left join e_rclass_question cq on sq.epid=cq.epid and sq.classid=cq.classid and (sq.questionid=cq.questionid or mq.questionid=cq.questionid)
338
 
337
 
339
     <!--学生报告-错题集-学生科目下错题(附件)-->
338
     <!--学生报告-错题集-学生科目下错题(附件)-->
340
     <select id="listStudentErrorQuestionsForFj" resultType="java.util.Map">
339
     <select id="listStudentErrorQuestionsForFj" resultType="java.util.Map">
341
-        select sq.epsqid,sq.eptqid,sq.ctype,sq.qn,sq.qorder,sq.qscore,sq.stuscore,sq.answered,
342
-               sq.answertype,sq.stuanswer,sq.stuanswertxt,q.qtypeid,q.qtypename,q.optionnum,q.answer,
343
-               cq.classavgscore,cq.gradeavgscore
340
+        select sq.epsqid,sq.eptqid,sq.ctype,sq.qn,sq.qorder,sq.qscore,sq.answered,
341
+               sq.answertype,sq.stuanswer,sq.stuanswertxt,q.qtypeid,q.qtypename,q.optionnum,q.answer
342
+        <if test="showrank==0">
343
+            ,0 stuscore,0 classavgscore,0 gradeavgscore
344
+        </if>
345
+        <if test="showrank!=0">
346
+            ,sq.stuscore,cq.classavgscore,cq.gradeavgscore
347
+        </if>
344
         from e_paper_student_question sq left join e_rclass_question cq on sq.eptqid=cq.eptqid and sq.classid=cq.classid
348
         from e_paper_student_question sq left join e_rclass_question cq on sq.eptqid=cq.eptqid and sq.classid=cq.classid
345
         left join e_paper_qtype_question q on sq.eptqid=q.eptqid
349
         left join e_paper_qtype_question q on sq.eptqid=q.eptqid
346
         where sq.examid=#{examid} and sq.subjectid=#{subjectid} and sq.studentid=#{studentid} and sq.stuscore &lt; sq.qscore
350
         where sq.examid=#{examid} and sq.subjectid=#{subjectid} and sq.studentid=#{studentid} and sq.stuscore &lt; sq.qscore

Loading…
Cancel
Save