|
@@ -532,7 +532,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional
|
|
|
- public void updateStudentByPaper(@NotNull Long userId, @NotNull Long studentId, @NotNull boolean updateOmrTask) {
|
|
|
+ public void updateStudentByPaper(@NotNull Long userId, @NotNull Long studentId, @NotNull boolean updateOmrTask, @NotNull boolean omrEdit) {
|
|
|
MarkStudent student = this.getById(studentId);
|
|
|
if (student == null) {
|
|
|
throw new ParameterException("找不到对应的考生");
|
|
@@ -563,7 +563,8 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
if (studentPaper.getPaperIndex() == 1) {
|
|
|
// 根据识别结果更新考生属性
|
|
|
ScanPaperPage page = scanPaperPageService.findPaperIdAndIndex(paper.getId(), 1);
|
|
|
- student.setOmrAbsent(page.getAbsent() == null ? false : page.getAbsent().getResult());
|
|
|
+ student.setOmrAbsent(page.getAbsent() != null && page.getAbsent().getResult());
|
|
|
+ student.setOmrBreach(page.getBreach() != null && page.getBreach().getResult());
|
|
|
student.setOmrAbsentChecked(false);
|
|
|
if (student.getOmrAbsent()) {
|
|
|
student.setObjectiveScore(null);
|
|
@@ -634,6 +635,16 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
} else {
|
|
|
student.setScanStatus(ScanStatus.UNEXIST);
|
|
|
}
|
|
|
+ if (omrEdit) {
|
|
|
+ boolean absent = student.getOmrAbsent();
|
|
|
+ student.setAbsent(absent);
|
|
|
+ student.setBreach(student.getOmrBreach());
|
|
|
+ if (absent) {
|
|
|
+ // 缺考的缺考检查改为已处理
|
|
|
+ student.setOmrAbsentChecked(true);
|
|
|
+ }
|
|
|
+ student.setPaperTypeCheckStatus(PaperTypeCheckStatus.PROCESSED);
|
|
|
+ }
|
|
|
// student.setUpdaterId(userId);
|
|
|
// student.setUpdateTime(System.currentTimeMillis());
|
|
|
this.saveOrUpdate(student);
|
|
@@ -884,7 +895,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
studentPaperService.saveOrUpdateBatch(studentPaperList);
|
|
|
}
|
|
|
// 更新考生状态
|
|
|
- updateStudentByPaper(user.getId(), id, true);
|
|
|
+ updateStudentByPaper(user.getId(), id, true, false);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -1048,7 +1059,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
}
|
|
|
scanPaperService.savePaperAndPages(paperEntity, pages);
|
|
|
}
|
|
|
- updateStudentByPaper(userId, student.getId(), true);
|
|
|
+ updateStudentByPaper(userId, student.getId(), true, true);
|
|
|
return UpdateTimeVo.create();
|
|
|
} finally {
|
|
|
concurrentService.getReadWriteLock(LockType.STUDENT + "-" + student.getId()).writeLock().unlock();
|