|
@@ -99,7 +99,8 @@ 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,d.is_illegality as illegality");
|
|
|
+ sql.append(" es.finished,sc.total_score,d.paper_score,d.is_illegality as illegality,");
|
|
|
+ sql.append(" d.id as exam_record_data_id");
|
|
|
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");
|
|
@@ -119,29 +120,31 @@ public class ExamStatisticServiceImpl implements ExamStatisticService {
|
|
|
allCount++;
|
|
|
|
|
|
if (v.getFinished() == null || !v.getFinished()) {
|
|
|
- // 未完成考试
|
|
|
+ // 考生缺考,未完成考试
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
+ // 考生非缺考,有考试记录
|
|
|
finishCount++;
|
|
|
|
|
|
- // 违纪时,可能没有成绩分值
|
|
|
- if (v.getTotalScore() == null) {
|
|
|
- v.setTotalScore(0d);
|
|
|
- }
|
|
|
-
|
|
|
- if (v.getPaperScore() != null) {
|
|
|
- if (v.getTotalScore() >= (v.getPaperScore() * passScoreLine) / 100d) {
|
|
|
- passScoreCount++;
|
|
|
+ if (v.getTotalScore() == null || v.getExamRecordDataId() == null) {
|
|
|
+ // 无最终成绩,算违纪
|
|
|
+ illegalityCount++;
|
|
|
+ } else {
|
|
|
+ // 有最终成绩,违纪按最终成绩对应的考试记录是否违纪来计算
|
|
|
+ if (v.getIllegality() != null && v.getIllegality()) {
|
|
|
+ illegalityCount++;
|
|
|
}
|
|
|
|
|
|
- if (v.getTotalScore() >= (v.getPaperScore() * goodScoreLine) / 100d) {
|
|
|
- goodScoreCount++;
|
|
|
- }
|
|
|
- }
|
|
|
+ if (v.getPaperScore() != null) {
|
|
|
+ if (v.getTotalScore() >= (v.getPaperScore() * passScoreLine) / 100d) {
|
|
|
+ passScoreCount++;
|
|
|
+ }
|
|
|
|
|
|
- if (v.getIllegality() != null && v.getIllegality()) {
|
|
|
- illegalityCount++;
|
|
|
+ if (v.getTotalScore() >= (v.getPaperScore() * goodScoreLine) / 100d) {
|
|
|
+ goodScoreCount++;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|