|
@@ -28,6 +28,7 @@ import com.keao.edu.user.api.enums.ExamModeEnum;
|
|
|
import com.keao.edu.user.dao.*;
|
|
|
import com.keao.edu.user.dto.*;
|
|
|
import com.keao.edu.user.entity.*;
|
|
|
+import com.keao.edu.user.enums.ExamStatusEnum;
|
|
|
import com.keao.edu.user.page.ExamRoomListQueryInfo;
|
|
|
import com.keao.edu.user.page.ExamRoomQueryInfo;
|
|
|
import com.keao.edu.user.service.*;
|
|
@@ -430,6 +431,10 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
|
|
|
throw new BizException("考级项目不存在");
|
|
|
}
|
|
|
|
|
|
+ if(exam.getStatus().getOrder()< ExamStatusEnum.APPLIED.getOrder()){
|
|
|
+ throw new BizException("项目报名中,不能发送考试安排");
|
|
|
+ }
|
|
|
+
|
|
|
ExamOrganizationRelation examOrganizationRelation = examOrganizationRelationDao.getExamOrganizationRelation(exam.getId(), organId);
|
|
|
if(Objects.isNull(examOrganizationRelation)||examOrganizationRelation.getIsAllowArrangeExam()==0){
|
|
|
throw new BizException("无权操作");
|
|
@@ -901,10 +906,16 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
|
|
|
}
|
|
|
for (ExamRoom examRoom : examRooms) {
|
|
|
examRoom.setOpenFlag(0);
|
|
|
-// imFeignService.dismissGroup(examRoom.getMainTeacherUserId().toString(),examRoom.getId().toString());
|
|
|
imFeignService.destroyRoom(examRoom.getId(),examRoom.getMainTeacherUserId().toString());
|
|
|
studentExamResultService.calculateStudentExamAvgScore(examRoom.getId());
|
|
|
}
|
|
|
examRoomDao.batchUpdate(examRooms);
|
|
|
+ Set<Long> examRoomIds = examRooms.stream().map(ExamRoom::getId).collect(Collectors.toSet());
|
|
|
+ List<Long> registIds = examRoomStudentRelationDao.findNoFinishedExamRegistIdsWIthExamRooms(new ArrayList<>(examRoomIds));
|
|
|
+ if(!CollectionUtils.isEmpty(registIds)){
|
|
|
+ examRoomStudentRelationDao.deleteStudentRoomRegistRelations(registIds);
|
|
|
+ examCertificationDao.deleteWithRegist(registIds);
|
|
|
+ studentExamResultDao.deleteWithRegists(registIds);
|
|
|
+ }
|
|
|
}
|
|
|
}
|