|
@@ -132,6 +132,7 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
|
|
@Override
|
|
@Override
|
|
public Long save(BasicExamStudentParam basicExamStudentParam, SysUser requestUser) {
|
|
public Long save(BasicExamStudentParam basicExamStudentParam, SysUser requestUser) {
|
|
BasicExam basicExam = basicExamService.getById(basicExamStudentParam.getExamId());
|
|
BasicExam basicExam = basicExamService.getById(basicExamStudentParam.getExamId());
|
|
|
|
+ BasicExamStudent basicExamStudentOld = this.getById(basicExamStudentParam.getId());
|
|
BasicExamStudent basicExamStudent = this.editEntityHelp(basicExamStudentParam, basicExam, requestUser);
|
|
BasicExamStudent basicExamStudent = this.editEntityHelp(basicExamStudentParam, basicExam, requestUser);
|
|
this.saveOrUpdate(basicExamStudent);
|
|
this.saveOrUpdate(basicExamStudent);
|
|
MarkPaper markPaper = null;
|
|
MarkPaper markPaper = null;
|
|
@@ -156,6 +157,10 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
|
|
markStudentService.updateByBasicExamStudent(basicExamStudent, markPaper, new HashSet<>());
|
|
markStudentService.updateByBasicExamStudent(basicExamStudent, markPaper, new HashSet<>());
|
|
markPaperService.updateStudentCountByExamIdAndPaperNumberAndPaperType(basicExamStudent.getExamId(), basicExamStudent.getPaperNumber(), SystemConstant.DEFAULT_PAPER_TYPE_A);
|
|
markPaperService.updateStudentCountByExamIdAndPaperNumberAndPaperType(basicExamStudent.getExamId(), basicExamStudent.getPaperNumber(), SystemConstant.DEFAULT_PAPER_TYPE_A);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (ExamModelEnum.MODEL4.equals(basicExam.getExamModel()) && basicExamStudentOld != null) {
|
|
|
|
+ markPaperService.deleteByExamIdAndPaperNumber(basicExamStudent.getExamId(), basicExamStudent.getPaperNumber(), true);
|
|
|
|
+ }
|
|
return basicExamStudent.getId();
|
|
return basicExamStudent.getId();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -192,6 +197,10 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
|
|
throw ExceptionResultEnum.ERROR.exception("考生已扫描,无法删除");
|
|
throw ExceptionResultEnum.ERROR.exception("考生已扫描,无法删除");
|
|
}
|
|
}
|
|
markStudentService.deleteByExamIdAndPaperNumberAndStudentCode(basicExamStudent.getExamId(), basicExamStudent.getPaperNumber(), basicExamStudent.getStudentCode());
|
|
markStudentService.deleteByExamIdAndPaperNumberAndStudentCode(basicExamStudent.getExamId(), basicExamStudent.getPaperNumber(), basicExamStudent.getStudentCode());
|
|
|
|
+ BasicExam basicExam = basicExamService.getById(basicExamStudent.getExamId());
|
|
|
|
+ if (ExamModelEnum.MODEL4.equals(basicExam.getExamModel())) {
|
|
|
|
+ markPaperService.deleteByExamIdAndPaperNumber(basicExamStudent.getExamId(), basicExamStudent.getPaperNumber(), true);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.removeByIds(idList);
|
|
this.removeByIds(idList);
|
|
basicExamStudentList.stream().map(BasicExamStudent::getClazzId).distinct().forEach(e -> basicTeachClazzService.deleteFreeClazz(e));
|
|
basicExamStudentList.stream().map(BasicExamStudent::getClazzId).distinct().forEach(e -> basicTeachClazzService.deleteFreeClazz(e));
|