|
@@ -319,8 +319,8 @@ public class EReportGenerateService {
|
319
|
319
|
Map<String, List<ERclass>> collect = classList.stream().collect(Collectors.groupingBy(c -> c.getSubjectid()));
|
320
|
320
|
for (Map.Entry<String, List<ERclass>> centry : collect.entrySet()) {
|
321
|
321
|
List<Map.Entry<Double, List<ERclass>>> gslist2 = centry.getValue().stream()
|
322
|
|
- .collect(Collectors.groupingBy(ERclass::getClassavgscore)).entrySet()
|
323
|
|
- .stream().sorted((s1, s2) -> -Double.compare(s1.getKey(), s2.getKey())).collect(Collectors.toList());
|
|
322
|
+ .collect(Collectors.groupingBy(ERclass::getClassavgscore)).entrySet()
|
|
323
|
+ .stream().sorted((s1, s2) -> -Double.compare(s1.getKey(), s2.getKey())).collect(Collectors.toList());
|
324
|
324
|
Integer index = 1;
|
325
|
325
|
for (Map.Entry<Double, List<ERclass>> entry : gslist2) {
|
326
|
326
|
for (ERclass rc : entry.getValue()) {
|
|
@@ -373,9 +373,9 @@ public class EReportGenerateService {
|
373
|
373
|
int num = list.size();
|
374
|
374
|
subject.put("num", num);
|
375
|
375
|
subject.put("nrate", N_Utils.getIntegerDivideAndMulitiply(num, znum));
|
376
|
|
- List<Map> students=new ArrayList<>();
|
|
376
|
+ List<Map> students = new ArrayList<>();
|
377
|
377
|
for (Map s : list) {
|
378
|
|
- Map stu=new HashMap();
|
|
378
|
+ Map stu = new HashMap();
|
379
|
379
|
Integer studentid = (Integer) s.get("studentid");
|
380
|
380
|
stu.put("studentid", studentid);
|
381
|
381
|
stu.put("num", s.get("num"));
|
|
@@ -548,7 +548,7 @@ public class EReportGenerateService {
|
548
|
548
|
|
549
|
549
|
//班级科目统计
|
550
|
550
|
Map<Integer, List<ERstudent>> ccollect = students.stream().filter(s -> s.getSubjectid().equals(subjectid))
|
551
|
|
- .collect(Collectors.groupingBy(s -> s.getClassid()));
|
|
551
|
+ .collect(Collectors.groupingBy(s -> s.getClassid()));
|
552
|
552
|
for (Map.Entry<Integer, List<ERstudent>> entry : ccollect.entrySet()) {
|
553
|
553
|
classid = entry.getKey();
|
554
|
554
|
list = entry.getValue();
|
|
@@ -594,7 +594,7 @@ public class EReportGenerateService {
|
594
|
594
|
|
595
|
595
|
//班级科目统计
|
596
|
596
|
Map<Integer, List<ERstudent>> ccollect = students.stream().filter(s -> s.getSubjectid().equals(subjectid))
|
597
|
|
- .collect(Collectors.groupingBy(s -> s.getClassid()));
|
|
597
|
+ .collect(Collectors.groupingBy(s -> s.getClassid()));
|
598
|
598
|
for (Map.Entry<Integer, List<ERstudent>> entry : ccollect.entrySet()) {
|
599
|
599
|
classid = entry.getKey();
|
600
|
600
|
list = entry.getValue();
|
|
@@ -635,7 +635,7 @@ public class EReportGenerateService {
|
635
|
635
|
|
636
|
636
|
//班级科目统计
|
637
|
637
|
Map<Integer, List<ERstudent>> ccollect = students.stream().filter(s -> s.getSubjectid().equals(subjectid))
|
638
|
|
- .collect(Collectors.groupingBy(s -> s.getClassid()));
|
|
638
|
+ .collect(Collectors.groupingBy(s -> s.getClassid()));
|
639
|
639
|
for (Map.Entry<Integer, List<ERstudent>> entry : ccollect.entrySet()) {
|
640
|
640
|
classid = entry.getKey();
|
641
|
641
|
list = entry.getValue();
|
|
@@ -674,7 +674,7 @@ public class EReportGenerateService {
|
674
|
674
|
|
675
|
675
|
//班级科目统计
|
676
|
676
|
Map<Integer, List<ERstudent>> ccollect = students.stream().filter(s -> s.getSubjectid().equals(subjectid))
|
677
|
|
- .collect(Collectors.groupingBy(s -> s.getClassid()));
|
|
677
|
+ .collect(Collectors.groupingBy(s -> s.getClassid()));
|
678
|
678
|
for (Map.Entry<Integer, List<ERstudent>> entry : ccollect.entrySet()) {
|
679
|
679
|
classid = entry.getKey();
|
680
|
680
|
list = entry.getValue();
|
|
@@ -703,7 +703,7 @@ public class EReportGenerateService {
|
703
|
703
|
|
704
|
704
|
//班级科目统计
|
705
|
705
|
Map<Integer, List<ERstudent>> ccollect = students.stream().filter(s -> s.getSubjectid().equals(subjectid))
|
706
|
|
- .collect(Collectors.groupingBy(s -> s.getClassid()));
|
|
706
|
+ .collect(Collectors.groupingBy(s -> s.getClassid()));
|
707
|
707
|
for (Map.Entry<Integer, List<ERstudent>> entry : ccollect.entrySet()) {
|
708
|
708
|
classid = entry.getKey();
|
709
|
709
|
list = entry.getValue();
|
|
@@ -734,7 +734,7 @@ public class EReportGenerateService {
|
734
|
734
|
|
735
|
735
|
//班级科目统计
|
736
|
736
|
Map<Integer, List<ERstudent>> ccollect = students.stream().filter(s -> s.getSubjectid().equals(subjectid))
|
737
|
|
- .collect(Collectors.groupingBy(s -> s.getClassid()));
|
|
737
|
+ .collect(Collectors.groupingBy(s -> s.getClassid()));
|
738
|
738
|
for (Map.Entry<Integer, List<ERstudent>> entry : ccollect.entrySet()) {
|
739
|
739
|
classid = entry.getKey();
|
740
|
740
|
list = entry.getValue();
|
|
@@ -941,7 +941,7 @@ public class EReportGenerateService {
|
941
|
941
|
cr.setStunum(stunum);
|
942
|
942
|
cr.setSturate(N_Utils.getIntegerDivideAndMulitiply(stunum, gstunum));
|
943
|
943
|
setStudentName(list2, userMap);
|
944
|
|
- String stujson = list2.stream().map(s -> s.getStudentname()+"("+s.getSchoolrank()+"名)").sorted().collect(Collectors.joining("、"));
|
|
944
|
+ String stujson = list2.stream().map(s -> s.getStudentname() + "(" + s.getSchoolrank() + "名)").sorted().collect(Collectors.joining("、"));
|
945
|
945
|
cr.setStujson(stujson);
|
946
|
946
|
rclassRankList.add(cr);
|
947
|
947
|
}
|
|
@@ -979,8 +979,8 @@ public class EReportGenerateService {
|
979
|
979
|
//分数排名
|
980
|
980
|
private void setRank(List<ERstudent> students, Map<String, Integer> rank, Integer code) {
|
981
|
981
|
List<Map.Entry<Double, List<ERstudent>>> gslist2 = students.stream()
|
982
|
|
- .collect(Collectors.groupingBy(ERstudent::getScore)).entrySet()
|
983
|
|
- .stream().sorted((s1, s2) -> -Double.compare(s1.getKey(), s2.getKey())).collect(Collectors.toList());
|
|
982
|
+ .collect(Collectors.groupingBy(ERstudent::getScore)).entrySet()
|
|
983
|
+ .stream().sorted((s1, s2) -> -Double.compare(s1.getKey(), s2.getKey())).collect(Collectors.toList());
|
984
|
984
|
Integer index = 1;
|
985
|
985
|
String key;
|
986
|
986
|
for (Map.Entry<Double, List<ERstudent>> entry : gslist2) {
|
|
@@ -1003,12 +1003,11 @@ public class EReportGenerateService {
|
1003
|
1003
|
}
|
1004
|
1004
|
}
|
1005
|
1005
|
|
1006
|
|
-
|
1007
|
1006
|
@Transactional(rollbackFor = Exception.class)
|
1008
|
|
- public void saveClassQuestions(Integer examid){
|
|
1007
|
+ public void saveClassQuestions(Integer examid) {
|
1009
|
1008
|
List<Map> classes = eClassMapper.listByExamId(examid);
|
1010
|
1009
|
List<Map> subjects = eReportGenerateMapper.listSubject(examid);
|
1011
|
|
- setClassQuestion(examid,subjects,classes);
|
|
1010
|
+ setClassQuestion(examid, subjects, classes);
|
1012
|
1011
|
|
1013
|
1012
|
}
|
1014
|
1013
|
|
|
@@ -1061,7 +1060,6 @@ public class EReportGenerateService {
|
1061
|
1060
|
}
|
1062
|
1061
|
}
|
1063
|
1062
|
|
1064
|
|
-
|
1065
|
1063
|
eRclassQtypeMapper.insertList(rtypelist);
|
1066
|
1064
|
eRstudentQtypeMapper.insertList(stutypelist);
|
1067
|
1065
|
eRclassQuestionMapper.insertList(rqueslist);
|
|
@@ -1075,7 +1073,7 @@ public class EReportGenerateService {
|
1075
|
1073
|
private Map setPaperQuestionsForStuAnswer(List<EPaperStudentQuestion> classStu) {
|
1076
|
1074
|
EPaperStudentQuestion q = classStu.get(0);//取第一条数据
|
1077
|
1075
|
|
1078
|
|
- Map<String, List<Map>> answermap = new HashMap<>();
|
|
1076
|
+ Map<String, List<Map>> answermap = null;
|
1079
|
1077
|
List<Map> goodlist = new ArrayList<>();
|
1080
|
1078
|
List<Map> badlist = new ArrayList<>();
|
1081
|
1079
|
|
|
@@ -1092,11 +1090,15 @@ public class EReportGenerateService {
|
1092
|
1090
|
String answeroption = "未作答";
|
1093
|
1091
|
if (N_Utils.isNotEmpty(stuanswer)) {
|
1094
|
1092
|
List<String> stuanswers = JSON.parseArray(stuanswer, String.class);
|
1095
|
|
- if(N_Utils.isListNotEmpty(stuanswers)){
|
|
1093
|
+ if (N_Utils.isListNotEmpty(stuanswers)) {
|
1096
|
1094
|
answeroption = stuanswers.get(0);
|
1097
|
1095
|
}
|
1098
|
1096
|
}
|
1099
|
1097
|
|
|
1098
|
+ if(i == 0){
|
|
1099
|
+ answermap = new TreeMap<>();
|
|
1100
|
+ }
|
|
1101
|
+
|
1100
|
1102
|
Map stumap = new HashMap();
|
1101
|
1103
|
stumap.put("studentid", sq.getStudentid());
|
1102
|
1104
|
stumap.put("stuname", sq.getStuname());
|
|
@@ -1111,12 +1113,16 @@ public class EReportGenerateService {
|
1111
|
1113
|
} else {
|
1112
|
1114
|
//主观题
|
1113
|
1115
|
if (i == 0) {
|
|
1116
|
+ answermap = new LinkedHashMap<>();
|
1114
|
1117
|
//处理分数分段对应,用于分数段[0,50%) [50%,80%), [80%,100%]
|
1115
|
1118
|
score8 = ExamUtil.getScoreRateScore(q.getQscore(), 0.8);
|
1116
|
|
- score5 = ExamUtil.getScoreRateScore(q.getQscore(), 0.8);
|
1117
|
|
- key1 = score8 + "-" + q.getQscore();
|
1118
|
|
- key2 = score8 + "-" + score5;
|
1119
|
|
- key3 = score5 + "-" + 0;
|
|
1119
|
+ score5 = ExamUtil.getScoreRateScore(q.getQscore(), 0.5);
|
|
1120
|
+ String str10 = N_Utils.formatDouble(q.getQscore());
|
|
1121
|
+ String str8 = N_Utils.formatDouble(score8);
|
|
1122
|
+ String str5 = N_Utils.formatDouble(score5);
|
|
1123
|
+ key1 = str8 + "-" + str10;
|
|
1124
|
+ key2 = str5 + "-" + str8;
|
|
1125
|
+ key3 = 0 + "-" + str5;
|
1120
|
1126
|
answermap.put(key1, new ArrayList<>());
|
1121
|
1127
|
answermap.put(key2, new ArrayList<>());
|
1122
|
1128
|
answermap.put(key3, new ArrayList<>());
|
|
@@ -1151,10 +1157,37 @@ public class EReportGenerateService {
|
1151
|
1157
|
}
|
1152
|
1158
|
}
|
1153
|
1159
|
|
|
1160
|
+ String erroroption = "";//高频错误项
|
|
1161
|
+ if (q.getCtype() == 1 || q.getCtype() == 2 || q.getCtype() == 4 || q.getCtype() == 5 || q.getCtype() == 6) {
|
|
1162
|
+ String answer = q.getAnswer();//试题正确答案
|
|
1163
|
+ List<String> answerlist = JSON.parseArray(answer, String.class);
|
|
1164
|
+ int num = 0;
|
|
1165
|
+ for (Map.Entry<String, List<Map>> entry : answermap.entrySet()) {
|
|
1166
|
+ if (!entry.getKey().equalsIgnoreCase(answerlist.get(0))) {
|
|
1167
|
+ //当前选项不是正确答案时,数量大的为高频错误选项
|
|
1168
|
+ if (num < entry.getValue().size()) {
|
|
1169
|
+ num = entry.getValue().size();
|
|
1170
|
+ erroroption = entry.getKey();
|
|
1171
|
+ }
|
|
1172
|
+ }
|
|
1173
|
+ }
|
|
1174
|
+ }
|
|
1175
|
+
|
1154
|
1176
|
Map rtnmap = new HashMap();
|
1155
|
1177
|
rtnmap.put("answerlist", JSON.toJSONString(answermap));
|
1156
|
|
- rtnmap.put("goodlist", JSON.toJSONString(goodlist));
|
|
1178
|
+ if(goodlist.size()>0){
|
|
1179
|
+ rtnmap.put("goodlist", JSON.toJSONString(goodlist));
|
|
1180
|
+ }else{
|
|
1181
|
+ rtnmap.put("goodlist", "");
|
|
1182
|
+ }
|
|
1183
|
+ if(badlist.size()>0){
|
|
1184
|
+ rtnmap.put("badlist", JSON.toJSONString(badlist));
|
|
1185
|
+ }else{
|
|
1186
|
+ rtnmap.put("badlist", "");
|
|
1187
|
+ }
|
|
1188
|
+
|
1157
|
1189
|
rtnmap.put("badlist", JSON.toJSONString(badlist));
|
|
1190
|
+ rtnmap.put("erroroption",erroroption);
|
1158
|
1191
|
return rtnmap;
|
1159
|
1192
|
}
|
1160
|
1193
|
|
|
@@ -1224,8 +1257,14 @@ public class EReportGenerateService {
|
1224
|
1257
|
//处理单选题选项情况
|
1225
|
1258
|
Map stuansmap = setPaperQuestionsForStuAnswer(qcstulist);
|
1226
|
1259
|
ercq.setAnswerjson(stuansmap.get("answerlist").toString());
|
1227
|
|
- ercq.setGoodstujson(stuansmap.get("goodlist").toString());
|
1228
|
|
- ercq.setBadstujson(stuansmap.get("badlist").toString());
|
|
1260
|
+ if(N_Utils.isNotEmpty(stuansmap.get("goodlist"))){
|
|
1261
|
+ ercq.setGoodstujson(stuansmap.get("goodlist").toString());
|
|
1262
|
+ }
|
|
1263
|
+ if(N_Utils.isNotEmpty(stuansmap.get("badlist"))){
|
|
1264
|
+ ercq.setBadstujson(stuansmap.get("badlist").toString());
|
|
1265
|
+ }
|
|
1266
|
+
|
|
1267
|
+ ercq.setErroroption(stuansmap.get("erroroption").toString());
|
1229
|
1268
|
rqueslist.add(ercq);//单个试题统计
|
1230
|
1269
|
|
1231
|
1270
|
if (tclassmap.containsKey(classid)) {
|
|
@@ -1249,7 +1288,7 @@ public class EReportGenerateService {
|
1249
|
1288
|
sq.setClassid(psq.getClassid());
|
1250
|
1289
|
sq.setStudentid(psq.getStudentid());
|
1251
|
1290
|
sq.setStuscore(psq.getStuscore());
|
1252
|
|
- tstumap.put(psq.getStudentid(),sq);
|
|
1291
|
+ tstumap.put(psq.getStudentid(), sq);
|
1253
|
1292
|
}
|
1254
|
1293
|
}
|
1255
|
1294
|
}
|
|
@@ -1362,8 +1401,13 @@ public class EReportGenerateService {
|
1362
|
1401
|
//处理单选题选项情况
|
1363
|
1402
|
Map stuansmap = setPaperQuestionsForStuAnswer(sqcstulist);
|
1364
|
1403
|
ercq.setAnswerjson(stuansmap.get("answerlist").toString());
|
1365
|
|
- ercq.setGoodstujson(stuansmap.get("goodlist").toString());
|
1366
|
|
- ercq.setBadstujson(stuansmap.get("badlist").toString());
|
|
1404
|
+ if(N_Utils.isNotEmpty(stuansmap.get("goodlist"))){
|
|
1405
|
+ ercq.setGoodstujson(stuansmap.get("goodlist").toString());
|
|
1406
|
+ }
|
|
1407
|
+ if(N_Utils.isNotEmpty(stuansmap.get("badlist"))){
|
|
1408
|
+ ercq.setBadstujson(stuansmap.get("badlist").toString());
|
|
1409
|
+ }
|
|
1410
|
+ ercq.setErroroption(stuansmap.get("erroroption").toString());
|
1367
|
1411
|
rqueslist.add(ercq);//单个试题统计
|
1368
|
1412
|
}
|
1369
|
1413
|
}
|
|
@@ -1443,7 +1487,7 @@ public class EReportGenerateService {
|
1443
|
1487
|
sq.setClassid(psq.getClassid());
|
1444
|
1488
|
sq.setStudentid(psq.getStudentid());
|
1445
|
1489
|
sq.setStuscore(psq.getStuscore());
|
1446
|
|
- tstumap.put(psq.getStudentid(),sq);
|
|
1490
|
+ tstumap.put(psq.getStudentid(), sq);
|
1447
|
1491
|
}
|
1448
|
1492
|
}
|
1449
|
1493
|
}
|
|
@@ -1504,21 +1548,21 @@ public class EReportGenerateService {
|
1504
|
1548
|
for (int i = 0; i < quepointlist.size(); i++) {
|
1505
|
1549
|
QuestionPointVo qpoint = quepointlist.get(i);
|
1506
|
1550
|
List<Map> points = qpoint.getPointids();
|
1507
|
|
- if(N_Utils.isListNotEmpty(points)){
|
1508
|
|
- if(qpoint.getQlevel()==1 || !N_Utils.isEmptyInteger(qpoint.getEptqid())){
|
|
1551
|
+ if (N_Utils.isListNotEmpty(points)) {
|
|
1552
|
+ if (qpoint.getQlevel() == 1 || !N_Utils.isEmptyInteger(qpoint.getEptqid())) {
|
1509
|
1553
|
//说明本题为单题,获取该题下所有学生的得分情况
|
1510
|
1554
|
List<EPaperStudentQuestion> stuqueslist = paperstulist.stream().filter(s -> s.getEptqid().equals(qpoint.getEptqid())).collect(Collectors.toList());
|
1511
|
|
- for(EPaperStudentQuestion sq : stuqueslist){
|
1512
|
|
- setEPaperQuestionPointsForStuQues(gradestulist,sq,points,qpoint.getEptqid().toString());
|
|
1555
|
+ for (EPaperStudentQuestion sq : stuqueslist) {
|
|
1556
|
+ setEPaperQuestionPointsForStuQues(gradestulist, sq, points, qpoint.getEptqid().toString());
|
1513
|
1557
|
}
|
1514
|
|
- }else{
|
|
1558
|
+ } else {
|
1515
|
1559
|
//说明该题为复合题,获取所有子题
|
1516
|
1560
|
List<Integer> eptqids = qpoint.getEptqids();
|
1517
|
1561
|
String eptqidsStr = eptqids.stream().map(String::valueOf).collect(Collectors.joining(","));
|
1518
|
|
- List<EPaperStudentQuestion> stuqueslist = paperstulist.stream().filter(s ->eptqids.contains(s.getEptqid())).collect(Collectors.toList());
|
|
1562
|
+ List<EPaperStudentQuestion> stuqueslist = paperstulist.stream().filter(s -> eptqids.contains(s.getEptqid())).collect(Collectors.toList());
|
1519
|
1563
|
//根据每个学生分组获取每个学生该题分值
|
1520
|
|
- Map<Integer,List<EPaperStudentQuestion>> stuquesmap = stuqueslist.stream().collect(Collectors.groupingBy(EPaperStudentQuestion::getStudentid));
|
1521
|
|
- for(Map.Entry<Integer,List<EPaperStudentQuestion>> entry : stuquesmap.entrySet()){
|
|
1564
|
+ Map<Integer, List<EPaperStudentQuestion>> stuquesmap = stuqueslist.stream().collect(Collectors.groupingBy(EPaperStudentQuestion::getStudentid));
|
|
1565
|
+ for (Map.Entry<Integer, List<EPaperStudentQuestion>> entry : stuquesmap.entrySet()) {
|
1522
|
1566
|
List<EPaperStudentQuestion> stuques = entry.getValue();
|
1523
|
1567
|
Double stuscore = stuques.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();
|
1524
|
1568
|
EPaperStudentQuestion sqfirst = stuques.get(0);
|
|
@@ -1526,14 +1570,14 @@ public class EReportGenerateService {
|
1526
|
1570
|
sq.setStudentid(entry.getKey());
|
1527
|
1571
|
sq.setClassid(sqfirst.getClassid());
|
1528
|
1572
|
sq.setStuscore(stuscore);
|
1529
|
|
- setEPaperQuestionPointsForStuQues(gradestulist,sq,points,eptqidsStr);
|
|
1573
|
+ setEPaperQuestionPointsForStuQues(gradestulist, sq, points, eptqidsStr);
|
1530
|
1574
|
}
|
1531
|
1575
|
}
|
1532
|
1576
|
}
|
1533
|
1577
|
}
|
1534
|
1578
|
List<Map> classes = examPaperClassVo.getClasses();
|
1535
|
1579
|
//根据试卷知识点分析进行生成学生、班级、年级知识点分析
|
1536
|
|
- for(Map map : pointlist){
|
|
1580
|
+ for (Map map : pointlist) {
|
1537
|
1581
|
String pointid = map.get("pointid").toString();
|
1538
|
1582
|
String pointname = map.get("pointname").toString();
|
1539
|
1583
|
Double pointscore = Double.parseDouble(map.get("score").toString());
|
|
@@ -1545,8 +1589,8 @@ public class EReportGenerateService {
|
1545
|
1589
|
List<ERPointStuScoreVo> gradepointstulist = gradestulist.stream().filter(s -> s.getPointid().equals(pointid)).collect(Collectors.toList());
|
1546
|
1590
|
|
1547
|
1591
|
List<ERPointStuScoreVo> pointstuscorelist = new ArrayList<>(); //知识点下多个试题,处理成单个学生总分值情况
|
1548
|
|
- Map<Integer,List<ERPointStuScoreVo>> pointstuscoremap = gradepointstulist.stream().collect(Collectors.groupingBy(ERPointStuScoreVo::getStudentid));
|
1549
|
|
- for(Map.Entry<Integer,List<ERPointStuScoreVo>> entry : pointstuscoremap.entrySet()){
|
|
1592
|
+ Map<Integer, List<ERPointStuScoreVo>> pointstuscoremap = gradepointstulist.stream().collect(Collectors.groupingBy(ERPointStuScoreVo::getStudentid));
|
|
1593
|
+ for (Map.Entry<Integer, List<ERPointStuScoreVo>> entry : pointstuscoremap.entrySet()) {
|
1550
|
1594
|
List<ERPointStuScoreVo> stuscorelist = entry.getValue();
|
1551
|
1595
|
Double stuscore = stuscorelist.stream().mapToDouble(ERPointStuScoreVo::getStuscore).sum();
|
1552
|
1596
|
ERPointStuScoreVo sscorevofirst = stuscorelist.get(0);
|
|
@@ -1558,16 +1602,16 @@ public class EReportGenerateService {
|
1558
|
1602
|
}
|
1559
|
1603
|
|
1560
|
1604
|
Double gstuscore = pointstuscorelist.stream().mapToDouble(ERPointStuScoreVo::getStuscore).sum();
|
1561
|
|
- Double gavgscore = N_Utils.getDoubleDivideForAvg(gstuscore,pointstuscorelist.size());
|
1562
|
|
- Double gsrate = N_Utils.getDoubleDivideAndMulitiply(gstuscore,pointscore * pointstuscorelist.size());
|
|
1605
|
+ Double gavgscore = N_Utils.getDoubleDivideForAvg(gstuscore, pointstuscorelist.size());
|
|
1606
|
+ Double gsrate = N_Utils.getDoubleDivideAndMulitiply(gstuscore, pointscore * pointstuscorelist.size());
|
1563
|
1607
|
|
1564
|
|
- for(Map classm : classes){
|
|
1608
|
+ for (Map classm : classes) {
|
1565
|
1609
|
Integer classid = Integer.parseInt(classm.get("classid").toString());
|
1566
|
|
- List<ERPointStuScoreVo> classpointstulist = pointstuscorelist.stream().filter(s->s.getClassid().equals(classid)).collect(Collectors.toList());
|
|
1610
|
+ List<ERPointStuScoreVo> classpointstulist = pointstuscorelist.stream().filter(s -> s.getClassid().equals(classid)).collect(Collectors.toList());
|
1567
|
1611
|
Double cstuscore = classpointstulist.stream().mapToDouble(ERPointStuScoreVo::getStuscore).sum();
|
1568
|
1612
|
// Double cscore = classpointstulist.stream().mapToDouble(ERPointStuScoreVo::getScore).sum();
|
1569
|
|
- Double cavgscore = N_Utils.getDoubleDivideForAvg(cstuscore,classpointstulist.size());
|
1570
|
|
- Double csrate = N_Utils.getDoubleDivideAndMulitiply(cstuscore,pointscore * classpointstulist.size());
|
|
1613
|
+ Double cavgscore = N_Utils.getDoubleDivideForAvg(cstuscore, classpointstulist.size());
|
|
1614
|
+ Double csrate = N_Utils.getDoubleDivideAndMulitiply(cstuscore, pointscore * classpointstulist.size());
|
1571
|
1615
|
|
1572
|
1616
|
ERclassPoint eRclassPoint = new ERclassPoint();
|
1573
|
1617
|
eRclassPoint.setExamid(examPaperClassVo.getExamid());
|
|
@@ -1588,7 +1632,7 @@ public class EReportGenerateService {
|
1588
|
1632
|
cpointlist.add(eRclassPoint);
|
1589
|
1633
|
|
1590
|
1634
|
//遍历单个学生
|
1591
|
|
- for(ERPointStuScoreVo stu : classpointstulist){
|
|
1635
|
+ for (ERPointStuScoreVo stu : classpointstulist) {
|
1592
|
1636
|
ERstudentPoint erstupoint = new ERstudentPoint();
|
1593
|
1637
|
erstupoint.setExamid(examPaperClassVo.getExamid());
|
1594
|
1638
|
erstupoint.setSubjectid(examPaperClassVo.getSubjectid());
|
|
@@ -1598,7 +1642,7 @@ public class EReportGenerateService {
|
1598
|
1642
|
erstupoint.setPointid(pointid);
|
1599
|
1643
|
erstupoint.setPointname(pointname);
|
1600
|
1644
|
erstupoint.setStuscore(stu.getStuscore());
|
1601
|
|
- erstupoint.setStusrate(N_Utils.getDoubleDivideAndMulitiply(stu.getStuscore(),pointscore));
|
|
1645
|
+ erstupoint.setStusrate(N_Utils.getDoubleDivideAndMulitiply(stu.getStuscore(), pointscore));
|
1602
|
1646
|
stupointlist.add(erstupoint);
|
1603
|
1647
|
}
|
1604
|
1648
|
}
|
|
@@ -1607,9 +1651,10 @@ public class EReportGenerateService {
|
1607
|
1651
|
|
1608
|
1652
|
|
1609
|
1653
|
}
|
|
1654
|
+
|
1610
|
1655
|
//题型、试题、知识点、难易度--知识点:设置每个学生每个试题知识点得分
|
1611
|
|
- private void setEPaperQuestionPointsForStuQues(List<ERPointStuScoreVo> gradestulist,EPaperStudentQuestion sq,List<Map> points,String eptqids){
|
1612
|
|
- if(points.size() == 1){
|
|
1656
|
+ private void setEPaperQuestionPointsForStuQues(List<ERPointStuScoreVo> gradestulist, EPaperStudentQuestion sq, List<Map> points, String eptqids) {
|
|
1657
|
+ if (points.size() == 1) {
|
1613
|
1658
|
Map pointmap = points.get(0);
|
1614
|
1659
|
//说明该试题仅有一个知识点得分直接为改知识点分值
|
1615
|
1660
|
ERPointStuScoreVo pscvo = new ERPointStuScoreVo();
|
|
@@ -1620,10 +1665,10 @@ public class EReportGenerateService {
|
1620
|
1665
|
pscvo.setPointid(pointid);
|
1621
|
1666
|
pscvo.setEptqids(eptqids);
|
1622
|
1667
|
gradestulist.add(pscvo);
|
1623
|
|
- }else{
|
|
1668
|
+ } else {
|
1624
|
1669
|
//计算每个知识点所占分值(平均分配)
|
1625
|
|
- Double[] avgps = ExamUtil.getPointAvgScore(points.size(),sq.getStuscore());
|
1626
|
|
- for(int j=0;j<points.size();j++){
|
|
1670
|
+ Double[] avgps = ExamUtil.getPointAvgScore(points.size(), sq.getStuscore());
|
|
1671
|
+ for (int j = 0; j < points.size(); j++) {
|
1627
|
1672
|
Map pointmap = points.get(j);
|
1628
|
1673
|
ERPointStuScoreVo pscvo = new ERPointStuScoreVo();
|
1629
|
1674
|
pscvo.setClassid(sq.getClassid());
|
|
@@ -1631,9 +1676,9 @@ public class EReportGenerateService {
|
1631
|
1676
|
String pointid = pointmap.get("pointid").toString();
|
1632
|
1677
|
pscvo.setPointid(pointid);
|
1633
|
1678
|
pscvo.setEptqids(eptqids);
|
1634
|
|
- if(avgps.length == 2 && (j+1) == points.size()){
|
|
1679
|
+ if (avgps.length == 2 && (j + 1) == points.size()) {
|
1635
|
1680
|
pscvo.setStuscore(avgps[1]);
|
1636
|
|
- }else{
|
|
1681
|
+ } else {
|
1637
|
1682
|
pscvo.setStuscore(avgps[0]);
|
1638
|
1683
|
}
|
1639
|
1684
|
|
|
@@ -1662,9 +1707,9 @@ public class EReportGenerateService {
|
1662
|
1707
|
}
|
1663
|
1708
|
|
1664
|
1709
|
List<EPaperStudentQuestion> levelstuquelist = new ArrayList<>();//难易度下所有试题
|
1665
|
|
- for(Integer eptqid : leveleptqids){
|
1666
|
|
- List<EPaperStudentQuestion> petqqueslit = paperstulist.stream().filter(s -> eptqid.equals(s.getEptqid())).collect(Collectors.toList());
|
1667
|
|
- levelstuquelist.addAll(petqqueslit);
|
|
1710
|
+ for (Integer eptqid : leveleptqids) {
|
|
1711
|
+ List<EPaperStudentQuestion> petqqueslit = paperstulist.stream().filter(s -> eptqid.equals(s.getEptqid())).collect(Collectors.toList());
|
|
1712
|
+ levelstuquelist.addAll(petqqueslit);
|
1668
|
1713
|
}
|
1669
|
1714
|
|
1670
|
1715
|
List<EPaperStudentQuestion> qgstulist = new ArrayList<>();//每个学生难易度下得分
|
|
@@ -1693,8 +1738,8 @@ public class EReportGenerateService {
|
1693
|
1738
|
stucomplist.add(stucomp);
|
1694
|
1739
|
}
|
1695
|
1740
|
|
1696
|
|
- Double tgstuscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion :: getStuscore).sum();//难易度下学生得分
|
1697
|
|
- Double tgscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion :: getQscore).sum();//难易度下试题总分
|
|
1741
|
+ Double tgstuscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getStuscore).sum();//难易度下学生得分
|
|
1742
|
+ Double tgscore = qgstulist.stream().mapToDouble(EPaperStudentQuestion::getQscore).sum();//难易度下试题总分
|
1698
|
1743
|
Double tgsrate = N_Utils.getDoubleDivideAndMulitiply(tgstuscore, tgscore);//年级得分率
|
1699
|
1744
|
|
1700
|
1745
|
for (Map classm : classes) {
|