|
@@ -14,7 +14,6 @@ import com.xhkjedu.sexam.vo.paper.*;
|
14
|
14
|
import com.xhkjedu.utils.N_Utils;
|
15
|
15
|
import com.xhkjedu.vo.ResultVo;
|
16
|
16
|
import lombok.extern.slf4j.Slf4j;
|
17
|
|
-import org.springframework.beans.BeanUtils;
|
18
|
17
|
import org.springframework.beans.factory.annotation.Autowired;
|
19
|
18
|
import org.springframework.stereotype.Service;
|
20
|
19
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -266,6 +265,7 @@ public class EPaperQtypeService {
|
266
|
265
|
mq.setComplexity(qobj.getMcomplexity());
|
267
|
266
|
mq.setQorder(qobj.getQorder());
|
268
|
267
|
mq.setScore(score);
|
|
268
|
+ mq.setQtypename(qobj.getMqtypename());
|
269
|
269
|
if(k == 0){
|
270
|
270
|
mq.setMctype(111);
|
271
|
271
|
}else{
|
|
@@ -293,9 +293,9 @@ public class EPaperQtypeService {
|
293
|
293
|
|
294
|
294
|
//试题题型分析数据
|
295
|
295
|
double storerate = N_Utils.getDoubleDivideAndMulitiply(qt.getEptscore(), ePaper.getPscore());
|
296
|
|
- Map tmap = new HashMap();
|
297
|
|
- tmap.put("qtname",qt.getEptname());
|
|
296
|
+ Map tmap = new TreeMap();
|
298
|
297
|
tmap.put("qtid",qt.getEptid());
|
|
298
|
+ tmap.put("qtname",qt.getEptname());
|
299
|
299
|
tmap.put("num",qt.getEptnum());
|
300
|
300
|
tmap.put("score",qt.getEptscore());
|
301
|
301
|
tmap.put("srate",storerate);
|
|
@@ -325,7 +325,7 @@ public class EPaperQtypeService {
|
325
|
325
|
zgq.setScore(N_Utils.getDoubleReduce(ePaper.getPscore(),ktscore));
|
326
|
326
|
zgq.setSrate(N_Utils.getDoubleReduce(100.0,ktsrate));
|
327
|
327
|
ranglist.add(zgq);
|
328
|
|
- Map ztmap = new HashMap<>();
|
|
328
|
+ Map ztmap = new TreeMap<>();
|
329
|
329
|
ztmap.put("pnum", ePaper.getPnum());
|
330
|
330
|
ztmap.put("pscore",ePaper.getPscore());
|
331
|
331
|
ztmap.put("ranglist",ranglist);
|
|
@@ -338,7 +338,7 @@ public class EPaperQtypeService {
|
338
|
338
|
List<QuestionOrderVo> pgblist = entry.getValue();
|
339
|
339
|
Double score = pgblist.stream().mapToDouble(s -> s.getScore()).sum();
|
340
|
340
|
Double srate = N_Utils.getDoubleDivideAndMulitiply(score,ePaper.getPscore());
|
341
|
|
- Map prate = new HashMap();
|
|
341
|
+ Map prate = new TreeMap();
|
342
|
342
|
prate.put("level",Integer.parseInt(entry.getKey()));
|
343
|
343
|
prate.put("score",score);
|
344
|
344
|
prate.put("srate",srate);
|
|
@@ -357,7 +357,7 @@ public class EPaperQtypeService {
|
357
|
357
|
//获取知识点的总分
|
358
|
358
|
Double score = pgblist.stream().mapToDouble(s -> s.getScore()).sum();
|
359
|
359
|
Double srate = N_Utils.getDoubleDivideAndMulitiply(score,ePaper.getPscore());
|
360
|
|
- Map prate = new HashMap();
|
|
360
|
+ Map prate = new TreeMap();
|
361
|
361
|
prate.put("pointid",entry.getKey());
|
362
|
362
|
prate.put("pointname",pgblist.get(0).getName());
|
363
|
363
|
prate.put("score",score);
|
|
@@ -518,6 +518,7 @@ public class EPaperQtypeService {
|
518
|
518
|
QuestionOrderVo qtype = new QuestionOrderVo();
|
519
|
519
|
qtype.setId(dq.getQtypeid());
|
520
|
520
|
qtype.setName(dq.getQtypename());
|
|
521
|
+ qtype.setComplexity(dq.getComplexity());
|
521
|
522
|
qtype.setOrder(dq.getQorder());
|
522
|
523
|
qtype.setScore(dq.getScore());
|
523
|
524
|
qtype.setQlevel(dq.getQlevel());
|
|
@@ -584,14 +585,14 @@ public class EPaperQtypeService {
|
584
|
585
|
double kscorerate = N_Utils.getDoubleReduce(100.0,zscorerate);
|
585
|
586
|
|
586
|
587
|
List<Map> ranglist = new ArrayList<>();
|
587
|
|
- Map zgmap = new HashMap();
|
|
588
|
+ Map zgmap = new TreeMap();
|
588
|
589
|
zgmap.put("qtname","主观题");
|
589
|
590
|
zgmap.put("score",zscore);
|
590
|
591
|
zgmap.put("num",znum);
|
591
|
592
|
zgmap.put("srate",zscorerate);
|
592
|
593
|
zgmap.put("nrate",znumrate);
|
593
|
594
|
ranglist.add(zgmap);
|
594
|
|
- Map kgmap = new HashMap();
|
|
595
|
+ Map kgmap = new TreeMap();
|
595
|
596
|
kgmap.put("qtname","客观题");
|
596
|
597
|
kgmap.put("score",kscore);
|
597
|
598
|
kgmap.put("num",knum);
|
|
@@ -599,7 +600,7 @@ public class EPaperQtypeService {
|
599
|
600
|
kgmap.put("nrate",knumrate);
|
600
|
601
|
ranglist.add(kgmap);
|
601
|
602
|
|
602
|
|
- Map ztmap = new HashMap<>();
|
|
603
|
+ Map ztmap = new TreeMap<>();
|
603
|
604
|
ztmap.put("pnum", ePaper.getPnum());
|
604
|
605
|
ztmap.put("pscore",ePaper.getPscore());
|
605
|
606
|
ztmap.put("ranglist",ranglist);
|
|
@@ -618,22 +619,27 @@ public class EPaperQtypeService {
|
618
|
619
|
List<Integer> orderlist = new ArrayList<>();
|
619
|
620
|
List<Integer> eptqidlist = new ArrayList<>();
|
620
|
621
|
List<String> qnlist = new ArrayList<>();
|
621
|
|
-
|
|
622
|
+ List<Double> scorelist = new ArrayList<>();
|
|
623
|
+ List<String> qnamelist = new ArrayList<>();
|
622
|
624
|
for(EPaperQtype t : aq){
|
623
|
625
|
List<EPaperQtypeQuestion> qlist = t.getQuestions();
|
624
|
626
|
for(EPaperQtypeQuestion q : qlist){
|
625
|
627
|
orderlist.add(q.getQorder());
|
626
|
628
|
eptqidlist.add(q.getId());
|
627
|
629
|
qnlist.add(q.getQn());
|
|
630
|
+ scorelist.add(q.getScore());
|
|
631
|
+ qnamelist.add(q.getQtypename());
|
628
|
632
|
}
|
629
|
633
|
}
|
630
|
634
|
|
631
|
|
- Map anmap = new HashMap();//题型对应试题的id和基础信息
|
|
635
|
+ Map anmap = new TreeMap();//题型对应试题的id和基础信息
|
632
|
636
|
anmap.put("orders",orderlist);
|
633
|
637
|
anmap.put("eptqids",eptqidlist);
|
634
|
638
|
anmap.put("qns",qnlist);
|
|
639
|
+ anmap.put("scores",scorelist);
|
|
640
|
+ anmap.put("qtypenames",qnamelist);
|
635
|
641
|
|
636
|
|
- Map tmap = new HashMap();
|
|
642
|
+ Map tmap = new TreeMap();
|
637
|
643
|
tmap.put("qtname",entry.getKey());
|
638
|
644
|
tmap.put("qtid",aq.get(0).getEptid());
|
639
|
645
|
tmap.put("num",num);
|