|
@@ -206,20 +206,22 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
|
|
|
|
if (concurrentService.isLocked(CacheConstants.LOCK_AUTO_APPLY)) {
|
|
if (concurrentService.isLocked(CacheConstants.LOCK_AUTO_APPLY)) {
|
|
// 系统自动预约“任务执行期间”不允许取消预约
|
|
// 系统自动预约“任务执行期间”不允许取消预约
|
|
- log.warn("系统自动预约中,不允许考生操作预约!lockKey:{}", CacheConstants.LOCK_AUTO_APPLY);
|
|
|
|
|
|
+ log.warn("[cancel] 系统自动预约中,不允许考生操作预约!lockKey:{}", CacheConstants.LOCK_AUTO_APPLY);
|
|
throw new StatusException(Constants.SYSTEM_BUSY);
|
|
throw new StatusException(Constants.SYSTEM_BUSY);
|
|
}
|
|
}
|
|
|
|
|
|
// 教学点管理员,只能取消本教学点的考生
|
|
// 教学点管理员,只能取消本教学点的考生
|
|
if (user.getRole().equals(Role.TEACHING) && !user.getCategoryId().equals(student.getCategoryId())) {
|
|
if (user.getRole().equals(Role.TEACHING) && !user.getCategoryId().equals(student.getCategoryId())) {
|
|
- throw new StatusException("[cancel] 只能取消本教学点的考生");
|
|
|
|
|
|
+ log.warn("[cancel] 教学点管理员,只能取消本教学点的考生, userId:{}, studentId:{}", user.getId(), studentApplyEntity.getStudentId());
|
|
|
|
+ throw new StatusException("只能取消本教学点的考生");
|
|
}
|
|
}
|
|
|
|
|
|
// 考生是否已经取消判断
|
|
// 考生是否已经取消判断
|
|
ApplyRecordCacheBean studentApplyRecord = cacheService.getStudentApplyRecord(studentApplyEntity.getStudentId(), studentApplyEntity.getExamSiteId(),
|
|
ApplyRecordCacheBean studentApplyRecord = cacheService.getStudentApplyRecord(studentApplyEntity.getStudentId(), studentApplyEntity.getExamSiteId(),
|
|
studentApplyEntity.getTimePeriodId());
|
|
studentApplyEntity.getTimePeriodId());
|
|
if (studentApplyRecord != null && studentApplyRecord.getCancel()) {
|
|
if (studentApplyRecord != null && studentApplyRecord.getCancel()) {
|
|
- throw new StatusException("[cancel] 考生已经取消,请稍后查看");
|
|
|
|
|
|
+ log.warn("[cancel] 考生已经取消,请稍后查看, studentId:{}", studentApplyEntity.getStudentId());
|
|
|
|
+ throw new StatusException("考生已经取消,请稍后查看");
|
|
}
|
|
}
|
|
|
|
|
|
String studentApplyLockKey = String.format(CacheConstants.LOCK_STUDENT_APPLY, studentApplyEntity.getStudentId());
|
|
String studentApplyLockKey = String.format(CacheConstants.LOCK_STUDENT_APPLY, studentApplyEntity.getStudentId());
|
|
@@ -960,13 +962,13 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
// 获取所有考场列表
|
|
// 获取所有考场列表
|
|
List<ExamRoomEntity> examRoomList = listExamRoom(examSiteId);
|
|
List<ExamRoomEntity> examRoomList = listExamRoom(examSiteId);
|
|
if (examRoomList == null || examRoomList.isEmpty()) {
|
|
if (examRoomList == null || examRoomList.isEmpty()) {
|
|
- return Collections.emptyList(); // 如果没有考场,直接返回空列表
|
|
|
|
|
|
+ return Collections.emptyList();
|
|
}
|
|
}
|
|
|
|
|
|
// 获取禁用的考场列表
|
|
// 获取禁用的考场列表
|
|
List<ExamRoomEntity> disableExamRoomList = timePeriodExamRoomService.listExamRoom(examSiteId, timePeriodId, false);
|
|
List<ExamRoomEntity> disableExamRoomList = timePeriodExamRoomService.listExamRoom(examSiteId, timePeriodId, false);
|
|
if (CollectionUtils.isEmpty(disableExamRoomList)) {
|
|
if (CollectionUtils.isEmpty(disableExamRoomList)) {
|
|
- return examRoomList; // 如果没有禁用考场,直接返回所有考场
|
|
|
|
|
|
+ return examRoomList;
|
|
}
|
|
}
|
|
|
|
|
|
// 提取禁用考场的 ID 到 Set中
|
|
// 提取禁用考场的 ID 到 Set中
|