|
@@ -969,34 +969,32 @@ public class ExamApplyServiceImpl extends ServiceImpl<ExamApplyMapper, ExamApply
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<ExamApplyDetailVo> examApplyDetail(ExamApplyDetailBo bo) {
|
|
|
+ public ExamApplyDetailVo examApplyDetail(ExamApplyDetailBo bo) {
|
|
|
List<ExamApplyDetailVo> vo = baseMapper.getExamInfo(bo);
|
|
|
if (CollectionUtils.isEmpty(vo)){
|
|
|
- return new ArrayList<>();
|
|
|
+ return new ExamApplyDetailVo();
|
|
|
}
|
|
|
+ ExamApplyDetailVo detailVo = vo.stream().findFirst().get();
|
|
|
//获取考试学员
|
|
|
- vo.forEach(item -> {
|
|
|
- //考场名称和考试名称
|
|
|
- ExamSite site = iExamSiteService.getById(item.getSiteId());
|
|
|
- if (ObjectUtils.isNotNull(site)){
|
|
|
- item.setSiteName(site.getSiteAddress());
|
|
|
- }
|
|
|
- ExamApply examApply = getById(item.getApplyId());
|
|
|
- if (ObjectUtils.isNotNull(examApply)){
|
|
|
- item.setApplyName(examApply.getApplyName());
|
|
|
- }
|
|
|
- List<ExamApplyUserDetailVo> examUserInfo = baseMapper.getExamUserInfo(item);
|
|
|
- if (CollectionUtils.isNotEmpty(examUserInfo)){
|
|
|
- examUserInfo.forEach(user -> {
|
|
|
- //身份证隐藏
|
|
|
- String decrypt = EncryptHandler.decrypt(user.getIdCard());
|
|
|
-// String content = decrypt.replaceAll("(\\d{4})\\d{10}(\\w{4})", "$1****$2");
|
|
|
- user.setIdCard(decrypt);
|
|
|
- });
|
|
|
- item.setUserDetailVos(examUserInfo);
|
|
|
- }
|
|
|
- });
|
|
|
- return vo;
|
|
|
+ //考场名称和考试名称
|
|
|
+ ExamSite site = iExamSiteService.getEntityById(detailVo.getSiteId());
|
|
|
+ if (ObjectUtils.isNotNull(site)){
|
|
|
+ detailVo.setSiteName(site.getSiteAddress());
|
|
|
+ }
|
|
|
+ ExamApply examApply = baseMapper.getEntityById(detailVo.getApplyId());
|
|
|
+ if (ObjectUtils.isNotNull(examApply)){
|
|
|
+ detailVo.setApplyName(examApply.getApplyName());
|
|
|
+ }
|
|
|
+ List<ExamApplyUserDetailVo> examUserInfo = baseMapper.getExamUserInfo(detailVo);
|
|
|
+ if (CollectionUtils.isNotEmpty(examUserInfo)){
|
|
|
+ examUserInfo.forEach(user -> {
|
|
|
+ //身份证隐藏
|
|
|
+ String decrypt = EncryptHandler.decrypt(user.getIdCard());
|
|
|
+ user.setIdCard(decrypt);
|
|
|
+ });
|
|
|
+ detailVo.setUserDetailVos(examUserInfo);
|
|
|
+ }
|
|
|
+ return detailVo;
|
|
|
}
|
|
|
|
|
|
@Override
|