|
|
|
@ -32,6 +32,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Nullable;
|
|
|
|
|
import javax.validation.constraints.NotBlank;
|
|
|
|
|
import javax.validation.constraints.NotEmpty;
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
@ -251,16 +252,20 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
|
|
|
|
|
* 教师端-手动批改一些题目的分数
|
|
|
|
|
*
|
|
|
|
|
* @param teacherOpenCourseQuestionLogIds 指定更新分数的题目日志IDs
|
|
|
|
|
* @param score
|
|
|
|
|
* @param score 分数
|
|
|
|
|
* @param reply 评语
|
|
|
|
|
*/
|
|
|
|
|
public void manualModifyQuestionScores(@NotNull(message = "题目做题日志ID不能为空!") final String teacherOpenCourseQuestionLogIds, @NotEmpty final BigDecimal score) {
|
|
|
|
|
public void manualModifyQuestionScores(@NotNull(message = "题目做题日志ID不能为空!") final String teacherOpenCourseQuestionLogIds, @NotEmpty final BigDecimal score, @Nullable String reply) {
|
|
|
|
|
TeacherOpenCourseQuestionLogQuery teacherOpenCourseQuestionLogQuery = new TeacherOpenCourseQuestionLogQuery();
|
|
|
|
|
teacherOpenCourseQuestionLogQuery.setTeacherOpenCourseQuestionLogIdPlural(teacherOpenCourseQuestionLogIds);
|
|
|
|
|
teacherOpenCourseQuestionLogQuery.setTeacherOpenCourseQuestionLogStatus(1);
|
|
|
|
|
List<TeacherOpenCourseQuestionLog> updateList = teacherOpenCourseQuestionLogDao.getValuesByQueryNotWithPermission(teacherOpenCourseQuestionLogQuery);
|
|
|
|
|
|
|
|
|
|
// 批量更新分数
|
|
|
|
|
updateList.forEach(questionLog -> questionLog.setQuestionScore(score));
|
|
|
|
|
updateList.forEach(questionLog -> {
|
|
|
|
|
questionLog.setQuestionScore(score);
|
|
|
|
|
questionLog.setTeacherOpenCourseQuestionLogReply(reply);
|
|
|
|
|
});
|
|
|
|
|
updateBatchTemplate(updateList);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -309,6 +314,7 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
|
|
|
|
|
TeacherOpenCourseQuestionLogQuery query = new TeacherOpenCourseQuestionLogQuery();
|
|
|
|
|
query.setTeacherOpenCourseQuestionLogUploadFile(absFilePath);
|
|
|
|
|
query.setTeacherOpenCourseQuestionSettingId(questionSettingId);
|
|
|
|
|
query.setTeacherOpenCourseQuestionLogUpdateTime(new Date());
|
|
|
|
|
query.setTeacherOpenCourseQuestionLogStatus(1);
|
|
|
|
|
query.setOrgId(student.getOrgId());
|
|
|
|
|
query.setUserId(student.getUserId());
|
|
|
|
|