|
@@ -10,31 +10,15 @@ import com.xhkjedu.sexam.mapper.report.ERbaseMapper;
|
10
|
10
|
import com.xhkjedu.sexam.mapper.report.EReportGenerateMapper;
|
11
|
11
|
import com.xhkjedu.sexam.mapper.report.ERrankMapper;
|
12
|
12
|
import com.xhkjedu.sexam.mapper.report.ERsubjectMapper;
|
13
|
|
-import com.xhkjedu.sexam.mapper.reportclass.ERclassComplexityMapper;
|
14
|
|
-import com.xhkjedu.sexam.mapper.reportclass.ERclassMapper;
|
15
|
|
-import com.xhkjedu.sexam.mapper.reportclass.ERclassPointMapper;
|
16
|
|
-import com.xhkjedu.sexam.mapper.reportclass.ERclassQtypeMapper;
|
17
|
|
-import com.xhkjedu.sexam.mapper.reportclass.ERclassQuestionMapper;
|
18
|
|
-import com.xhkjedu.sexam.mapper.reportclass.ERclassRankMapper;
|
19
|
|
-import com.xhkjedu.sexam.mapper.reportstu.ERStudentComplexityMapper;
|
20
|
|
-import com.xhkjedu.sexam.mapper.reportstu.ERstudentMapper;
|
21
|
|
-import com.xhkjedu.sexam.mapper.reportstu.ERstudentPointMapper;
|
22
|
|
-import com.xhkjedu.sexam.mapper.reportstu.ERstudentQtypeMapper;
|
|
13
|
+import com.xhkjedu.sexam.mapper.reportclass.*;
|
|
14
|
+import com.xhkjedu.sexam.mapper.reportstu.*;
|
23
|
15
|
import com.xhkjedu.sexam.mapper.system.UserMapper;
|
24
|
16
|
import com.xhkjedu.sexam.model.paperstudent.EPaperStudentQuestion;
|
25
|
17
|
import com.xhkjedu.sexam.model.report.ERbase;
|
26
|
18
|
import com.xhkjedu.sexam.model.report.ERrank;
|
27
|
19
|
import com.xhkjedu.sexam.model.report.ERsubject;
|
28
|
|
-import com.xhkjedu.sexam.model.reportclass.ERclass;
|
29
|
|
-import com.xhkjedu.sexam.model.reportclass.ERclassComplexity;
|
30
|
|
-import com.xhkjedu.sexam.model.reportclass.ERclassPoint;
|
31
|
|
-import com.xhkjedu.sexam.model.reportclass.ERclassQtype;
|
32
|
|
-import com.xhkjedu.sexam.model.reportclass.ERclassQuestion;
|
33
|
|
-import com.xhkjedu.sexam.model.reportclass.ERclassRank;
|
34
|
|
-import com.xhkjedu.sexam.model.reportstu.ERStudentComplexity;
|
35
|
|
-import com.xhkjedu.sexam.model.reportstu.ERStudentQtype;
|
36
|
|
-import com.xhkjedu.sexam.model.reportstu.ERstudent;
|
37
|
|
-import com.xhkjedu.sexam.model.reportstu.ERstudentPoint;
|
|
20
|
+import com.xhkjedu.sexam.model.reportclass.*;
|
|
21
|
+import com.xhkjedu.sexam.model.reportstu.*;
|
38
|
22
|
import com.xhkjedu.sexam.utils.ExamUtil;
|
39
|
23
|
import com.xhkjedu.sexam.vo.paper.QuestionOrderVo;
|
40
|
24
|
import com.xhkjedu.sexam.vo.paper.QuestionPointVo;
|
|
@@ -49,12 +33,7 @@ import org.springframework.stereotype.Service;
|
49
|
33
|
import org.springframework.transaction.annotation.Transactional;
|
50
|
34
|
|
51
|
35
|
import javax.annotation.Resource;
|
52
|
|
-import java.util.ArrayList;
|
53
|
|
-import java.util.Comparator;
|
54
|
|
-import java.util.DoubleSummaryStatistics;
|
55
|
|
-import java.util.HashMap;
|
56
|
|
-import java.util.List;
|
57
|
|
-import java.util.Map;
|
|
36
|
+import java.util.*;
|
58
|
37
|
import java.util.stream.Collectors;
|
59
|
38
|
|
60
|
39
|
/**
|
|
@@ -106,6 +85,10 @@ public class EReportGenerateService {
|
106
|
85
|
private ERrankMapper eRrankMapper;
|
107
|
86
|
@Resource
|
108
|
87
|
private ERclassRankMapper eRclassRankMapper;
|
|
88
|
+ @Resource
|
|
89
|
+ private ERclassActionMapper eRclassActionMapper;
|
|
90
|
+ @Resource
|
|
91
|
+ private ERstudentActionMapper eRstudentActionMapper;
|
109
|
92
|
|
110
|
93
|
//生成考试报告
|
111
|
94
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -322,6 +305,74 @@ public class EReportGenerateService {
|
322
|
305
|
|
323
|
306
|
setClassQuestion(examid, subjects, classes);//题型试题
|
324
|
307
|
setClassGradeRankAll(examid, papers, classSubjectStudents, createid);//班级等级分布
|
|
308
|
+ setAction(examid, subjectMap);//行为分析
|
|
309
|
+ }
|
|
310
|
+
|
|
311
|
+ //行为分析
|
|
312
|
+ private void setAction(Integer examid, Map<String, String> subjectMap) {
|
|
313
|
+ List<ERstudentAction> studentActions = new ArrayList<>();
|
|
314
|
+ List<ERclassAction> classActions = new ArrayList<>();
|
|
315
|
+ //违纪行为
|
|
316
|
+ List<Map> bads = eReportGenerateMapper.listBadActionByExamId(examid);
|
|
317
|
+ Integer actiontype = 1;
|
|
318
|
+ setActions(examid, subjectMap, studentActions, classActions, bads, actiontype);
|
|
319
|
+ List<Map> goods = eReportGenerateMapper.listGoodActionByExamId(examid);
|
|
320
|
+ actiontype = 2;
|
|
321
|
+ setActions(examid, subjectMap, studentActions, classActions, goods, actiontype);
|
|
322
|
+ if (N_Utils.isListEmpty(studentActions)) return;
|
|
323
|
+ eRstudentActionMapper.insertList(studentActions);
|
|
324
|
+ eRclassActionMapper.insertList(classActions);
|
|
325
|
+ }
|
|
326
|
+
|
|
327
|
+ //处理行为数据
|
|
328
|
+ private void setActions(Integer examid, Map<String, String> subjectMap
|
|
329
|
+ , List<ERstudentAction> studentActions, List<ERclassAction> classActions
|
|
330
|
+ , List<Map> actions, Integer actiontype) {
|
|
331
|
+ if (N_Utils.isListNotEmpty(actions)) {
|
|
332
|
+ for (Map action : actions) {
|
|
333
|
+ action.put("subjectname", subjectMap.get(action.get("subjectid")));
|
|
334
|
+ }
|
|
335
|
+ //学生行为分析
|
|
336
|
+ Map<Integer, List<Map>> collect = actions.stream().collect(Collectors.groupingBy(s -> (Integer) s.get("studentid")));
|
|
337
|
+ for (Map.Entry<Integer, List<Map>> entry : collect.entrySet()) {
|
|
338
|
+ List<Map> list = entry.getValue();
|
|
339
|
+ Map sq = list.get(0);
|
|
340
|
+ ERstudentAction sa = new ERstudentAction();
|
|
341
|
+ sa.setClassid((Integer) sq.get("classid"));
|
|
342
|
+ sa.setStudentid(entry.getKey());
|
|
343
|
+ sa.setExamid(examid);
|
|
344
|
+ sa.setActiontype(actiontype);
|
|
345
|
+ for (Map s : list) {
|
|
346
|
+ s.remove("classid");
|
|
347
|
+ s.remove("studentid");
|
|
348
|
+ }
|
|
349
|
+ String subjectjson = JSON.toJSONString(list);
|
|
350
|
+ sa.setSubjectjson(subjectjson);
|
|
351
|
+ studentActions.add(sa);
|
|
352
|
+ }
|
|
353
|
+
|
|
354
|
+ //班级行为分析
|
|
355
|
+ Map<Integer, List<Map>> ccollect = actions.stream().collect(Collectors.groupingBy(s -> (Integer) s.get("classid")));
|
|
356
|
+ for (Map.Entry<Integer, List<Map>> entry : ccollect.entrySet()) {
|
|
357
|
+ List<Map> subjects = new ArrayList<>();
|
|
358
|
+ Map<String, List<Map>> scollect = entry.getValue().stream().collect(Collectors.groupingBy(s -> s.get("subjectid").toString()));
|
|
359
|
+ for (Map.Entry<String, List<Map>> sentry : scollect.entrySet()) {
|
|
360
|
+ List<Map> list = sentry.getValue();
|
|
361
|
+ Map subject = new HashMap();
|
|
362
|
+ subject.put("subjectid", sentry.getKey());
|
|
363
|
+ subject.put("subjectname", list.get(0).get("subjectname"));
|
|
364
|
+ subject.put("num", list.size());
|
|
365
|
+ subjects.add(subject);
|
|
366
|
+ }
|
|
367
|
+ ERclassAction ca = new ERclassAction();
|
|
368
|
+ ca.setClassid(entry.getKey());
|
|
369
|
+ ca.setExamid(examid);
|
|
370
|
+ ca.setActiontype(actiontype);
|
|
371
|
+ String subjectjson = JSON.toJSONString(subjects);
|
|
372
|
+ ca.setSubjectjson(subjectjson);
|
|
373
|
+ classActions.add(ca);
|
|
374
|
+ }
|
|
375
|
+ }
|
325
|
376
|
}
|
326
|
377
|
|
327
|
378
|
//班级等级分布
|
|
@@ -404,22 +455,14 @@ public class EReportGenerateService {
|
404
|
455
|
}
|
405
|
456
|
|
406
|
457
|
//班级等级分布
|
407
|
|
- private void setClassGradeRank(Integer examid, List<ERPaperVo> papers, List<ERstudent> students
|
|
458
|
+ public void setClassGradeRank(Integer examid, List<ERPaperVo> papers, List<ERstudent> students
|
408
|
459
|
, List<ERrank> rranks, Integer createid) {
|
409
|
460
|
List<Integer> userids = students.stream().map(ERstudent::getStudentid).distinct().collect(Collectors.toList());
|
410
|
461
|
List<UserVo> users = userMapper.listNameByUserIds(userids);
|
411
|
462
|
Map<Integer, String> userMap = users.stream().collect(Collectors.toMap(UserVo::getUserid, UserVo::getUsername));
|
412
|
463
|
|
413
|
|
- Double zfscore = papers.stream().mapToDouble(p -> p.getPscore()).sum();//考试总分
|
414
|
464
|
Map<String, Double> scoreMap = papers.stream().collect(Collectors.toMap(p -> p.getSubjectid(), p -> p.getPscore()));//考试总分
|
415
|
465
|
Double pscore;//试卷总分
|
416
|
|
- List<ERstudent> cstudents = new ArrayList<>();//班级学生
|
417
|
|
- Map<String, List<ERstudent>> cscollect = students.stream().collect(
|
418
|
|
- Collectors.groupingBy(s -> s.getClassid() + "_" + s.getStudentid()));
|
419
|
|
- setStuScore(cscollect, cstudents);
|
420
|
|
- //总分统计
|
421
|
|
- Map<Integer, List<ERstudent>> zfcollect = cstudents.stream().collect(
|
422
|
|
- Collectors.groupingBy(s -> s.getClassid()));
|
423
|
466
|
|
424
|
467
|
List<ERstudent> sstudents = new ArrayList<>();//科目学生
|
425
|
468
|
Map<String, List<ERstudent>> sscollect = students.stream().collect(
|
|
@@ -437,39 +480,21 @@ public class EReportGenerateService {
|
437
|
480
|
for (ERrank rrank : rranks) {
|
438
|
481
|
Double maxrate = rrank.getMaxscore();
|
439
|
482
|
Double minrate = rrank.getMinscore();
|
440
|
|
- //总分统计
|
441
|
|
- double maxscore = ExamUtil.mul(maxrate, zfscore);
|
442
|
|
- double minscore = ExamUtil.mul(minrate, zfscore);
|
443
|
|
- rrank.setMaxscore(maxscore);
|
444
|
|
- rrank.setMinscore(minscore);
|
445
|
|
- rrankList.add(rrank);
|
446
|
|
- String rankname = rrank.getRankname();
|
447
|
|
- String rankrange = "[" + minscore + "," + maxscore;
|
448
|
|
- if (rankname.equals("A")) {
|
449
|
|
- rankrange = rankrange + "]";
|
450
|
|
- } else {
|
451
|
|
- rankrange = rankrange + ")";
|
452
|
|
- }
|
453
|
|
- for (Map.Entry<Integer, List<ERstudent>> entry : zfcollect.entrySet()) {
|
454
|
|
- Integer classid = entry.getKey();
|
455
|
|
- String subjectid = "zf";
|
456
|
|
- List<ERstudent> list = entry.getValue();
|
457
|
|
- setDjTj(examid, userMap, rclassRankList, rrank, rankrange, subjectid, classid, list);
|
458
|
|
- }
|
459
|
483
|
|
460
|
484
|
//分科统计
|
461
|
485
|
for (ERPaperVo paper : papers) {
|
462
|
486
|
String subjectid = paper.getSubjectid();
|
|
487
|
+ rrank.setSubjectid(subjectid);
|
463
|
488
|
pscore = scoreMap.get(subjectid);
|
464
|
|
- maxscore = ExamUtil.mul(maxrate, pscore);
|
465
|
|
- minscore = ExamUtil.mul(minrate, pscore);
|
|
489
|
+ double maxscore = ExamUtil.mul(maxrate, pscore);
|
|
490
|
+ double minscore = ExamUtil.mul(minrate, pscore);
|
466
|
491
|
rrank.setMaxscore(maxscore);
|
467
|
492
|
rrank.setMinscore(minscore);
|
468
|
493
|
ERrank rrank1 = new ERrank();
|
469
|
494
|
BeanUtils.copyProperties(rrank, rrank1);
|
470
|
495
|
rrankList.add(rrank1);
|
471
|
|
- rankrange = "[" + minscore + "," + maxscore;
|
472
|
|
- if (rankname.equals("A")) {
|
|
496
|
+ String rankrange = "[" + minscore + "," + maxscore;
|
|
497
|
+ if (rrank.getRankname().equals("A")) {
|
473
|
498
|
rankrange = rankrange + "]";
|
474
|
499
|
} else {
|
475
|
500
|
rankrange = rankrange + ")";
|
|
@@ -494,34 +519,6 @@ public class EReportGenerateService {
|
494
|
519
|
}
|
495
|
520
|
} else if (ranktype == 2) {//分数段(10分/段)
|
496
|
521
|
Integer linescore = eRrank.getLinescore();
|
497
|
|
- //总分统计
|
498
|
|
- Integer gnum = ExamUtil.divUp(zfscore, linescore);
|
499
|
|
- for (Integer i = 1; i <= gnum; i++) {
|
500
|
|
- ERrank rrank = new ERrank();
|
501
|
|
- rrank.setRanktype(ranktype);
|
502
|
|
- double maxscore = ExamUtil.mul(i, linescore);
|
503
|
|
- double minscore = ExamUtil.mul(i - 1, linescore);
|
504
|
|
- if (maxscore > zfscore) {
|
505
|
|
- maxscore = zfscore;
|
506
|
|
- }
|
507
|
|
- rrank.setMaxscore(maxscore);
|
508
|
|
- rrank.setMinscore(minscore);
|
509
|
|
- String rankrange = "[" + minscore + "," + maxscore;
|
510
|
|
- if (i == gnum) {
|
511
|
|
- rankrange = rankrange + "]";
|
512
|
|
- } else {
|
513
|
|
- rankrange = rankrange + ")";
|
514
|
|
- }
|
515
|
|
- rrank.setRankname(rankrange);
|
516
|
|
- rrankList.add(rrank);
|
517
|
|
-
|
518
|
|
- for (Map.Entry<Integer, List<ERstudent>> entry : zfcollect.entrySet()) {
|
519
|
|
- Integer classid = entry.getKey();
|
520
|
|
- String subjectid = "zf";
|
521
|
|
- List<ERstudent> list = entry.getValue();
|
522
|
|
- setFdTj(examid, userMap, rclassRankList, gnum, i, rrank, rankrange, classid, list);
|
523
|
|
- }
|
524
|
|
- }
|
525
|
522
|
|
526
|
523
|
//分科统计
|
527
|
524
|
for (ERPaperVo paper : papers) {
|
|
@@ -531,10 +528,11 @@ public class EReportGenerateService {
|
531
|
528
|
for (Integer i = 1; i <= cnum; i++) {
|
532
|
529
|
ERrank rrank = new ERrank();
|
533
|
530
|
rrank.setRanktype(ranktype);
|
|
531
|
+ rrank.setSubjectid(subjectid);
|
534
|
532
|
double maxscore = ExamUtil.mul(i, linescore);
|
535
|
533
|
double minscore = ExamUtil.mul(i - 1, linescore);
|
536
|
|
- if (maxscore > zfscore) {
|
537
|
|
- maxscore = zfscore;
|
|
534
|
+ if (maxscore > pscore) {
|
|
535
|
+ maxscore = pscore;
|
538
|
536
|
}
|
539
|
537
|
rrank.setMaxscore(maxscore);
|
540
|
538
|
rrank.setMinscore(minscore);
|
|
@@ -567,47 +565,26 @@ public class EReportGenerateService {
|
567
|
565
|
}
|
568
|
566
|
}
|
569
|
567
|
} else if (ranktype == 3) {//临界分(临界分:总分*80%,浮动分:5分)
|
570
|
|
- Integer linescore1 = eRrank.getLinescore();
|
571
|
|
- Integer linescore = linescore1;
|
|
568
|
+ Integer linescore = eRrank.getLinescore();
|
572
|
569
|
Integer floatscore = eRrank.getFloatscore();
|
573
|
|
- if (N_Utils.isEmptyInteger(linescore)) linescore = (int) (ExamUtil.mul(zfscore, 0.8));
|
574
|
|
- //总分统计
|
575
|
570
|
ERrank rrank = new ERrank();
|
576
|
571
|
rrank.setRanktype(ranktype);
|
577
|
|
- double maxscore = ExamUtil.add(linescore, floatscore);
|
578
|
|
- double minscore = ExamUtil.sub(linescore, floatscore);
|
579
|
|
- if (maxscore > zfscore) maxscore = zfscore;
|
580
|
|
- if (minscore < 0) minscore = 0;
|
581
|
|
- rrank.setMaxscore(maxscore);
|
582
|
|
- rrank.setMinscore(minscore);
|
583
|
|
- rrank.setLinescore(linescore);
|
584
|
|
- rrank.setFloatscore(floatscore);
|
585
|
|
- String rankrange = "[" + minscore + "," + maxscore + "]";
|
586
|
|
- rrank.setRankname(rankrange);
|
587
|
|
- rrankList.add(rrank);
|
588
|
|
-
|
589
|
|
- for (Map.Entry<Integer, List<ERstudent>> entry : zfcollect.entrySet()) {
|
590
|
|
- Integer classid = entry.getKey();
|
591
|
|
- String subjectid = "zf";
|
592
|
|
- List<ERstudent> list = entry.getValue();
|
593
|
|
- setLjfTj(examid, userMap, rclassRankList, rrank, rankrange, classid, subjectid, list);
|
594
|
|
- }
|
595
|
572
|
|
596
|
573
|
//分科统计
|
597
|
574
|
for (ERPaperVo paper : papers) {
|
598
|
575
|
String subjectid = paper.getSubjectid();
|
|
576
|
+ rrank.setSubjectid(subjectid);
|
599
|
577
|
pscore = scoreMap.get(subjectid);
|
600
|
|
- linescore = linescore1;
|
601
|
578
|
if (N_Utils.isEmptyInteger(linescore)) linescore = (int) (ExamUtil.mul(pscore, 0.8));
|
602
|
|
- maxscore = ExamUtil.add(linescore, floatscore);
|
603
|
|
- minscore = ExamUtil.sub(linescore, floatscore);
|
|
579
|
+ double maxscore = ExamUtil.add(linescore, floatscore);
|
|
580
|
+ double minscore = ExamUtil.sub(linescore, floatscore);
|
604
|
581
|
if (maxscore > pscore) maxscore = pscore;
|
605
|
582
|
if (minscore < 0) minscore = 0;
|
606
|
583
|
rrank.setMaxscore(maxscore);
|
607
|
584
|
rrank.setMinscore(minscore);
|
608
|
585
|
rrank.setLinescore(linescore);
|
609
|
586
|
rrank.setFloatscore(floatscore);
|
610
|
|
- rankrange = "[" + minscore + "," + maxscore + "]";
|
|
587
|
+ String rankrange = "[" + minscore + "," + maxscore + "]";
|
611
|
588
|
rrank.setRankname(rankrange);
|
612
|
589
|
ERrank rrank1 = new ERrank();
|
613
|
590
|
BeanUtils.copyProperties(rrank, rrank1);
|
|
@@ -632,42 +609,23 @@ public class EReportGenerateService {
|
632
|
609
|
} else if (ranktype == 4) {//临界名次(临界名次10,浮动名次5)
|
633
|
610
|
Integer linescore = eRrank.getLinescore();
|
634
|
611
|
Integer floatscore = eRrank.getFloatscore();
|
635
|
|
- //总分统计
|
636
|
612
|
ERrank rrank = new ERrank();
|
637
|
613
|
rrank.setRanktype(ranktype);
|
638
|
|
- double maxscore = ExamUtil.sub(linescore, floatscore);//最高名次
|
639
|
|
- double minscore = ExamUtil.add(linescore, floatscore);//最低名次
|
640
|
|
- if (maxscore < 1) maxscore = 1;//最高名次为1
|
641
|
|
- int stunum = (int) students.stream().map(s -> s.getStudentid()).distinct().count();//学生数量
|
642
|
|
- if (minscore > stunum) minscore = stunum;//最低名次=学生数量
|
643
|
|
- rrank.setMaxscore(maxscore);
|
644
|
|
- rrank.setMinscore(minscore);
|
645
|
|
- rrank.setLinescore(linescore);
|
646
|
|
- rrank.setFloatscore(floatscore);
|
647
|
|
- String rankrange = "[" + minscore + "," + maxscore + "]";
|
648
|
|
- rrank.setRankname(rankrange);
|
649
|
|
- rrankList.add(rrank);
|
650
|
|
-
|
651
|
|
- for (Map.Entry<Integer, List<ERstudent>> entry : zfcollect.entrySet()) {
|
652
|
|
- Integer classid = entry.getKey();
|
653
|
|
- String subjectid = "zf";
|
654
|
|
- List<ERstudent> list = entry.getValue();
|
655
|
|
- setLjmcTj(examid, userMap, rclassRankList, rrank, rankrange, classid, subjectid, list);
|
656
|
|
- }
|
657
|
614
|
|
658
|
615
|
//分科统计
|
659
|
616
|
for (ERPaperVo paper : papers) {
|
660
|
617
|
String subjectid = paper.getSubjectid();
|
661
|
|
- maxscore = ExamUtil.sub(linescore, floatscore);//最高名次
|
662
|
|
- minscore = ExamUtil.add(linescore, floatscore);//最低名次
|
|
618
|
+ rrank.setSubjectid(subjectid);
|
|
619
|
+ double maxscore = ExamUtil.sub(linescore, floatscore);//最高名次
|
|
620
|
+ double minscore = ExamUtil.add(linescore, floatscore);//最低名次
|
663
|
621
|
if (maxscore < 1) maxscore = 1;//最高名次为1
|
664
|
|
- stunum = students.size();//学生数量
|
|
622
|
+ Integer stunum = students.size();//学生数量
|
665
|
623
|
if (minscore > stunum) minscore = stunum;//最低名次=学生数量
|
666
|
624
|
rrank.setMaxscore(maxscore);
|
667
|
625
|
rrank.setMinscore(minscore);
|
668
|
626
|
rrank.setLinescore(linescore);
|
669
|
627
|
rrank.setFloatscore(floatscore);
|
670
|
|
- rankrange = "[" + minscore + "," + maxscore + "]";
|
|
628
|
+ String rankrange = "[" + minscore + "," + maxscore + "]";
|
671
|
629
|
rrank.setRankname(rankrange);
|
672
|
630
|
ERrank rrank1 = new ERrank();
|
673
|
631
|
BeanUtils.copyProperties(rrank, rrank1);
|
|
@@ -691,25 +649,19 @@ public class EReportGenerateService {
|
691
|
649
|
}
|
692
|
650
|
} else if (ranktype == 5) {//优秀年级前(10名)
|
693
|
651
|
Integer linescore = eRrank.getLinescore();
|
694
|
|
- //总分统计
|
695
|
652
|
ERrank rrank = new ERrank();
|
696
|
653
|
rrank.setRanktype(ranktype);
|
697
|
654
|
rrank.setLinescore(linescore);
|
698
|
655
|
String rankrange = "年级前" + linescore + "名";
|
699
|
656
|
rrank.setRankname(rankrange);
|
700
|
|
- rrankList.add(rrank);
|
701
|
|
-
|
702
|
|
- for (Map.Entry<Integer, List<ERstudent>> entry : zfcollect.entrySet()) {
|
703
|
|
- Integer classid = entry.getKey();
|
704
|
|
- String subjectid = "zf";
|
705
|
|
- List<ERstudent> list = entry.getValue();
|
706
|
|
- setNjqTj(examid, userMap, rclassRankList, rrank, rankrange, classid, subjectid, list);
|
707
|
|
- }
|
708
|
657
|
|
709
|
658
|
//分科统计
|
710
|
659
|
for (ERPaperVo paper : papers) {
|
711
|
660
|
String subjectid = paper.getSubjectid();
|
712
|
|
-
|
|
661
|
+ rrank.setSubjectid(subjectid);
|
|
662
|
+ ERrank rrank1 = new ERrank();
|
|
663
|
+ BeanUtils.copyProperties(rrank, rrank1);
|
|
664
|
+ rrankList.add(rrank1);
|
713
|
665
|
//全部班级统计
|
714
|
666
|
for (Map.Entry<String, List<ERstudent>> entry : qbbjcollect.entrySet()) {
|
715
|
667
|
Integer classid = 0;
|
|
@@ -728,26 +680,19 @@ public class EReportGenerateService {
|
728
|
680
|
}
|
729
|
681
|
} else if (ranktype == 6) {//学困年级后(10名)
|
730
|
682
|
Integer linescore = eRrank.getLinescore();
|
731
|
|
- //总分统计
|
732
|
683
|
ERrank rrank = new ERrank();
|
733
|
684
|
rrank.setRanktype(ranktype);
|
734
|
685
|
rrank.setLinescore(linescore);
|
735
|
686
|
String rankrange = "年级后" + linescore + "名";
|
736
|
687
|
rrank.setRankname(rankrange);
|
737
|
|
- rrankList.add(rrank);
|
738
|
|
-
|
739
|
|
- for (Map.Entry<Integer, List<ERstudent>> entry : zfcollect.entrySet()) {
|
740
|
|
- Integer classid = entry.getKey();
|
741
|
|
- String subjectid = "zf";
|
742
|
|
- List<ERstudent> list = entry.getValue();
|
743
|
|
- rrank.setMaxscore(getMaxScore(list, linescore));
|
744
|
|
- setNjhTj(examid, userMap, rclassRankList, rrank, rankrange, classid, subjectid, list);
|
745
|
|
- }
|
746
|
688
|
|
747
|
689
|
//分科统计
|
748
|
690
|
for (ERPaperVo paper : papers) {
|
749
|
691
|
String subjectid = paper.getSubjectid();
|
750
|
|
-
|
|
692
|
+ rrank.setSubjectid(subjectid);
|
|
693
|
+ ERrank rrank1 = new ERrank();
|
|
694
|
+ BeanUtils.copyProperties(rrank, rrank1);
|
|
695
|
+ rrankList.add(rrank1);
|
751
|
696
|
//全部班级统计
|
752
|
697
|
for (Map.Entry<String, List<ERstudent>> entry : qbbjcollect.entrySet()) {
|
753
|
698
|
Integer classid = 0;
|