|
@@ -96,7 +96,7 @@ public class ExamStatisticServiceImpl implements ExamStatisticService {
|
|
|
|
|
|
StringBuffer sql = new StringBuffer();
|
|
|
sql.append(" select es.exam_id,es.course_id,es.org_id,es.exam_student_id,");
|
|
|
- sql.append(" es.finished,sc.total_score,d.paper_score");
|
|
|
+ sql.append(" es.finished,sc.total_score,d.paper_score,d.is_illegality as illegality");
|
|
|
sql.append(" from ec_oe_exam_student es");
|
|
|
sql.append(" left join ec_oe_exam_student_final_score sc on sc.exam_student_id = es.exam_student_id");
|
|
|
sql.append(" left join ec_oe_exam_record_data d on d.id = sc.exam_record_data_id");
|
|
@@ -111,7 +111,7 @@ public class ExamStatisticServiceImpl implements ExamStatisticService {
|
|
|
|
|
|
Map<Long, List<ExamStudentScoreInfo>> orgStatisticMaps = list.stream().collect(Collectors.groupingBy(ExamStudentScoreInfo::getOrgId));
|
|
|
for (Map.Entry<Long, List<ExamStudentScoreInfo>> e : orgStatisticMaps.entrySet()) {
|
|
|
- int allCount = 0, finishCount = 0, passScoreCount = 0, goodScoreCount = 0;
|
|
|
+ int allCount = 0, finishCount = 0, passScoreCount = 0, goodScoreCount = 0, illegalityCount = 0;
|
|
|
for (ExamStudentScoreInfo v : e.getValue()) {
|
|
|
allCount++;
|
|
|
|
|
@@ -136,6 +136,10 @@ public class ExamStatisticServiceImpl implements ExamStatisticService {
|
|
|
goodScoreCount++;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (v.getIllegality() != null && v.getIllegality()) {
|
|
|
+ illegalityCount++;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
ExamStatisticEntity result = examStatisticRepo.findByExamIdAndCourseIdAndOrgId(examId, courseId, e.getKey());
|
|
@@ -149,7 +153,7 @@ public class ExamStatisticServiceImpl implements ExamStatisticService {
|
|
|
result.setFinishCount(finishCount);
|
|
|
result.setPassScoreCount(passScoreCount);
|
|
|
result.setGoodScoreCount(goodScoreCount);
|
|
|
- result.setIllegalityCount(0);//todo
|
|
|
+ result.setIllegalityCount(illegalityCount);
|
|
|
result.setUpdateTime(new Date());
|
|
|
examStatisticRepo.save(result);
|
|
|
}
|