|
|
@ -251,6 +251,21 @@ public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<Tea
|
|
|
|
Long questionSettingId = item.getTeacherOpenCourseQuestionSettingId();
|
|
|
|
Long questionSettingId = item.getTeacherOpenCourseQuestionSettingId();
|
|
|
|
if (ObjectUtil.isNotEmpty(student)) {
|
|
|
|
if (ObjectUtil.isNotEmpty(student)) {
|
|
|
|
Long studentId = student.getStudentId();
|
|
|
|
Long studentId = student.getStudentId();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TeacherOpenCourseQuestionLogQuery logQuery = new TeacherOpenCourseQuestionLogQuery();
|
|
|
|
|
|
|
|
logQuery.setTeacherOpenCourseQuestionSettingId(questionSettingId);
|
|
|
|
|
|
|
|
logQuery.setStudentId(studentId);
|
|
|
|
|
|
|
|
logQuery.setTeacherOpenCourseQuestionLogStatus(1);
|
|
|
|
|
|
|
|
logQuery.setQuestionLogAddType(FINALLY_SUBMIT);
|
|
|
|
|
|
|
|
logQuery.setQuestionSettingType(HOMEWORK_FILE);
|
|
|
|
|
|
|
|
TeacherOpenCourseQuestionLog questionLog = teacherOpenCourseQuestionLogService.getInfo(logQuery);
|
|
|
|
|
|
|
|
if (null != questionLog) {
|
|
|
|
|
|
|
|
Map<String, String> fileQuestionInfo = new HashMap();
|
|
|
|
|
|
|
|
fileQuestionInfo.put("studentScore", questionLog.getStudentScore().toString());
|
|
|
|
|
|
|
|
fileQuestionInfo.put("teacherOpenCourseQuestionLogReply", questionLog.getTeacherOpenCourseQuestionLogReply());
|
|
|
|
|
|
|
|
item.setFileQuestionInfo(fileQuestionInfo);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QuestionLogSummaryQuery logSummaryQuery = new QuestionLogSummaryQuery();
|
|
|
|
QuestionLogSummaryQuery logSummaryQuery = new QuestionLogSummaryQuery();
|
|
|
|
logSummaryQuery.setPersonId(studentId);
|
|
|
|
logSummaryQuery.setPersonId(studentId);
|
|
|
|
logSummaryQuery.setQuestionLogSummaryStatus(1);
|
|
|
|
logSummaryQuery.setQuestionLogSummaryStatus(1);
|
|
|
@ -278,7 +293,6 @@ public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<Tea
|
|
|
|
if (ObjectUtil.isNotEmpty(logSummaryList2)) {
|
|
|
|
if (ObjectUtil.isNotEmpty(logSummaryList2)) {
|
|
|
|
BigDecimal studentTotalScore = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummaryStudentTotalScore).reduce(BigDecimal::add).get();
|
|
|
|
BigDecimal studentTotalScore = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummaryStudentTotalScore).reduce(BigDecimal::add).get();
|
|
|
|
int passTotalCount = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummaryIsPass).reduce(Integer::sum).get();
|
|
|
|
int passTotalCount = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummaryIsPass).reduce(Integer::sum).get();
|
|
|
|
int questionTotalCount = logSummaryList2.get(0).getQuestionLogSummaryQuestionTotalCount();
|
|
|
|
|
|
|
|
int totalSuccessCount = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummarySuccessCount).reduce(Integer::sum).get();
|
|
|
|
int totalSuccessCount = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummarySuccessCount).reduce(Integer::sum).get();
|
|
|
|
int totalErrorCount = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummaryErrorCount).reduce(Integer::sum).get();
|
|
|
|
int totalErrorCount = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummaryErrorCount).reduce(Integer::sum).get();
|
|
|
|
BigDecimal totalSuccessRate = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummarySuccessRate).reduce(BigDecimal::add).get();
|
|
|
|
BigDecimal totalSuccessRate = logSummaryList2.stream().map(QuestionLogSummary::getQuestionLogSummarySuccessRate).reduce(BigDecimal::add).get();
|
|
|
@ -286,7 +300,6 @@ public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<Tea
|
|
|
|
|
|
|
|
|
|
|
|
item.set("avgScore", NumberUtil.div(studentTotalScore, logSummarySize, 1));
|
|
|
|
item.set("avgScore", NumberUtil.div(studentTotalScore, logSummarySize, 1));
|
|
|
|
item.set("avgPassRate", NumberUtil.div(passTotalCount, logSummarySize, 1));
|
|
|
|
item.set("avgPassRate", NumberUtil.div(passTotalCount, logSummarySize, 1));
|
|
|
|
item.set("questionCount", questionTotalCount);
|
|
|
|
|
|
|
|
item.set("avgSuccessCount", NumberUtil.div(totalSuccessCount, logSummarySize, 1));
|
|
|
|
item.set("avgSuccessCount", NumberUtil.div(totalSuccessCount, logSummarySize, 1));
|
|
|
|
item.set("avgErrorCount", NumberUtil.div(totalErrorCount, logSummarySize, 1));
|
|
|
|
item.set("avgErrorCount", NumberUtil.div(totalErrorCount, logSummarySize, 1));
|
|
|
|
item.set("avgSuccessRate", NumberUtil.div(totalSuccessRate, logSummarySize, 1));
|
|
|
|
item.set("avgSuccessRate", NumberUtil.div(totalSuccessRate, logSummarySize, 1));
|
|
|
|