|
@@ -252,8 +252,16 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
}
|
|
|
//查询命题任务绑定的试卷和题卡
|
|
|
ExamTask examTask = examTaskService.getByCourseCodeAndPaperNumber(sysUser.getSchoolId(), examPrintPlan.getExamId(), examDetailCourse.getCourseCode(), examDetailCourse.getPaperNumber());
|
|
|
- if (examTask.getReview()) {
|
|
|
+ if (examTask == null) {
|
|
|
+ throw ExceptionResultEnum.EXAM_TASK_IS_NULL.exception();
|
|
|
+ } else if (examTask.getReview()) {
|
|
|
examTask = examTaskService.findExamTaskByFlowStatus(sysUser.getSchoolId(), examPrintPlan.getExamId(), examDetailCourse.getCourseCode(), examDetailCourse.getPaperNumber(), FlowStatusEnum.FINISH);
|
|
|
+ } else {
|
|
|
+ if (!ExamStatusEnum.SUBMIT.equals(examTask.getStatus())) {
|
|
|
+ throw ExceptionResultEnum.EXAM_TASK_NOT_SUBMIT.exception();
|
|
|
+ } else if (!examTask.getEnable()) {
|
|
|
+ throw ExceptionResultEnum.EXAM_TASK_ENABLE.exception();
|
|
|
+ }
|
|
|
}
|
|
|
ExamTaskDetail examTaskDetail = examTaskDetailService.getByExamTaskId(examTask.getId());
|
|
|
|