|
|
|
@ -559,6 +559,8 @@ public class TeacherOpenCourseScoreDashboardService extends CoreBaseService<Teac
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TeacherOpenCourseScoreDashboard scoreDashboard = new TeacherOpenCourseScoreDashboard();
|
|
|
|
|
scoreDashboard.setTeacherOpenCourseScoreDashboardId(teacherOpenCourseScoreDashboard.getTeacherOpenCourseScoreDashboardId());
|
|
|
|
|
|
|
|
|
@ -938,14 +940,19 @@ public class TeacherOpenCourseScoreDashboardService extends CoreBaseService<Teac
|
|
|
|
|
totalScore = totalScore.add(formatSignScore).add(formatCourseScore).add(formatRealOperationScore).add(formatQuestionHomeworkScore).add(formatExamScore).add(formatChatScore);
|
|
|
|
|
|
|
|
|
|
//加上手动的分数
|
|
|
|
|
totalScore = totalScore.add(ObjectUtil.defaultIfNull(teacherOpenCourseScoreDashboard.getManualScore(), BigDecimal.ZERO));
|
|
|
|
|
totalScore = totalScore.setScale(1, RoundingMode.HALF_UP);
|
|
|
|
|
scoreDashboard.setTotalScore(totalScore);
|
|
|
|
|
|
|
|
|
|
//成绩状态
|
|
|
|
|
lastStatus(weight, totalScore, scoreDashboard);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
// 手动调整,最总分数
|
|
|
|
|
BigDecimal totalScore = scoreDashboard.getTotalScore();
|
|
|
|
|
BigDecimal manualScore = ObjectUtil.defaultIfNull(teacherOpenCourseScoreDashboard.getManualScore(), BigDecimal.ZERO);
|
|
|
|
|
BigDecimal lastScore = totalScore.add(manualScore);
|
|
|
|
|
scoreDashboard.setLastScore(ObjectUtil.defaultIfNull(lastScore, BigDecimal.ZERO));
|
|
|
|
|
lastStatus(weight, scoreDashboard.getLastScore(), scoreDashboard);
|
|
|
|
|
}
|
|
|
|
|
updateTemplate(scoreDashboard);
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
@ -1087,19 +1094,16 @@ public class TeacherOpenCourseScoreDashboardService extends CoreBaseService<Teac
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//拿到原来的总成绩,减去手动调整的分数,再加上新的手动调整的分数
|
|
|
|
|
//拿到原来的总成绩
|
|
|
|
|
BigDecimal totalScore = ObjectUtil.defaultIfNull(teacherOpenCourseScoreDashboard.getTotalScore(), BigDecimal.ZERO);
|
|
|
|
|
BigDecimal oldManualScore = ObjectUtil.defaultIfNull(teacherOpenCourseScoreDashboard.getManualScore(), BigDecimal.ZERO);
|
|
|
|
|
|
|
|
|
|
totalScore = totalScore.subtract(oldManualScore).add(ObjectUtil.defaultIfNull(manualScore, BigDecimal.ZERO));
|
|
|
|
|
teacherOpenCourseScoreDashboard.setTotalScore(totalScore);
|
|
|
|
|
BigDecimal lastScore = totalScore.add(ObjectUtil.defaultIfNull(manualScore, BigDecimal.ZERO));
|
|
|
|
|
teacherOpenCourseScoreDashboard.setManualScore(ObjectUtil.defaultIfNull(manualScore, BigDecimal.ZERO));
|
|
|
|
|
teacherOpenCourseScoreDashboard.setLastScore(lastScore);
|
|
|
|
|
|
|
|
|
|
TeacherOpenCourseScoreWeight weight = weightDao.single(teacherOpenCourseId);
|
|
|
|
|
if (weight == null) {
|
|
|
|
|
lastStatus(weight, totalScore, teacherOpenCourseScoreDashboard);
|
|
|
|
|
if (weight != null) {
|
|
|
|
|
lastStatus(weight, lastScore, teacherOpenCourseScoreDashboard);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updateTemplate(teacherOpenCourseScoreDashboard);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|