|
@@ -541,7 +541,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional
|
|
|
- public void updateStudentByPaper(@NotNull Long userId, @NotNull Long studentId, @NotNull boolean updateOmrTask, @NotNull boolean omrEdit) {
|
|
|
+ public void updateStudentByPaper(@NotNull Long userId, @NotNull Long studentId, @NotNull boolean updateOmrTask, @NotNull boolean omrEdit, @NotNull boolean omrAssigned) {
|
|
|
MarkStudent student = this.getById(studentId);
|
|
|
if (student == null) {
|
|
|
throw new ParameterException("找不到对应的考生");
|
|
@@ -552,10 +552,6 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
|
|
|
// 重置状态
|
|
|
student.setIncomplete(false);
|
|
|
- if (!omrEdit) {
|
|
|
- student.setAssigned(false);
|
|
|
- student.setAssignConfirmed(false);
|
|
|
- }
|
|
|
student.setInvalid(false);
|
|
|
student.setQuestionFilled(false);
|
|
|
int paperCount = 0;
|
|
@@ -566,7 +562,10 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
// 获取paper详情更新考生状态
|
|
|
ScanPaper paper = scanPaperService.getById(studentPaper.getPaperId());
|
|
|
// 二次识别不进人工绑定检查
|
|
|
- student.setAssigned(omrEdit && (student.getAssigned() || paper.getAssigned()));
|
|
|
+ if(omrAssigned) {
|
|
|
+ student.setAssigned(paper.getAssigned());
|
|
|
+ student.setAssignConfirmed(false);
|
|
|
+ }
|
|
|
student.setInvalid(student.getInvalid() || paper.getInvalid());
|
|
|
student.setQuestionFilled(student.getQuestionFilled() || paper.getQuestionFilled());
|
|
|
student.setCardNumber(paper.getCardNumber());
|
|
@@ -886,7 +885,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
studentPaperService.saveOrUpdateBatch(studentPaperList);
|
|
|
}
|
|
|
// 更新考生状态
|
|
|
- updateStudentByPaper(user.getId(), id, true, false);
|
|
|
+ updateStudentByPaper(user.getId(), id, true, false, true);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -1050,7 +1049,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
}
|
|
|
scanPaperService.savePaperAndPages(paperEntity, pages);
|
|
|
}
|
|
|
- updateStudentByPaper(userId, student.getId(), true, true);
|
|
|
+ updateStudentByPaper(userId, student.getId(), true, true, false);
|
|
|
return UpdateTimeVo.create();
|
|
|
} finally {
|
|
|
concurrentService.getReadWriteLock(LockType.STUDENT + "-" + student.getId()).writeLock().unlock();
|
|
@@ -1115,7 +1114,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
lw.eq(MarkStudent::getId, student.getId());
|
|
|
update(lw);
|
|
|
|
|
|
- // 确认缺考清除客观题查检任务,取消缺考统计客观题分数
|
|
|
+ // 确认缺考清除客观题查检任务,取消缺考统计客观题分数、重新生成客观题检查任务
|
|
|
if (!omrAbsent) {
|
|
|
calculateObjectiveScore(student);
|
|
|
scanOmrTaskService.saveTask(student.getId());
|
|
@@ -1224,7 +1223,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
for (FilePathVo filePathVo : vos) {
|
|
|
list.add(JSON.toJSONString(filePathVo));
|
|
|
}
|
|
|
- record.setSheetUrls(teachcloudCommonService.filePreview(list));
|
|
|
+ record.setSheetUrls(teachcloudCommonService.filePreview(list, SystemConstant.MARK_JPG_EXPIRE_MINUTE));
|
|
|
}
|
|
|
return ret;
|
|
|
}
|