|
@@ -163,6 +163,14 @@ public class ExamTaskDetailServiceImpl extends ServiceImpl<ExamTaskDetailMapper,
|
|
|
throw ExceptionResultEnum.ERROR.exception("有关联该任务的考场正在生成打印pdf,不能修改关联类型");
|
|
|
}
|
|
|
|
|
|
+ for (ExamDetail examDetail : examDetails) {
|
|
|
+ List<ExamDetailCourse> examDetailCourses = examDetailCourseService.listByExamDetailIdAndStatus(examDetail.getId());
|
|
|
+ // 4.没有未完成的命题任务
|
|
|
+ if (!CollectionUtils.isEmpty(examDetailCourses)) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("有关联该任务的考场有未完成的命题任务,不能修改关联类型");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 更新关联卷型
|
|
|
ExamTask newExamTask = examTaskService.getByCourseCodeAndPaperNumber(examTask.getSchoolId(), examTask.getCourseCode(), paperParam.getPaperNumber());
|
|
|
UpdateWrapper<ExamTaskDetail> updateWrapper = new UpdateWrapper<>();
|