|
@@ -30,6 +30,7 @@ import com.xhkjedu.sexam.model.reportstu.ERstudentPoint;
|
30
|
30
|
import com.xhkjedu.sexam.utils.ExamUtil;
|
31
|
31
|
import com.xhkjedu.sexam.vo.paper.EPaperQtypeQuestionVo;
|
32
|
32
|
import com.xhkjedu.sexam.vo.paper.EPaperQtypeVo;
|
|
33
|
+import com.xhkjedu.sexam.vo.paper.QuestionOrderVo;
|
33
|
34
|
import com.xhkjedu.sexam.vo.report.ERClassScoreVo;
|
34
|
35
|
import com.xhkjedu.sexam.vo.report.ERPaperVo;
|
35
|
36
|
import com.xhkjedu.utils.N_Utils;
|
|
@@ -434,141 +435,154 @@ public class EReportGenerateService {
|
434
|
435
|
|
435
|
436
|
//题型、试题、知识点
|
436
|
437
|
private void setClassQuestion(Integer examid,List<Map> subjects,List<Map> classes){
|
437
|
|
- //考试所有学生提交试卷情况
|
|
438
|
+ //考试所有学生提交试卷作答情况
|
438
|
439
|
List<EPaperStudentQuestion> stulist = ePaperStudentQuestionMapper.listExamStudentsAnswer(examid);
|
439
|
440
|
|
440
|
|
- List<ERclassQtype> rtypelist = new ArrayList<>();
|
441
|
|
- List<ERclassQuestion> rqlist = new ArrayList<>();
|
442
|
|
- List<ERclassQuestionPoint> rpointlist = new ArrayList<>();
|
443
|
|
- List<ERStudentQtype> stuqtypes = new ArrayList<>();
|
444
|
|
- List<ERstudentPoint> stupoints = new ArrayList<>();
|
|
441
|
+ List<ERclassQtype> rtypelist = new ArrayList<>();//班级题型
|
|
442
|
+ List<ERclassQuestion> rqueslist = new ArrayList<>();//班级试题
|
|
443
|
+ List<ERclassQuestionPoint> rpointlist = new ArrayList<>();//班级知识点
|
|
444
|
+ List<ERStudentQtype> stutypelist = new ArrayList<>();//学生题型
|
|
445
|
+ List<ERstudentPoint> stupointlist = new ArrayList<>();//学生知识点
|
445
|
446
|
|
446
|
447
|
for(Map map : subjects){
|
447
|
448
|
String subjectid = map.get("subjectid").toString();
|
|
449
|
+ String subjectname = map.get("subjectname").toString();
|
448
|
450
|
Integer epid = Integer.parseInt(map.get("epid").toString());//获取试卷id
|
449
|
451
|
Integer ptype = Integer.parseInt(map.get("ptype").toString());//试卷类型1题库2附件
|
450
|
452
|
Double pscore = Double.parseDouble(map.get("pscore").toString());
|
451
|
|
- List<EPaperQtypeVo> fjtypelist = new ArrayList<>();
|
452
|
|
- if(ptype == 1){
|
453
|
|
- fjtypelist = ePaperQtypeMapper.listPaperQtypeQuestions(epid);//试卷题型试题信息(题库)
|
454
|
|
- setEPaperQtypeForQues(fjtypelist);
|
455
|
|
- }else{
|
456
|
|
- fjtypelist = ePaperQtypeMapper.listPaperQtypeQuesitonsForFj(epid);//试卷题型试题信息(附件)
|
457
|
|
- }
|
458
|
453
|
|
459
|
|
- //获取试卷只是分析
|
460
|
|
- Map epa = ePaperAnalyzeMapper.getPaperAnalzyeByEpid(epid);
|
461
|
|
- String qtypejson = epa.get("qnumjson").toString();//原试卷题型分析
|
462
|
|
- List<Map> qtypelist = JSON.parseArray(qtypejson,Map.class);
|
463
|
|
- for(int k = 0;k<qtypelist.size();k++){
|
464
|
|
-
|
465
|
|
- }
|
|
454
|
+ //获取试卷本身的分析
|
|
455
|
+ Map panalyze = ePaperAnalyzeMapper.getPaperAnalzyeByEpid(epid);
|
|
456
|
+ //获取指定试卷学生作答情况
|
|
457
|
+ List<EPaperStudentQuestion> paperstulist = stulist.stream().filter(s -> s.getEpid().equals(epid)).collect(Collectors.toList());
|
466
|
458
|
|
467
|
|
- //遍及试卷处理题型下各班级得分情况
|
468
|
|
- for(EPaperQtypeVo t : fjtypelist){
|
469
|
|
- Double eptscore = t.getEptscore();
|
470
|
|
- Double tgscore = 0.0;//题型下年级得分
|
471
|
|
- int stunum = 0;
|
472
|
|
- Map<Integer, ERClassScoreVo> tcmap = new HashMap<>();//题型下班级得分
|
473
|
|
- String qnstr = "";
|
474
|
|
- List<EPaperQtypeQuestionVo> questionVos = t.getQuestions();
|
475
|
|
- for(int i=0;i<questionVos.size();i++){
|
476
|
|
- EPaperQtypeQuestionVo q = questionVos.get(i);
|
477
|
|
- if (i ==0){
|
478
|
|
- qnstr = q.getQn();
|
479
|
|
- }else{
|
480
|
|
- qnstr = qnstr + "," + q.getQn();
|
481
|
|
- }
|
|
459
|
+ if(ptype == 1){
|
|
460
|
+ //处理题型下试题
|
482
|
461
|
|
483
|
|
- //获取指定试题试题得分
|
484
|
|
- List<EPaperStudentQuestion> qstu = stulist.stream().filter(o -> o.getEpid().equals(t.getEpid())
|
485
|
|
- && o.getEptqid().equals(q.getEptqid())).collect(Collectors.toList());
|
486
|
|
- if(i == 0){
|
487
|
|
- stunum = qstu.size();
|
488
|
|
- }
|
489
|
|
- EPaperStudentQuestion maxscoreStu = qstu.stream().max(Comparator.comparing(EPaperStudentQuestion::getStuscore)).get();//最高分
|
490
|
|
- Double qgscore = qstu.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
|
491
|
|
- Double qgavgscore = N_Utils.getDoubleDivideAndMulitiply(qgscore,qstu.size());//年级平均分
|
492
|
|
- Double qgsrate = N_Utils.getDoubleDivideAndMulitiply(qgscore,q.getScore() * qstu.size());
|
493
|
|
- tgscore = ExamUtil.add(tgscore,qgscore);
|
|
462
|
+ //处理知识点
|
494
|
463
|
|
495
|
|
- for(Map classm : classes){
|
496
|
|
- Integer classid = Integer.parseInt(classm.get("classid").toString());
|
497
|
|
- List<EPaperStudentQuestion> classStu = qstu.stream().filter(o -> o.getClassid().equals(classid)).collect(Collectors.toList());
|
498
|
|
- EPaperStudentQuestion maxclassstu = classStu.stream().max(Comparator.comparing(EPaperStudentQuestion::getStuscore)).get();//最高分
|
499
|
|
- Double qallstu = classStu.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
|
500
|
|
- Double qcavgscore = N_Utils.getDoubleDivideAndMulitiply(qallstu,classStu.size());//年级平均分
|
501
|
|
- Double qcsrate = N_Utils.getDoubleDivideAndMulitiply(qallstu,q.getScore() * classStu.size());
|
502
|
|
-
|
503
|
|
- ERclassQuestion ercq = new ERclassQuestion();
|
504
|
|
- ercq.setExamid(examid);
|
505
|
|
- ercq.setClassid(classid);
|
506
|
|
- ercq.setSubjectid(subjectid);
|
507
|
|
- ercq.setEptqid(q.getEptqid());
|
508
|
|
- ercq.setQn(q.getQn());
|
509
|
|
- ercq.setQorder(q.getQorder());
|
510
|
|
- if(ptype == 1){
|
511
|
|
- ercq.setComplexity(q.getComplexity());
|
512
|
|
- }
|
513
|
|
- ercq.setClassmaxscore(maxclassstu.getStuscore());
|
514
|
|
- ercq.setClassavgscore(qcavgscore);
|
515
|
|
- ercq.setClasssrate(qcsrate);
|
516
|
|
- ercq.setGrademaxscore(maxscoreStu.getStuscore());
|
517
|
|
- ercq.setGradeavgscore(qgavgscore);
|
518
|
|
- ercq.setGradesrate(qgsrate);
|
519
|
|
- //处理单选题选项情况
|
520
|
|
- Map stuansmap = setPaperQuestionsForStu(q,classStu);
|
521
|
|
- ercq.setAnswerjson(stuansmap.get("answerlist").toString());
|
522
|
|
- ercq.setGoodstujson(stuansmap.get("goodlist").toString());
|
523
|
|
- ercq.setBadstujson(stuansmap.get("badlist").toString());
|
524
|
|
- rqlist.add(ercq);//单个试题统计
|
525
|
|
-
|
526
|
|
- if(tcmap.containsKey(classid)){
|
527
|
|
- ERClassScoreVo erClassScoreVo = tcmap.get(classid);
|
528
|
|
- if(i ==0){
|
529
|
|
- erClassScoreVo.setStunum(classStu.size());
|
530
|
|
- erClassScoreVo.setTcscore(0.0);
|
|
464
|
+ //处理难易度
|
|
465
|
+
|
|
466
|
+ }else{
|
|
467
|
+ //附件试卷,主要处理题型及题型下试题
|
|
468
|
+ String qtypejson = panalyze.get("qnumjson").toString();//原试卷题型分析
|
|
469
|
+ List<Map> qtypelist = JSON.parseArray(qtypejson,Map.class);
|
|
470
|
+ for(int k = 0;k<qtypelist.size();k++){
|
|
471
|
+ Map qtypemap = qtypelist.get(k);
|
|
472
|
+ String qtypename = qtypemap.get("qtypename").toString();
|
|
473
|
+ Double score = Double.parseDouble(qtypemap.get("score").toString());//题型下试题总分值
|
|
474
|
+ Double srate = Double.parseDouble(qtypemap.get("srate").toString());//题型下试题分值占比
|
|
475
|
+ Integer num = Integer.parseInt(qtypemap.get("num").toString());//题型下试题数量
|
|
476
|
+ Map ques = (Map) qtypemap.get("ques");//试题相关对象
|
|
477
|
+ List<Integer> eptqids = (List<Integer>) ques.get("eptqids");//试卷中题型下试题id
|
|
478
|
+ List<String> qns = (List<String>) ques.get("qns");//试卷中试题题号
|
|
479
|
+ List<Integer> orders = (List<Integer>) ques.get("orders");//试卷中试题题号
|
|
480
|
+
|
|
481
|
+ Double tgstuscore = 0.0;
|
|
482
|
+ Double tgscore = 0.0;
|
|
483
|
+ int gstunum = 0;
|
|
484
|
+ Map<Integer,ERClassScoreVo> tclassmap = new HashMap<>();
|
|
485
|
+ Map<Integer,ERStudentQtype> tstumap = new HashMap<>();
|
|
486
|
+
|
|
487
|
+ for(int q = 0;q<eptqids.size();q++){
|
|
488
|
+ Integer eptqid = eptqids.get(q);
|
|
489
|
+ //获取改题所有学生作答情况
|
|
490
|
+ List<EPaperStudentQuestion> qgstulist = paperstulist.stream().filter(s -> s.getEptqid().equals(eptqid)).collect(Collectors.toList());
|
|
491
|
+ gstunum = qgstulist.size();
|
|
492
|
+ EPaperStudentQuestion qgmaxstu = qgstulist.stream().max(Comparator.comparing(EPaperStudentQuestion::getStuscore)).get();
|
|
493
|
+ Double qgscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
|
|
494
|
+ Double qgstuscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
|
|
495
|
+ Double qgavgscore = N_Utils.getDoubleDivideAndMulitiply(qgstuscore,gstunum);//年级平均分
|
|
496
|
+ Double qgsrate = N_Utils.getDoubleDivideAndMulitiply(qgstuscore,qgscore);
|
|
497
|
+ tgscore = ExamUtil.add(tgscore,qgscore);
|
|
498
|
+ tgstuscore = ExamUtil.add(tgstuscore,qgstuscore);
|
|
499
|
+
|
|
500
|
+ //处理试题班级学生作答
|
|
501
|
+ for(Map classm : classes){
|
|
502
|
+ Integer classid = Integer.parseInt(classm.get("classid").toString());
|
|
503
|
+ List<EPaperStudentQuestion> qcstulist = qgstulist.stream().filter( s -> s.getClassid().equals(classid)).collect(Collectors.toList());
|
|
504
|
+ int cstunum = qcstulist.size();//班级下试题作答学生数量
|
|
505
|
+ EPaperStudentQuestion qcmaxstu = qcstulist.stream().max(Comparator.comparing(EPaperStudentQuestion::getStuscore)).get();
|
|
506
|
+ Double qcscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();
|
|
507
|
+ Double qcstuscore = qcstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
|
|
508
|
+ Double qcavgscore = N_Utils.getDoubleDivideAndMulitiply(qcstuscore,cstunum);
|
|
509
|
+ Double qcsrate = N_Utils.getDoubleDivideAndMulitiply(qcstuscore,qcscore);
|
|
510
|
+
|
|
511
|
+ //班级单题情况
|
|
512
|
+ ERclassQuestion ercq = new ERclassQuestion();
|
|
513
|
+ ercq.setExamid(examid);
|
|
514
|
+ ercq.setClassid(classid);
|
|
515
|
+ ercq.setSubjectid(subjectid);
|
|
516
|
+ ercq.setEptqid(eptqid);
|
|
517
|
+ ercq.setQn(qns.get(q));
|
|
518
|
+ ercq.setQorder(orders.get(q));
|
|
519
|
+ ercq.setClassmaxscore(qcmaxstu.getStuscore());
|
|
520
|
+ ercq.setClassavgscore(qcavgscore);
|
|
521
|
+ ercq.setClasssrate(qcsrate);
|
|
522
|
+ ercq.setGrademaxscore(qgmaxstu.getStuscore());
|
|
523
|
+ ercq.setGradeavgscore(qgavgscore);
|
|
524
|
+ ercq.setGradesrate(qgsrate);
|
|
525
|
+ //处理单选题选项情况
|
|
526
|
+ Map stuansmap = setPaperQuestionsForStuAnswer(qcstulist);
|
|
527
|
+ ercq.setAnswerjson(stuansmap.get("answerlist").toString());
|
|
528
|
+ ercq.setGoodstujson(stuansmap.get("goodlist").toString());
|
|
529
|
+ ercq.setBadstujson(stuansmap.get("badlist").toString());
|
|
530
|
+ rqueslist.add(ercq);//单个试题统计
|
|
531
|
+
|
|
532
|
+ if(tclassmap.containsKey(classid)){
|
|
533
|
+ ERClassScoreVo erClassScoreVo = tclassmap.get(classid);
|
|
534
|
+ erClassScoreVo.setStuscore(ExamUtil.add(erClassScoreVo.getStuscore(), qcstuscore));
|
|
535
|
+ erClassScoreVo.setCscore(ExamUtil.add(erClassScoreVo.getStuscore(), qcscore));
|
|
536
|
+ }else{
|
|
537
|
+ ERClassScoreVo erClassScoreVo = new ERClassScoreVo();
|
|
538
|
+ erClassScoreVo.setStunum(cstunum);
|
|
539
|
+ erClassScoreVo.setStuscore(erClassScoreVo.getStuscore());
|
|
540
|
+ erClassScoreVo.setCscore(erClassScoreVo.getStuscore());
|
|
541
|
+ tclassmap.put(classid,erClassScoreVo);
|
531
|
542
|
}
|
532
|
|
- erClassScoreVo.setTcscore(ExamUtil.add(erClassScoreVo.getTcscore(), qallstu));
|
533
|
|
-
|
534
|
|
- }else{
|
535
|
|
- ERClassScoreVo erClassScoreVo = new ERClassScoreVo();
|
536
|
|
- erClassScoreVo.setStunum(classStu.size());
|
537
|
|
- erClassScoreVo.setTcscore(0.0);
|
538
|
|
- erClassScoreVo.setTcscore(ExamUtil.add(erClassScoreVo.getTcscore(), qallstu));
|
539
|
|
- tcmap.put(classid,erClassScoreVo);
|
|
543
|
+ setEPaperQuestionQtypesStu(qcstulist,tstumap);//设置学生题型下得分
|
540
|
544
|
}
|
541
|
545
|
}
|
542
|
|
- }
|
543
|
546
|
|
544
|
|
- Double tgavescore = N_Utils.getDoubleDivideAndMulitiply(tgscore,stunum);//题型下年级平均分
|
545
|
|
- Double tgsrate = N_Utils.getDoubleDivideAndMulitiply(tgscore,eptscore * stunum);//年级得分率
|
546
|
|
-
|
547
|
|
- for(Map.Entry<Integer,ERClassScoreVo> entry : tcmap.entrySet()){
|
548
|
|
- ERClassScoreVo erClassScoreVo = entry.getValue();
|
549
|
|
- ERclassQtype eRclassQtype = new ERclassQtype();
|
550
|
|
- eRclassQtype.setExamid(examid);
|
551
|
|
- eRclassQtype.setSubjectid(subjectid);
|
552
|
|
- eRclassQtype.setEpid(epid);
|
553
|
|
- eRclassQtype.setClassid(entry.getKey());
|
554
|
|
- eRclassQtype.setQtypename(t.getEptname());
|
555
|
|
- eRclassQtype.setScore(eptscore);
|
556
|
|
- eRclassQtype.setNum(t.getEptnum());
|
557
|
|
- eRclassQtype.setSrate(N_Utils.getDoubleDivideAndMulitiply(eptscore,pscore));
|
558
|
|
- eRclassQtype.setGradeavgscore(tgavescore);
|
559
|
|
- eRclassQtype.setGradesrate(tgsrate);
|
560
|
|
- eRclassQtype.setClassavgscore(N_Utils.getDoubleDivideAndMulitiply(erClassScoreVo.getTcscore(),erClassScoreVo.getStunum()));
|
561
|
|
- eRclassQtype.setClasssrate(N_Utils.getDoubleDivideAndMulitiply(erClassScoreVo.getTcscore(),eptscore * erClassScoreVo.getStunum() ));
|
562
|
|
- eRclassQtype.setQns(qnstr);
|
563
|
|
-
|
564
|
|
- rtypelist.add(eRclassQtype);
|
|
547
|
+ Double tgavgscore = N_Utils.getDoubleDivideAndMulitiply(tgstuscore,gstunum);//题型下年级平均分
|
|
548
|
+ Double tgsrate = N_Utils.getDoubleDivideAndMulitiply(tgstuscore,tgscore);//年级得分率
|
|
549
|
+
|
|
550
|
+ //题型--班级得分
|
|
551
|
+ for(Map.Entry<Integer,ERClassScoreVo> entry : tclassmap.entrySet()){
|
|
552
|
+ ERClassScoreVo erClassScoreVo = entry.getValue();
|
|
553
|
+ ERclassQtype eRclassQtype = new ERclassQtype();
|
|
554
|
+ eRclassQtype.setExamid(examid);
|
|
555
|
+ eRclassQtype.setSubjectid(subjectid);
|
|
556
|
+ eRclassQtype.setEpid(epid);
|
|
557
|
+ eRclassQtype.setClassid(entry.getKey());
|
|
558
|
+ eRclassQtype.setQtypename(qtypename);
|
|
559
|
+ eRclassQtype.setScore(score);
|
|
560
|
+ eRclassQtype.setNum(num);
|
|
561
|
+ eRclassQtype.setSrate(srate);
|
|
562
|
+ eRclassQtype.setGradeavgscore(tgavgscore);
|
|
563
|
+ eRclassQtype.setGradesrate(tgsrate);
|
|
564
|
+ eRclassQtype.setClassavgscore(N_Utils.getDoubleDivideAndMulitiply(erClassScoreVo.getStuscore(),erClassScoreVo.getStunum()));
|
|
565
|
+ eRclassQtype.setClasssrate(N_Utils.getDoubleDivideAndMulitiply(erClassScoreVo.getStuscore(),erClassScoreVo.getCscore()));
|
|
566
|
+ eRclassQtype.setQns(qns.stream().map(String::valueOf).collect(Collectors.joining(",")));
|
|
567
|
+ rtypelist.add(eRclassQtype);
|
|
568
|
+ }
|
|
569
|
+
|
|
570
|
+ //题型--学生得分
|
|
571
|
+ for(Map.Entry<Integer,ERStudentQtype> entry : tstumap.entrySet()){
|
|
572
|
+ ERStudentQtype erStudentQtype = entry.getValue();
|
|
573
|
+ erStudentQtype.setExamid(examid);
|
|
574
|
+ erStudentQtype.setSubjectid(subjectid);
|
|
575
|
+ erStudentQtype.setEpid(epid);
|
|
576
|
+ erStudentQtype.setQtypename(qtypename);
|
|
577
|
+ erStudentQtype.setStusrate(N_Utils.getDoubleDivideAndMulitiply(erStudentQtype.getStuscore(),score));
|
|
578
|
+ stutypelist.add(erStudentQtype);
|
|
579
|
+ }
|
565
|
580
|
}
|
566
|
581
|
}
|
567
|
582
|
|
568
|
|
-
|
569
|
583
|
//仅有题库试卷有知识点
|
570
|
584
|
if(ptype == 1){
|
571
|
|
- String pointjson = epa.get("pointjson").toString();
|
|
585
|
+ String pointjson = panalyze.get("pointjson").toString();
|
572
|
586
|
List<Map> pointlist = JSON.parseArray(pointjson,Map.class);
|
573
|
587
|
//遍历知识点处理年级班级知识点情况
|
574
|
588
|
for(int j=0;j<pointlist.size();j++){
|
|
@@ -609,15 +623,15 @@ public class EReportGenerateService {
|
609
|
623
|
rpointlist.add(pointvo);
|
610
|
624
|
}
|
611
|
625
|
|
612
|
|
- setEPaperQuestionPointsStu(gstus,stupoints,subjectid,pointid,pointname);
|
|
626
|
+ setEPaperQuestionPointsStu(gstus,stupointlist,subjectid,pointid,pointname);
|
613
|
627
|
}
|
614
|
628
|
}
|
615
|
629
|
}
|
616
|
630
|
eRclassQtypeMapper.insertList(rtypelist);
|
617
|
|
- eRclassQuestionMapper.insertList(rqlist);
|
|
631
|
+ eRclassQuestionMapper.insertList(rqueslist);
|
618
|
632
|
eRclassQuestionPointMapper.insertList(rpointlist);
|
619
|
|
- eRstudentPointMapper.insertList(stupoints);
|
620
|
|
- eRstudentQtypeMapper.insertList(stuqtypes);
|
|
633
|
+ eRstudentPointMapper.insertList(stupointlist);
|
|
634
|
+ eRstudentQtypeMapper.insertList(stutypelist);
|
621
|
635
|
}
|
622
|
636
|
//处理题库试卷中子母题
|
623
|
637
|
private void setEPaperQtypeForQues(List<EPaperQtypeVo> fjtypelist){
|
|
@@ -680,7 +694,9 @@ public class EReportGenerateService {
|
680
|
694
|
return false;
|
681
|
695
|
}
|
682
|
696
|
//处理学生选项情况和得分情况
|
683
|
|
- private Map setPaperQuestionsForStu(EPaperQtypeQuestionVo q,List<EPaperStudentQuestion> classStu){
|
|
697
|
+ private Map setPaperQuestionsForStuAnswer(List<EPaperStudentQuestion> classStu){
|
|
698
|
+ EPaperStudentQuestion q = classStu.get(0);//取第一条数据
|
|
699
|
+
|
684
|
700
|
Map<String,List<Map>> answermap = new HashMap<>();
|
685
|
701
|
List<Map> goodlist = new ArrayList<>();
|
686
|
702
|
List<Map> badlist = new ArrayList<>();
|
|
@@ -716,9 +732,9 @@ public class EReportGenerateService {
|
716
|
732
|
//主观题
|
717
|
733
|
if(i==0){
|
718
|
734
|
//处理分数分段对应,用于分数段[0,50%) [50%,80%), [80%,100%]
|
719
|
|
- score8 = ExamUtil.getScoreRateScore(q.getScore(),0.8);
|
720
|
|
- score5 = ExamUtil.getScoreRateScore(q.getScore(),0.8);
|
721
|
|
- key1 = score8+"-"+q.getScore();
|
|
735
|
+ score8 = ExamUtil.getScoreRateScore(q.getQscore(),0.8);
|
|
736
|
+ score5 = ExamUtil.getScoreRateScore(q.getQscore(),0.8);
|
|
737
|
+ key1 = score8+"-"+q.getQscore();
|
722
|
738
|
key2 = score8 + "-" + score5;
|
723
|
739
|
key3 = score5 + "-" + 0;
|
724
|
740
|
answermap.put(key1,new ArrayList<>());
|
|
@@ -762,6 +778,20 @@ public class EReportGenerateService {
|
762
|
778
|
return rtnmap;
|
763
|
779
|
}
|
764
|
780
|
|
|
781
|
+ //设置学生题型下试题得分
|
|
782
|
+ private void setEPaperQuestionQtypesStu(List<EPaperStudentQuestion> gstus,Map<Integer,ERStudentQtype> stumap){
|
|
783
|
+ for(EPaperStudentQuestion q : gstus){
|
|
784
|
+ if(stumap.containsKey(q.getStudentid())){
|
|
785
|
+ ERStudentQtype sq = stumap.get(q.getStudentid());
|
|
786
|
+ sq.setStuscore(ExamUtil.add(sq.getStuscore(), q.getStuscore()));
|
|
787
|
+ }else{
|
|
788
|
+ ERStudentQtype sq = new ERStudentQtype();
|
|
789
|
+ sq.setClassid(q.getClassid());
|
|
790
|
+ sq.setStudentid(q.getStudentid());
|
|
791
|
+ sq.setStuscore(q.getStuscore());
|
|
792
|
+ }
|
|
793
|
+ }
|
|
794
|
+ }
|
765
|
795
|
//设置学生知识点关联试题得分
|
766
|
796
|
private void setEPaperQuestionPointsStu(List<EPaperStudentQuestion> gstus,List<ERstudentPoint> stupoints,String subjectid,String pointid,String pointname){
|
767
|
797
|
//把试题按学生进行分组然后进行计算
|
|
@@ -787,9 +817,7 @@ public class EReportGenerateService {
|
787
|
817
|
|
788
|
818
|
|
789
|
819
|
}
|
790
|
|
-
|
791
|
|
- //设置学生题型下试题得分
|
792
|
|
- private void setEPaperQuestionQtypesStu(List<EPaperStudentQuestion> gstus,List<ERstudentPoint> stupoints){
|
793
|
|
-
|
|
820
|
+ //设置学生难易度下试题得分
|
|
821
|
+ private void setEPaperQuestionComplexitysStu(List<EPaperStudentQuestion> gstus,List<ERstudentPoint> stupoints){
|
794
|
822
|
}
|
795
|
823
|
}
|