|
@@ -722,22 +722,22 @@ public class MarkServiceImpl implements MarkService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void submitHeaderTask(List<MarkHeaderGroupResult> markHeaderGroupResultList, MarkStudent markStudent) {
|
|
|
+ public void submitHeaderTask(List<MarkResultQuestion> resultQuestions, MarkStudent markStudent) {
|
|
|
Long userId = ServletUtil.getRequestUserId();
|
|
|
- for (MarkHeaderGroupResult groupResult : markHeaderGroupResultList) {
|
|
|
+ for (MarkResultQuestion result : resultQuestions) {
|
|
|
try {
|
|
|
- lockService.watch(LockType.QUESTION, groupResult.getQuestionId());
|
|
|
+ lockService.watch(LockType.QUESTION, result.getQuestionId());
|
|
|
Long currentTime = System.currentTimeMillis();
|
|
|
- updateMarkSubjectScore(markStudent, groupResult, userId);
|
|
|
+ updateMarkSubjectScore(markStudent, result, userId);
|
|
|
markTaskService.updateHeaderResult(markStudent.getExamId(), markStudent.getPaperNumber(),
|
|
|
- groupResult.getQuestionId(), groupResult.getStudentId(), userId, groupResult.getScore(), groupResult.getTrackList(), groupResult.getSpecialTagList(), currentTime, MarkTaskStatus.MARKED);
|
|
|
- updateMarkedCount(markStudent.getExamId(), markStudent.getPaperNumber(), groupResult.getQuestionId());
|
|
|
+ result.getQuestionId(), markStudent.getId(), userId, result.getMarkerScore(), result.getMarkerTrackList(), result.getMarkerTagList(), currentTime, MarkTaskStatus.MARKED);
|
|
|
+ updateMarkedCount(markStudent.getExamId(), markStudent.getPaperNumber(), result.getQuestionId());
|
|
|
markStudentService.updateCheckInfo(markStudent.getId(), userId);
|
|
|
- checkStudentQuestion(groupResult.getStudentId(), markQuestionService.getById(groupResult.getQuestionId()), null);
|
|
|
+ checkStudentQuestion(markStudent.getId(), markQuestionService.getById(result.getQuestionId()), result);
|
|
|
} catch (ApiException e) {
|
|
|
throw ExceptionResultEnum.ERROR.exception(e.getMessage());
|
|
|
} finally {
|
|
|
- lockService.unwatch(LockType.QUESTION, groupResult.getQuestionId());
|
|
|
+ lockService.unwatch(LockType.QUESTION, result.getQuestionId());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -745,13 +745,13 @@ public class MarkServiceImpl implements MarkService {
|
|
|
// checkStudentSubjective(markStudent.getId(), markStudent.getExamId(), markStudent.getPaperNumber());
|
|
|
}
|
|
|
|
|
|
- private void updateMarkSubjectScore(MarkStudent markStudent, MarkHeaderGroupResult groupResult, Long userId) {
|
|
|
+ private void updateMarkSubjectScore(MarkStudent markStudent, MarkResultQuestion resultQuestion, Long userId) {
|
|
|
// 记录修改日志(按小题)
|
|
|
// List<BasicOperationLog> basicOperationLogs = new ArrayList<>();
|
|
|
- MarkSubjectiveScore markSubjectiveScore = markSubjectiveScoreService.getByStudentIdAndQuestionId(markStudent.getId(), groupResult.getQuestionId());
|
|
|
- double score = markSubjectiveScore.getScore();
|
|
|
+ MarkSubjectiveScore markSubjectiveScore = markSubjectiveScoreService.getByStudentIdAndQuestionId(markStudent.getId(), resultQuestion.getQuestionId());
|
|
|
+ double score = resultQuestion.getMarkerScore();
|
|
|
// 分数有变动,记录日志
|
|
|
- if (groupResult.getScore() != score) {
|
|
|
+ if (markSubjectiveScore.getScore() != score) {
|
|
|
// MarkStudentVo markStudentVo = markStudentService.getDetailById(markStudent.getId());
|
|
|
// String detail = String.format("%s(%s)课程%s试卷编号下,将%s(%s)的%s题从%s分修改为%s分", markStudentVo.getCourseName(), markStudentVo.getCourseCode(), markStudentVo.getPaperNumber(), markStudentVo.getStudentName(), markStudentVo.getStudentCode(), markSubjectiveScore.getMainNumber() + "-" + markSubjectiveScore.getSubNumber(), markSubjectiveScore.getScore(), score);
|
|
|
// basicOperationLogs.add(new BasicOperationLog(Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString()), ServletUtil.getCurrentPrivilegeId(), OperationTypeEnum.SUBJECTIVE, OperationTypeEnum.SUBJECTIVE.getName(), ServletUtil.getRequest().getServletPath(), detail, String.valueOf(groupResult.getScore()), "成功", ServletUtil.getRequestUserId()));
|
|
@@ -765,7 +765,7 @@ public class MarkServiceImpl implements MarkService {
|
|
|
headerHistory.setSubNumber(markSubjectiveScore.getSubNumber());
|
|
|
headerHistory.setUserId(userId);
|
|
|
headerHistory.setScore(score);
|
|
|
- headerHistory.setTrackList(JSON.toJSONString(groupResult.getTrackList()));
|
|
|
+ headerHistory.setTrackList(JSON.toJSONString(resultQuestion.getMarkerTrackList()));
|
|
|
headerHistory.setOriginalScore(markSubjectiveScore.getScore());
|
|
|
// headerHistory.setOriginalTrackList();
|
|
|
headerHistory.setCreateTime(System.currentTimeMillis());
|
|
@@ -796,7 +796,8 @@ public class MarkServiceImpl implements MarkService {
|
|
|
IPage<Long> list = markTaskService.listPageHistory(page, userId, examId, paperNumber, secretNumber, markerScore);
|
|
|
List<Task> recordsDtos = new ArrayList<>();
|
|
|
for (Long studentId : list.getRecords()) {
|
|
|
- Task dto = taskService.build(studentId);
|
|
|
+ List<MarkTask> markTaskList = markTaskService.listByStudentIdAndMarkerId(studentId, userId);
|
|
|
+ Task dto = taskService.build(userId, markTaskList);
|
|
|
recordsDtos.add(dto);
|
|
|
}
|
|
|
IPage<Task> result = new Page<>();
|