|
@@ -457,8 +457,8 @@ public class ScanOmrTaskServiceImpl extends ServiceImpl<ScanOmrTaskMapper, ScanO
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@Override
|
|
@Override
|
|
- public ScanOmrStudent getTask(Long examId, Long userId) {
|
|
|
|
- Long studentId = findWaitingTask(examId,userId);
|
|
|
|
|
|
+ public ScanOmrStudent getTask(Long examId,String coursePaperId, Long userId) {
|
|
|
|
+ Long studentId = findWaitingTask(examId,coursePaperId,userId);
|
|
if (studentId == null) {
|
|
if (studentId == null) {
|
|
throw ExceptionResultEnum.ERROR.exception("没有识别对照任务");
|
|
throw ExceptionResultEnum.ERROR.exception("没有识别对照任务");
|
|
}
|
|
}
|
|
@@ -482,11 +482,11 @@ public class ScanOmrTaskServiceImpl extends ServiceImpl<ScanOmrTaskMapper, ScanO
|
|
return scanOmrStudent;
|
|
return scanOmrStudent;
|
|
}
|
|
}
|
|
|
|
|
|
- private Long findWaitingTask(Long examId, Long userId) {
|
|
|
|
|
|
+ private Long findWaitingTask(Long examId,String coursePaperId, Long userId) {
|
|
int retry = 0;
|
|
int retry = 0;
|
|
Long studentId = null;
|
|
Long studentId = null;
|
|
while (studentId == null) {
|
|
while (studentId == null) {
|
|
- List<Long> list = this.findStudentIdByStatus(examId, retry * 20, 20, OmrTaskStatus.WAITING);
|
|
|
|
|
|
+ List<Long> list = this.findStudentIdByStatus(examId, coursePaperId,retry * 20, 20, OmrTaskStatus.WAITING);
|
|
if (list.isEmpty()) {
|
|
if (list.isEmpty()) {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -504,8 +504,11 @@ public class ScanOmrTaskServiceImpl extends ServiceImpl<ScanOmrTaskMapper, ScanO
|
|
return studentId;
|
|
return studentId;
|
|
}
|
|
}
|
|
|
|
|
|
- private List<Long> findStudentIdByStatus(Long examId, int pageNumber, int pageSize, OmrTaskStatus status) {
|
|
|
|
- return this.baseMapper.findUnMarked(examId, pageNumber, pageSize, status);
|
|
|
|
|
|
+ private List<Long> findStudentIdByStatus(Long examId,String coursePaperId, int pageNumber, int pageSize, OmrTaskStatus status) {
|
|
|
|
+ SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
|
+ DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(sysUser.getSchoolId(),
|
|
|
|
+ sysUser.getId(), ServletUtil.getRequest().getServletPath());
|
|
|
|
+ return this.baseMapper.findUnMarked(examId, coursePaperId,pageNumber, pageSize, status,dpr);
|
|
}
|
|
}
|
|
|
|
|
|
private List<ScanOmrTaskDto> toTaskVo(List<ScanOmrTask> tasks) {
|
|
private List<ScanOmrTaskDto> toTaskVo(List<ScanOmrTask> tasks) {
|