|
@@ -46,6 +46,8 @@ import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
+import static com.keao.edu.user.enums.ExamStatusEnum.RESULT_CONFIRM;
|
|
|
+
|
|
|
@Service
|
|
|
public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> implements ExamRoomService {
|
|
|
|
|
@@ -161,7 +163,7 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
|
|
|
if(Objects.isNull(examinationBasic)){
|
|
|
throw new BizException("考级项目不存在");
|
|
|
}
|
|
|
- if(ExamStatusEnum.RESULT_CONFIRM.equals(examinationBasic.getStatus())){
|
|
|
+ if(RESULT_CONFIRM.equals(examinationBasic.getStatus())){
|
|
|
throw new BizException("考级结果已确认");
|
|
|
}
|
|
|
if(Objects.isNull(examRoom.getExamMode())){
|
|
@@ -285,7 +287,7 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
|
|
|
if(Objects.isNull(examinationBasic)){
|
|
|
throw new BizException("考级项目不存在");
|
|
|
}
|
|
|
- if(ExamStatusEnum.RESULT_CONFIRM.equals(examinationBasic.getStatus())){
|
|
|
+ if(RESULT_CONFIRM.equals(examinationBasic.getStatus())){
|
|
|
throw new BizException("考级结果已确认");
|
|
|
}
|
|
|
|
|
@@ -791,6 +793,10 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void changeExamRoom(Long examRoomId, Integer openFlag) {
|
|
|
ExamRoom examRoom = examRoomDao.get(examRoomId);
|
|
|
+ ExaminationBasic examinationBasic = examinationBasicDao.get(examRoom.getExaminationBasicId());
|
|
|
+ if(examinationBasic.getStatus() == RESULT_CONFIRM){
|
|
|
+ throw new BizException("开启失败:考试结果已确认");
|
|
|
+ }
|
|
|
examRoom.setId(examRoomId);
|
|
|
examRoom.setOpenFlag(openFlag);
|
|
|
if(StringUtils.isEmpty(examRoom.getAssistantTeacherUserIdList())){
|
|
@@ -808,7 +814,6 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
|
|
|
String studentIds = examRoomStudentRelationService.getStudentIds(examRoomId);
|
|
|
StringBuffer stringBuffer = new StringBuffer();
|
|
|
stringBuffer.append(examRoom.getMainTeacherUserId());
|
|
|
- ExaminationBasic examinationBasic = examinationBasicDao.get(examRoom.getExaminationBasicId());
|
|
|
if(StringUtils.isNotEmpty(studentIds)){
|
|
|
stringBuffer.append(",").append(studentIds);
|
|
|
}
|