|
@@ -42,6 +42,7 @@ import com.qmth.exam.reserve.bean.Constants;
|
|
|
import com.qmth.exam.reserve.bean.apply.ApplyRecordCacheBean;
|
|
|
import com.qmth.exam.reserve.bean.login.LoginUser;
|
|
|
import com.qmth.exam.reserve.bean.stdapply.AgentAndTimeVO;
|
|
|
+import com.qmth.exam.reserve.bean.stdapply.CategoryVO;
|
|
|
import com.qmth.exam.reserve.bean.stdapply.MaterialTitleInfo;
|
|
|
import com.qmth.exam.reserve.bean.stdapply.SignInVO;
|
|
|
import com.qmth.exam.reserve.bean.stdapply.StudentApplyReq;
|
|
@@ -117,8 +118,21 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
|
ApplyTaskEntity task = getApplyTask();
|
|
|
req.setTaskId(task.getId());
|
|
|
}
|
|
|
+ String applyTeachingName = null;
|
|
|
+ if (req.getTeachingId() != null) {
|
|
|
+ List<CategoryVO> listExamSite = examSiteService.listExamSite(req.getTeachingId());
|
|
|
+ List<Long> examSiteIds = listExamSite.stream().map(CategoryVO::getId).collect(Collectors.toList());
|
|
|
+ if (!examSiteIds.isEmpty()) {
|
|
|
+ req.setExamSiteIds(examSiteIds);
|
|
|
+ applyTeachingName = categoryService.getById(req.getTeachingId()).getName();
|
|
|
+ }
|
|
|
+ }
|
|
|
IPage<StudentApplyVO> iPage = this.baseMapper
|
|
|
.page(new Page<StudentApplyVO>(req.getPageNumber(), req.getPageSize()), req);
|
|
|
+ List<StudentApplyVO> records = iPage.getRecords();
|
|
|
+ for (StudentApplyVO vo : records) {
|
|
|
+ vo.setApplyTeachingName(applyTeachingName);
|
|
|
+ }
|
|
|
return PageUtil.of(iPage);
|
|
|
}
|
|
|
|
|
@@ -522,7 +536,7 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
|
}
|
|
|
|
|
|
private TimePeriodEntity checkTimePeriod(String timePeriod, Map<String, TimePeriodEntity> timeCache) {
|
|
|
- if (timePeriod.split(" ").length != 2) {
|
|
|
+ if (timePeriod == null || timePeriod.split(" ").length != 2) {
|
|
|
throw new StatusException(" 预约时段格式不正确");
|
|
|
}
|
|
|
String[] arr = timePeriod.split("-");
|
|
@@ -567,13 +581,11 @@ public class StudentApplyServiceImpl extends ServiceImpl<StudentApplyDao, Studen
|
|
|
lm.eq(StudentEntity::getStudentCode, studentCode);
|
|
|
lm.eq(StudentEntity::getName, name);
|
|
|
lm.eq(StudentEntity::getIdentityNumber, identityNumber);
|
|
|
+ lm.eq(StudentEntity::getApplyTaskId, task.getId());
|
|
|
StudentEntity student = studentService.getOne(lm);
|
|
|
if (student == null) {
|
|
|
throw new StatusException(" 考生信息填写错误");
|
|
|
}
|
|
|
- if (!student.getApplyTaskId().equals(task.getId())) {
|
|
|
- throw new StatusException(" 当前任务下不存在该考生");
|
|
|
- }
|
|
|
return student;
|
|
|
}
|
|
|
|