|
@@ -15,7 +15,6 @@ import com.qmth.exam.reserve.cache.CacheConstants;
|
|
|
import com.qmth.exam.reserve.cache.impl.ApplyTaskCacheService;
|
|
|
import com.qmth.exam.reserve.cache.impl.ExamSiteCacheService;
|
|
|
import com.qmth.exam.reserve.dao.StudentApplyDao;
|
|
|
-import com.qmth.exam.reserve.dao.TimePeriodExamSiteDao;
|
|
|
import com.qmth.exam.reserve.entity.ApplyTaskEntity;
|
|
|
import com.qmth.exam.reserve.entity.ExamSiteEntity;
|
|
|
import com.qmth.exam.reserve.entity.StudentApplyEntity;
|
|
@@ -94,8 +93,8 @@ public class ExamReserveServiceImpl implements ExamReserveService {
|
|
|
throw new StatusException("当前预约任务与学生的不匹配");
|
|
|
}
|
|
|
|
|
|
- TimePeriodEntity timePeriod = timePeriodService.getById(timePeriodId);
|
|
|
- if (timePeriod == null || !curApplyTask.getTaskId().equals(timePeriod.getApplyTaskId())) {
|
|
|
+ ExamSiteTimePeriodInfo timePeriod = timePeriodExamSiteService.findOneTimePeriodForApply(curApplyTask.getTaskId(), examSiteId, timePeriodId);
|
|
|
+ if (timePeriod == null || !timePeriod.getEnable()) {
|
|
|
log.warn("预约失败,当前预约时段信息有误!timePeriodId:{}", timePeriodId);
|
|
|
throw new StatusException("当前预约时段信息有误");
|
|
|
}
|
|
@@ -503,8 +502,7 @@ public class ExamReserveServiceImpl implements ExamReserveService {
|
|
|
return dateList;
|
|
|
}
|
|
|
|
|
|
- TimePeriodExamSiteDao baseMapper = (TimePeriodExamSiteDao) timePeriodExamSiteService.getBaseMapper();
|
|
|
- List<ExamSiteTimePeriodInfo> timePeriods = baseMapper.allTimePeriods(curApplyTask.getTaskId(), examSiteId);
|
|
|
+ List<ExamSiteTimePeriodInfo> timePeriods = timePeriodExamSiteService.findAllTimePeriodsForApply(curApplyTask.getTaskId(), examSiteId);
|
|
|
if (CollectionUtils.isEmpty(timePeriods)) {
|
|
|
return dateList;
|
|
|
}
|