|
|
|
@ -7,15 +7,13 @@ import cn.zeroerr.common.core.domain.entity.RecruitStructure;
|
|
|
|
|
import cn.zeroerr.domain.dto.FollowDTO;
|
|
|
|
|
import cn.zeroerr.domain.dto.HomePageDTO;
|
|
|
|
|
import cn.zeroerr.domain.dto.PostDetailDTO;
|
|
|
|
|
import cn.zeroerr.domain.entity.EntryManage;
|
|
|
|
|
import cn.zeroerr.domain.entity.RecruitProcessTask;
|
|
|
|
|
import cn.zeroerr.domain.entity.ResumeFollowRecord;
|
|
|
|
|
import cn.zeroerr.domain.entity.ResumeHandleRecord;
|
|
|
|
|
import cn.zeroerr.domain.vo.PostListVO;
|
|
|
|
|
import cn.zeroerr.domain.vo.ResumeStatVO;
|
|
|
|
|
import cn.zeroerr.service.PostPlanFollowService;
|
|
|
|
|
import cn.zeroerr.service.RecruitProcessTaskService;
|
|
|
|
|
import cn.zeroerr.service.ResumeFollowRecordService;
|
|
|
|
|
import cn.zeroerr.service.ResumeHandleRecordService;
|
|
|
|
|
import cn.zeroerr.service.*;
|
|
|
|
|
import cn.zeroerr.system.service.RecruitStructureService;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
@ -49,6 +47,8 @@ public class HomePageController extends BaseController {
|
|
|
|
|
private ResumeHandleRecordService resumeHandleRecordService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private RecruitStructureService recruitStructureService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private EntryManageService entryManageService;
|
|
|
|
|
|
|
|
|
|
@Anonymous
|
|
|
|
|
@GetMapping("/getResumeStat")
|
|
|
|
@ -73,8 +73,9 @@ public class HomePageController extends BaseController {
|
|
|
|
|
//寻找该月份终试通过人数
|
|
|
|
|
List<ResumeFollowRecord> resumeFollowRecordFinalPassList = resumeFollowRecordService.getBySelectMonth(req.getHrName(), firstDay, lastDay, 1);
|
|
|
|
|
|
|
|
|
|
//寻找该月份实际入职人数
|
|
|
|
|
List<ResumeFollowRecord> resumeFollowRecordActualEntryList = resumeFollowRecordService.getBySelectMonth(req.getHrName(), firstDay, lastDay, 2);
|
|
|
|
|
//寻找该月份实际入职人数(以入职管理里的为准)
|
|
|
|
|
//List<ResumeFollowRecord> resumeFollowRecordActualEntryList = resumeFollowRecordService.getBySelectMonth(req.getHrName(), firstDay, lastDay, 2);
|
|
|
|
|
List<EntryManage> entryManageList=entryManageService.getList(firstDay, lastDay);
|
|
|
|
|
|
|
|
|
|
//寻找该月份初试通过人数
|
|
|
|
|
List<ResumeFollowRecord> resumeFollowRecordFirstPassList = resumeFollowRecordService.getBySelectMonth(req.getHrName(), firstDay, lastDay, 3);
|
|
|
|
@ -89,7 +90,7 @@ public class HomePageController extends BaseController {
|
|
|
|
|
//4.未通过人数(终面)
|
|
|
|
|
resumeStatVO.setFinalFailCount(resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getFinalPass()) && "0".equals(record.getFinalPass())).count());
|
|
|
|
|
//5.入职人数("实际"入职日期不为空的数据统计)
|
|
|
|
|
resumeStatVO.setEntryCount(resumeFollowRecordActualEntryList.stream().filter(record -> Objects.nonNull(record.getActualJoinDate())).count());
|
|
|
|
|
resumeStatVO.setEntryCount(entryManageList.size());
|
|
|
|
|
//6.简历来源:下载
|
|
|
|
|
resumeStatVO.setDownLoadCounts(resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getResumeSource()) && "2".equals(record.getResumeSource())).count());
|
|
|
|
|
//7.简历处理-自投
|
|
|
|
@ -334,33 +335,34 @@ public class HomePageController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<ResumeStatVO.FunnelData> funnelDataList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
//找到所有时间一共有多少份录入的简历
|
|
|
|
|
List<ResumeFollowRecord> allResumeFollowRecordList = resumeFollowRecordService.list();
|
|
|
|
|
//找到所有时间一共有多少人实际入职
|
|
|
|
|
List<EntryManage> allEntryManageList=entryManageService.getList(null, null);
|
|
|
|
|
|
|
|
|
|
//封装合格简历
|
|
|
|
|
funnelDataList.add(new ResumeStatVO.FunnelData().setName("合格简历率:" + 100 + "%").setValue(Long.valueOf(resumeFollowRecordList.size())));
|
|
|
|
|
funnelDataList.add(new ResumeStatVO.FunnelData().setName("合格简历:" + allResumeFollowRecordList.size() + "人").setValue((long) allResumeFollowRecordList.size()));
|
|
|
|
|
//封装电话面试通过百分比
|
|
|
|
|
//通过电话面试的人数
|
|
|
|
|
//通过
|
|
|
|
|
long phonePassCount1 = resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getIsPass()) && "1".equals(record.getIsPass())).count();
|
|
|
|
|
long phonePassCount1 = allResumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getIsPass()) && "1".equals(record.getIsPass())).count();
|
|
|
|
|
//直接邀约
|
|
|
|
|
long phonePassCount2 = resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getIsPass()) && "4".equals(record.getIsPass())).count();
|
|
|
|
|
long phonePassCount2 = allResumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getIsPass()) && "4".equals(record.getIsPass())).count();
|
|
|
|
|
long phonePassCount = phonePassCount1 + phonePassCount2;
|
|
|
|
|
BigDecimal phonePassPercentage = new BigDecimal(0d);
|
|
|
|
|
if (phonePassCount != 0) {
|
|
|
|
|
phonePassPercentage = new BigDecimal(phonePassCount).divide(new BigDecimal(resumeFollowRecordList.size()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
funnelDataList.add(new ResumeStatVO.FunnelData().setName("电面通过率:" + phonePassPercentage.doubleValue() + "%").setValue(phonePassCount));
|
|
|
|
|
funnelDataList.add(new ResumeStatVO.FunnelData().setName("电面通过:" + phonePassCount + "人").setValue(phonePassCount));
|
|
|
|
|
//封装初试通过百分比
|
|
|
|
|
long firstReachCount = resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getFirstReach()) && "1".equals(record.getFirstReach())).count();
|
|
|
|
|
BigDecimal firstPassPercentage = new BigDecimal(0d);
|
|
|
|
|
if (firstReachCount != 0) {
|
|
|
|
|
firstPassPercentage = new BigDecimal(resumeStatVO.getFistCount()).divide(new BigDecimal(firstReachCount), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
|
|
|
|
|
long firstReachCount = allResumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getFirstPass()) && "1".equals(record.getFirstPass())).count();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
funnelDataList.add(new ResumeStatVO.FunnelData().setName("初试通过率:" + firstPassPercentage.doubleValue() + "%").setValue(resumeStatVO.getFistCount()));
|
|
|
|
|
//封装终试通过百分比
|
|
|
|
|
funnelDataList.add(new ResumeStatVO.FunnelData().setName("终试通过:" + resumeStatVO.getPassPercent() + "%").setValue(resumeStatVO.getFinalPassCount()));
|
|
|
|
|
//封装入职百分比
|
|
|
|
|
funnelDataList.add(new ResumeStatVO.FunnelData().setName("入职通过:" + resumeStatVO.getEntryPercent() + "%").setValue(resumeStatVO.getEntryCount()));
|
|
|
|
|
funnelDataList.add(new ResumeStatVO.FunnelData().setName("初试通过:" + firstReachCount + "人").setValue(firstReachCount));
|
|
|
|
|
|
|
|
|
|
long finalPassCount = allResumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getFinalPass()) && "1".equals(record.getFinalPass())).count();
|
|
|
|
|
//封装终试通过人数
|
|
|
|
|
funnelDataList.add(new ResumeStatVO.FunnelData().setName("终试通过:" + finalPassCount + "人").setValue(finalPassCount));
|
|
|
|
|
|
|
|
|
|
//封装入职人数
|
|
|
|
|
funnelDataList.add(new ResumeStatVO.FunnelData().setName("入职通过:" + allEntryManageList.size() + "人").setValue((long)allEntryManageList.size()));
|
|
|
|
|
resumeStatVO.setFunnelData(funnelDataList);
|
|
|
|
|
|
|
|
|
|
//查询待我审批的条数
|
|
|
|
@ -440,8 +442,6 @@ public class HomePageController extends BaseController {
|
|
|
|
|
}else {
|
|
|
|
|
resumeStatVO.setInvitePercent(0d);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return success(resumeStatVO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|