This commit is contained in:
zt
2025-03-03 13:50:43 +08:00
parent 23bf1f46ee
commit 7d11552c32
2 changed files with 5 additions and 2 deletions

View File

@ -159,15 +159,17 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr
@Override
public BgtProjectRecruitDetailWgzListVO wgzList(Long id) {
BgtProjectRecruitDetailWgzListVO vo = new BgtProjectRecruitDetailWgzListVO();
vo.setId(id);
BgtProjectRecruitApplyQueryDTO bgtProjectRecruitApplyQueryDTO = new BgtProjectRecruitApplyQueryDTO();
bgtProjectRecruitApplyQueryDTO.setRecruitIds(Collections.singletonList(id));
bgtProjectRecruitApplyQueryDTO.setStatus(applyStatus);
List<BgtProjectRecruitApplyVO> bgtProjectRecruitApplyVOS = bgtProjectRecruitApplyService.appQueryList(bgtProjectRecruitApplyQueryDTO);
vo.setTotalNum(bgtProjectRecruitApplyVOS.size());
int count = (int)bgtProjectRecruitApplyVOS.stream().filter(apply -> apply.getStatus().equals(RecruitApplyStatus.BGT_PASS.getCode())).count();
vo.setPassNum(count);
vo.setNotSelectNum(vo.getTotalNum()-vo.getPassNum());
vo.setApplyList(bgtProjectRecruitApplyVOS.subList(0, Math.min(count, 3)));
vo.setApplyList(bgtProjectRecruitApplyVOS.subList(0, Math.min(vo.getTotalNum(), 3)));
return vo;
}