Browse Source

完善作业、试卷知识点分析顺序

tags/正式3.9.0
王宁 1 year ago
parent
commit
60138baac0

+ 3
- 3
sexam/src/main/java/com/xhkjedu/sexam/service/paper/EPaperQtypeService.java View File

@@ -279,7 +279,7 @@ public class EPaperQtypeService {
279 279
 
280 280
             if(hasmt > 0){
281 281
                 //说明该题型下有复合题,复合体进行知识点、题型下试题题号及id进行操作
282
-                Map<String,List<EPaperQtypeQuestionVo>> quesMap = tqlist.stream().collect(Collectors.groupingBy(EPaperQtypeQuestionVo:: getQuestionpid, Collectors.toList()));
282
+                LinkedHashMap<String,List<EPaperQtypeQuestionVo>> quesMap = tqlist.stream().collect(Collectors.groupingBy(EPaperQtypeQuestionVo:: getQuestionpid,LinkedHashMap::new, Collectors.toList()));
283 283
                 for(Map.Entry<String, List<EPaperQtypeQuestionVo>> entry : quesMap.entrySet()){
284 284
                     if(!entry.getKey().equals("000")){
285 285
                         //说明该题为母题,
@@ -385,7 +385,7 @@ public class EPaperQtypeService {
385 385
         //知识点分析
386 386
         List<Map> pointlist = new ArrayList<>();
387 387
         if(N_Utils.isListNotEmpty(pointqlist)){
388
-            Map<String,List<QuestionOrderVo>> pointmap = pointqlist.stream().collect(Collectors.groupingBy(QuestionOrderVo::getId,Collectors.toList()));
388
+            LinkedHashMap<String,List<QuestionOrderVo>> pointmap = pointqlist.stream().collect(Collectors.groupingBy(QuestionOrderVo::getId,LinkedHashMap::new,Collectors.toList()));
389 389
             //根据指示进行分组,
390 390
             for(Map.Entry<String, List<QuestionOrderVo>> entry : pointmap.entrySet()){
391 391
                 List<QuestionOrderVo> pgblist = entry.getValue();
@@ -393,7 +393,7 @@ public class EPaperQtypeService {
393 393
                 Double score = pgblist.stream().mapToDouble(s -> s.getScore()).sum();
394 394
                 score = N_Utils.formatDouble(score,1);
395 395
                 Double srate = N_Utils.getDoubleDivideAndMulitiply(score,ePaper.getPscore());
396
-                Map prate = new TreeMap();
396
+                Map prate = new LinkedHashMap();
397 397
                 prate.put("pointid",entry.getKey());
398 398
                 prate.put("pointname",pgblist.get(0).getName());
399 399
                 prate.put("score",score);

+ 1
- 1
sexam/src/main/resources/mapper/paper/EPaperQtypeMapper.xml View File

@@ -74,7 +74,7 @@
74 74
         <if test="qlevel==3">
75 75
             qp.questionid=#{questionpid}
76 76
         </if>
77
-        group by qp.pointid order by p.pointorder
77
+        group by qp.pointid order by p.pointorder,p.pointid
78 78
     </select>
79 79
 
80 80
     <!--试卷题型试题信息(附件)-->

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

@@ -542,7 +542,7 @@ public class PaperService {
542 542
 
543 543
             if(hasmt > 0){
544 544
                 //说明该题型下有复合题,复合体进行知识点、题型下试题题号及id进行操作
545
-                Map<String,List<PaperQtypeQuesVo>> quesMap = tqlist.stream().collect(Collectors.groupingBy(PaperQtypeQuesVo:: getQuestionpid, Collectors.toList()));
545
+                LinkedHashMap<String,List<PaperQtypeQuesVo>> quesMap = tqlist.stream().collect(Collectors.groupingBy(PaperQtypeQuesVo:: getQuestionpid,LinkedHashMap::new, Collectors.toList()));
546 546
                 for(Map.Entry<String, List<PaperQtypeQuesVo>> entry : quesMap.entrySet()){
547 547
                     if(!entry.getKey().equals("000")){
548 548
                         //说明该题为母题,
@@ -644,7 +644,7 @@ public class PaperService {
644 644
         //知识点分析
645 645
         List<Map> pointlist = new ArrayList<>();
646 646
         if(N_Utils.isListNotEmpty(pointqlist)){
647
-            Map<String,List<QuestionOrderVo>> pointmap = pointqlist.stream().collect(Collectors.groupingBy(QuestionOrderVo::getId,Collectors.toList()));
647
+            LinkedHashMap<String,List<QuestionOrderVo>> pointmap = pointqlist.stream().collect(Collectors.groupingBy(QuestionOrderVo::getId,LinkedHashMap::new,Collectors.toList()));
648 648
             //根据指示进行分组,
649 649
             for(Map.Entry<String, List<QuestionOrderVo>> entry : pointmap.entrySet()){
650 650
                 List<QuestionOrderVo> pgblist = entry.getValue();

+ 1
- 1
sstudy/src/main/resources/mapper/paper/PaperQtypeMapper.xml View File

@@ -55,7 +55,7 @@
55 55
     <select id="listQuestionPoints" resultType="java.util.Map">
56 56
         select qp.pointid,p.pointname from t_question_point qp
57 57
         left join t_point p on qp.pointid=p.pointid
58
-        where qp.questionid=#{questionpid} group by qp.pointid order by p.pointorder
58
+        where qp.questionid=#{questionpid} group by qp.pointid order by p.pointorder,p.pointid
59 59
     </select>
60 60
 
61 61
 </mapper>

Loading…
Cancel
Save