岗位申请数据根据当前阶段进行统计

This commit is contained in:
2026-01-22 19:47:21 +08:00
parent ba1d916c23
commit 49c608d345
4 changed files with 124 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
package com.vetti.hotake.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 岗位申请数据根据当前阶段进行统计 返回对象
*
* @author wangxiangshun
* @date 2025-11-30
*/
@Data
@Accessors(chain = true)
public class HotakeRolesApplyStageStatisticalDto {
@ApiModelProperty("已申请数量")
private Integer appliedNum;
@ApiModelProperty("入围数量")
private Integer shortlistedNum;
@ApiModelProperty("面试数量")
private Integer interviewNum;
@ApiModelProperty("邀约数量")
private Integer offerNum;
@ApiModelProperty("受雇数量")
private Integer hiredNum;
@ApiModelProperty("拒绝邀约数量")
private Integer refuseOfferNum;
@ApiModelProperty("面试失败数量")
private Integer interviewFailNum;
@ApiModelProperty("总数量")
private Integer totalNum;
}

View File

@@ -2,6 +2,7 @@ package com.vetti.hotake.service;
import java.util.List;
import com.vetti.hotake.domain.HotakeRolesApplyInfo;
import com.vetti.hotake.domain.dto.HotakeRolesApplyStageStatisticalDto;
import com.vetti.hotake.domain.vo.HotakeRolesApplyStageVo;
/**
@@ -92,4 +93,12 @@ public interface IHotakeRolesApplyInfoService
*/
public HotakeRolesApplyInfo handleCandidateCompatibilityInfo(HotakeRolesApplyInfo hotakeRolesApplyInfo);
/**
* 岗位申请数据根据当前阶段进行统计
*
* @param hotakeRolesApplyInfo 候选人岗位申请信息
* @return 岗位申请数据根据当前阶段进行统计 信息集合
*/
public HotakeRolesApplyStageStatisticalDto handleHotakeRolesApplyStageStatistical(HotakeRolesApplyInfo hotakeRolesApplyInfo);
}

View File

@@ -16,6 +16,7 @@ import com.vetti.hotake.domain.HotakeRolesInfo;
import com.vetti.hotake.domain.dto.HotakeAiCvScoringRankingDto;
import com.vetti.hotake.domain.dto.HotakeCandidateCompatibilityDto;
import com.vetti.hotake.domain.dto.HotakeCvInfoDto;
import com.vetti.hotake.domain.dto.HotakeRolesApplyStageStatisticalDto;
import com.vetti.hotake.domain.dto.VcDto.*;
import com.vetti.hotake.domain.vo.HotakeRolesApplyStageVo;
import com.vetti.hotake.mapper.HotakeRolesApplyInfoMapper;
@@ -23,6 +24,7 @@ import com.vetti.hotake.mapper.HotakeRolesInfoMapper;
import com.vetti.hotake.service.IHotakeRolesApplyInfoService;
import com.vetti.hotake.service.IHotakeRolesApplyOperRecordService;
import com.vetti.system.service.ISysUserService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -452,4 +454,65 @@ public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements
return new HotakeRolesApplyInfo();
}
/**
* 岗位申请数据根据当前阶段进行统计
* @param hotakeRolesApplyInfo 候选人岗位申请信息
* @return
*/
@Override
public HotakeRolesApplyStageStatisticalDto handleHotakeRolesApplyStageStatistical(HotakeRolesApplyInfo hotakeRolesApplyInfo) {
HotakeRolesApplyStageStatisticalDto dto = new HotakeRolesApplyStageStatisticalDto();
List<HotakeRolesApplyInfo> applyInfoList = hotakeRolesApplyInfoMapper.selectHotakeRolesApplyInfoCompatibilityScoreList(hotakeRolesApplyInfo);
Integer appliedNum = 0;
Integer shortlistedNum = 0;
Integer interviewNum = 0;
Integer offerNum = 0;
Integer hiredNum = 0;
Integer refuseOfferNum = 0;
Integer interviewFailNum = 0;
Integer totalNum = 0;
if(CollectionUtil.isNotEmpty(applyInfoList)) {
totalNum = applyInfoList.size();
List<HotakeRolesApplyInfo> applyInfoList1 = applyInfoList.stream().filter(e->StageEnum.APPLIED.getCode().equals(e.getStage())).toList();
if(CollectionUtil.isNotEmpty(applyInfoList1)) {
appliedNum = applyInfoList1.size();
}
List<HotakeRolesApplyInfo> applyInfoList2 = applyInfoList.stream().filter(e->StageEnum.SHORTLISTED.getCode().equals(e.getStage())).toList();
if(CollectionUtil.isNotEmpty(applyInfoList2)) {
shortlistedNum = applyInfoList2.size();
}
List<HotakeRolesApplyInfo> applyInfoList3 = applyInfoList.stream().filter(e->StageEnum.INTERVIEW.getCode().equals(e.getStage())).toList();
if(CollectionUtil.isNotEmpty(applyInfoList3)) {
interviewNum = applyInfoList3.size();
}
List<HotakeRolesApplyInfo> applyInfoList4 = applyInfoList.stream().filter(e->StageEnum.OFFER.getCode().equals(e.getStage())).toList();
if(CollectionUtil.isNotEmpty(applyInfoList4)) {
offerNum = applyInfoList4.size();
}
List<HotakeRolesApplyInfo> applyInfoList5 = applyInfoList.stream().filter(e->StageEnum.HIRED.getCode().equals(e.getStage())).toList();
if(CollectionUtil.isNotEmpty(applyInfoList5)) {
hiredNum = applyInfoList5.size();
}
List<HotakeRolesApplyInfo> applyInfoList6 = applyInfoList.stream().filter(e->StageEnum.REFUSE_OFFER.getCode().equals(e.getStage())).toList();
if(CollectionUtil.isNotEmpty(applyInfoList6)) {
refuseOfferNum = applyInfoList6.size();
}
List<HotakeRolesApplyInfo> applyInfoList7 = applyInfoList.stream().filter(e->StageEnum.INTERVIEW_FAIL.getCode().equals(e.getStage())).toList();
if(CollectionUtil.isNotEmpty(applyInfoList7)) {
interviewFailNum = applyInfoList7.size();
}
}
dto.setTotalNum(totalNum);
dto.setAppliedNum(appliedNum);
dto.setShortlistedNum(shortlistedNum);
dto.setInterviewNum(interviewNum);
dto.setOfferNum(offerNum);
dto.setHiredNum(hiredNum);
dto.setRefuseOfferNum(refuseOfferNum);
dto.setInterviewFailNum(interviewFailNum);
return dto;
}
}