|
@@ -527,11 +527,12 @@ public class EPaperStudentService {
|
527
|
527
|
private void setQuestionsForPaper(List<Map> qtypes){
|
528
|
528
|
for(Map mt : qtypes){
|
529
|
529
|
Integer ctype = Integer.parseInt(mt.get("ctype").toString());
|
|
530
|
+ List<Map> mqlist = new ArrayList<>();
|
530
|
531
|
if(ctype == 11 || ctype == 16 || ctype == 17){
|
531
|
532
|
//符合题、完形填空、任务型阅读
|
532
|
533
|
List<Map> questions = (List<Map>) mt.get("questions");
|
533
|
534
|
Map<String,List<Map>> quemap = questions.stream().collect(Collectors.groupingBy(o -> o.get("questionpid").toString()));
|
534
|
|
- List<Map> mqlist = new ArrayList<>();
|
|
535
|
+
|
535
|
536
|
for(Map.Entry<String,List<Map>> entry : quemap.entrySet()){
|
536
|
537
|
List<Map> sonqlst = entry.getValue();
|
537
|
538
|
Double sontotalsocre = sonqlst.stream().mapToDouble(o -> Double.parseDouble(o.get("score").toString())).sum();
|
|
@@ -547,7 +548,9 @@ public class EPaperStudentService {
|
547
|
548
|
mque.put("qorder",sque.get("qorder").toString());
|
548
|
549
|
mque.put("qn",sque.get("qn").toString());
|
549
|
550
|
mque.put("snum",Integer.parseInt(sque.get("snum").toString()));
|
550
|
|
- if(ctype == 12 && sque.get("mhearfile")!=null){
|
|
551
|
+ Integer hashear = Integer.parseInt(sque.get("mhashear").toString());
|
|
552
|
+ mque.put("hashear",hashear);
|
|
553
|
+ if(ctype == 12 && hashear==1){
|
551
|
554
|
mque.put("hearfile",sque.get("mhearfile").toString());
|
552
|
555
|
}else{
|
553
|
556
|
mque.put("hearfile","");
|
|
@@ -557,13 +560,9 @@ public class EPaperStudentService {
|
557
|
560
|
mque.put("stuscore",stuscore);
|
558
|
561
|
mqlist.add(mque);
|
559
|
562
|
}
|
560
|
|
-
|
561
|
|
- mt.put("questions",mqlist);
|
562
|
|
-
|
563
|
563
|
}else if(ctype == 12){
|
564
|
564
|
//听力题,包含单题和复合题
|
565
|
565
|
List<Map> questions = (List<Map>) mt.get("questions");
|
566
|
|
- List<Map> mqlist = new ArrayList<>();
|
567
|
566
|
List<String> questionpids = new ArrayList<>();
|
568
|
567
|
for(Map q : questions){
|
569
|
568
|
Integer qlevel = Integer.parseInt(q.get("qlevel").toString());
|
|
@@ -587,7 +586,9 @@ public class EPaperStudentService {
|
587
|
586
|
mque.put("qorder",q.get("qorder").toString());
|
588
|
587
|
mque.put("qn",q.get("qn").toString());
|
589
|
588
|
mque.put("snum",Integer.parseInt(q.get("snum").toString()));
|
590
|
|
- if(ctype == 12 && q.get("mhearfile")!=null){
|
|
589
|
+ Integer hashear = Integer.parseInt(q.get("mhashear").toString());
|
|
590
|
+ mque.put("hashear",hashear);
|
|
591
|
+ if(ctype == 12 && hashear == 1){
|
591
|
592
|
mque.put("hearfile",q.get("mhearfile").toString());
|
592
|
593
|
}else{
|
593
|
594
|
mque.put("hearfile","");
|
|
@@ -595,11 +596,16 @@ public class EPaperStudentService {
|
595
|
596
|
mque.put("score",sontotalsocre);
|
596
|
597
|
mque.put("stuscore",stuscore);
|
597
|
598
|
mque.put("sonques",sonques);
|
|
599
|
+ mqlist.add(mque);
|
598
|
600
|
}
|
599
|
601
|
}
|
600
|
602
|
}
|
601
|
603
|
|
|
604
|
+ }else{
|
|
605
|
+ List<Map> questions = (List<Map>) mt.get("questions");
|
|
606
|
+ mqlist.addAll(questions);
|
602
|
607
|
}
|
|
608
|
+ mt.put("questions",mqlist);
|
603
|
609
|
}
|
604
|
610
|
}
|
605
|
611
|
|