|
@@ -109,6 +109,9 @@ public class OmrGroupServiceImpl extends ServiceImpl<OmrGroupDao, OmrGroupEntity
|
|
for (Long studentId : studentIds) {
|
|
for (Long studentId : studentIds) {
|
|
try {
|
|
try {
|
|
concurrentService.getLock(LockType.STUDENT + "-" + studentId).lock();
|
|
concurrentService.getLock(LockType.STUDENT + "-" + studentId).lock();
|
|
|
|
+ if(CollectionUtils.isNotEmpty(taskService.findByGroupIdAndStudentId(group.getId(),studentId))){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
List<OmrTaskEntity> task = taskService.buildTask(group, studentId);
|
|
List<OmrTaskEntity> task = taskService.buildTask(group, studentId);
|
|
if (task != null && !task.isEmpty()) {
|
|
if (task != null && !task.isEmpty()) {
|
|
saveList.addAll(task);
|
|
saveList.addAll(task);
|
|
@@ -270,7 +273,8 @@ public class OmrGroupServiceImpl extends ServiceImpl<OmrGroupDao, OmrGroupEntity
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private List<OmrGroupEntity> findByExamIdAndSubjectCode(Long examId, String subjectCode) {
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public List<OmrGroupEntity> findByExamIdAndSubjectCode(Long examId, String subjectCode) {
|
|
LambdaQueryWrapper<OmrGroupEntity> wrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<OmrGroupEntity> wrapper = new LambdaQueryWrapper<>();
|
|
wrapper.eq(OmrGroupEntity::getExamId, examId);
|
|
wrapper.eq(OmrGroupEntity::getExamId, examId);
|
|
wrapper.eq(OmrGroupEntity::getSubjectCode, subjectCode);
|
|
wrapper.eq(OmrGroupEntity::getSubjectCode, subjectCode);
|