|
|
@ -1,6 +1,7 @@
|
|
|
|
package com.ibeetl.jlw.web;
|
|
|
|
package com.ibeetl.jlw.web;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.lang.Assert;
|
|
|
|
import cn.hutool.core.lang.Assert;
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
@ -22,6 +23,7 @@ import com.ibeetl.jlw.entity.dto.TeacherOpenCourseHomeWorkLogDTO;
|
|
|
|
import com.ibeetl.jlw.entity.dto.TeacherOpenCourseHomeWorkLogPageDTO;
|
|
|
|
import com.ibeetl.jlw.entity.dto.TeacherOpenCourseHomeWorkLogPageDTO;
|
|
|
|
import com.ibeetl.jlw.entity.vo.FileQuestionLogListVO;
|
|
|
|
import com.ibeetl.jlw.entity.vo.FileQuestionLogListVO;
|
|
|
|
import com.ibeetl.jlw.entity.vo.TeacherOpenCourseHomeWorkLogExportVO;
|
|
|
|
import com.ibeetl.jlw.entity.vo.TeacherOpenCourseHomeWorkLogExportVO;
|
|
|
|
|
|
|
|
import com.ibeetl.jlw.enums.ResourcesQuestionSnapshotFromTypeEnum;
|
|
|
|
import com.ibeetl.jlw.service.TeacherOpenCourseQuestionLogService;
|
|
|
|
import com.ibeetl.jlw.service.TeacherOpenCourseQuestionLogService;
|
|
|
|
import com.ibeetl.jlw.web.query.TeacherOpenCourseQuestionLogQuery;
|
|
|
|
import com.ibeetl.jlw.web.query.TeacherOpenCourseQuestionLogQuery;
|
|
|
|
import com.ibeetl.jlw.web.query.TeacherOpenCourseQuestionLogScoreDetailsInfoQuery;
|
|
|
|
import com.ibeetl.jlw.web.query.TeacherOpenCourseQuestionLogScoreDetailsInfoQuery;
|
|
|
@ -42,6 +44,7 @@ import java.math.BigDecimal;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import static cn.hutool.core.collection.CollUtil.getFirst;
|
|
|
|
import static cn.hutool.core.util.ObjectUtil.defaultIfNull;
|
|
|
|
import static cn.hutool.core.util.ObjectUtil.defaultIfNull;
|
|
|
|
import static cn.jlw.util.CacheUserUtil.getStudent;
|
|
|
|
import static cn.jlw.util.CacheUserUtil.getStudent;
|
|
|
|
import static com.ibeetl.admin.core.util.ExcelUtil.convertData;
|
|
|
|
import static com.ibeetl.admin.core.util.ExcelUtil.convertData;
|
|
|
@ -183,6 +186,40 @@ public class TeacherOpenCourseQuestionLogController extends BaseController {
|
|
|
|
return JsonResult.success();
|
|
|
|
return JsonResult.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 教师端-手动批改一些题目的分数
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param questionSettingId 题目配置ID
|
|
|
|
|
|
|
|
* @param studentId 学生ID
|
|
|
|
|
|
|
|
* @param score 分数
|
|
|
|
|
|
|
|
* @param reply 评语
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping(API + "/manualModifyQuestionScores2.do")
|
|
|
|
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
public JsonResult manualModifyQuestionScores(
|
|
|
|
|
|
|
|
Long questionSettingId, Long studentId, ResourcesQuestionSnapshotFromTypeEnum questionSettingType, BigDecimal score, @RequestParam(required = false) String reply,
|
|
|
|
|
|
|
|
@SCoreUser
|
|
|
|
|
|
|
|
CoreUser coreUser) {
|
|
|
|
|
|
|
|
Assert.isFalse(coreUser.isStudent(), "学生身份无法访问改接口!");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TeacherOpenCourseQuestionLogQuery logQuery = new TeacherOpenCourseQuestionLogQuery();
|
|
|
|
|
|
|
|
logQuery.setTeacherOpenCourseQuestionLogStatus(1);
|
|
|
|
|
|
|
|
logQuery.setQuestionLogAddType(FINALLY_SUBMIT);
|
|
|
|
|
|
|
|
logQuery.setQuestionSettingType(questionSettingType);
|
|
|
|
|
|
|
|
logQuery.setStudentId(studentId);
|
|
|
|
|
|
|
|
logQuery.setTeacherOpenCourseQuestionSettingId(questionSettingId);
|
|
|
|
|
|
|
|
List<TeacherOpenCourseQuestionLog> list = teacherOpenCourseQuestionLogService.getValuesByQueryNotWithPermission(logQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(list)) {
|
|
|
|
|
|
|
|
list.sort(Comparator.comparing(TeacherOpenCourseQuestionLog::getTeacherOpenCourseQuestionLogAddTime));
|
|
|
|
|
|
|
|
teacherOpenCourseQuestionLogService.manualModifyQuestionScores(getFirst(list).getTeacherOpenCourseQuestionLogId().toString(), score, reply);
|
|
|
|
|
|
|
|
return JsonResult.success("修改成功!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return JsonResult.failMessage("修改失败,查询到做题的记录!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 学生端-答题后显示答案、和分析
|
|
|
|
* 学生端-答题后显示答案、和分析
|
|
|
|
*
|
|
|
|
*
|
|
|
|