1.修改一系列数据统计和bug
This commit is contained in:
parent
65e20a89a1
commit
2519af477d
|
@ -20,6 +20,7 @@ import cn.zeroerr.system.service.RecruitStructureService;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -55,7 +56,7 @@ public class HomePageController extends BaseController {
|
||||||
public AjaxResult getResumeStat(HomePageDTO req) {
|
public AjaxResult getResumeStat(HomePageDTO req) {
|
||||||
// 给定的年月
|
// 给定的年月
|
||||||
String yearMonthStr = req.getMonth();
|
String yearMonthStr = req.getMonth();
|
||||||
// 解析年月字符串
|
// 解析年月字符串
|
||||||
YearMonth yearMonth = YearMonth.parse(yearMonthStr);
|
YearMonth yearMonth = YearMonth.parse(yearMonthStr);
|
||||||
// 获取该月份的第一天
|
// 获取该月份的第一天
|
||||||
LocalDate firstDay = yearMonth.atDay(1);
|
LocalDate firstDay = yearMonth.atDay(1);
|
||||||
|
@ -78,12 +79,6 @@ public class HomePageController extends BaseController {
|
||||||
//寻找该月份初试通过人数
|
//寻找该月份初试通过人数
|
||||||
List<ResumeFollowRecord> resumeFollowRecordFirstPassList = resumeFollowRecordService.getBySelectMonth(req.getHrName(), firstDay, lastDay, 3);
|
List<ResumeFollowRecord> resumeFollowRecordFirstPassList = resumeFollowRecordService.getBySelectMonth(req.getHrName(), firstDay, lastDay, 3);
|
||||||
|
|
||||||
//寻找该月份内部推荐的人数
|
|
||||||
List<ResumeFollowRecord> resumeFollowRecordInternalRecommendedList = resumeFollowRecordService.getBySelectMonth(req.getHrName(), firstDay, lastDay, 7);
|
|
||||||
|
|
||||||
//寻找该月份内部竞聘的人数
|
|
||||||
List<ResumeFollowRecord> resumeFollowRecordInternalCompetitionList = resumeFollowRecordService.getBySelectMonth(req.getHrName(), firstDay, lastDay, 8);
|
|
||||||
|
|
||||||
ResumeStatVO resumeStatVO = new ResumeStatVO();
|
ResumeStatVO resumeStatVO = new ResumeStatVO();
|
||||||
//1.合格简历数量
|
//1.合格简历数量
|
||||||
resumeStatVO.setQualifiedCount(resumeFollowRecordList.size());
|
resumeStatVO.setQualifiedCount(resumeFollowRecordList.size());
|
||||||
|
@ -97,7 +92,7 @@ public class HomePageController extends BaseController {
|
||||||
resumeStatVO.setEntryCount(resumeFollowRecordActualEntryList.stream().filter(record -> Objects.nonNull(record.getActualJoinDate())).count());
|
resumeStatVO.setEntryCount(resumeFollowRecordActualEntryList.stream().filter(record -> Objects.nonNull(record.getActualJoinDate())).count());
|
||||||
//6.简历来源:下载
|
//6.简历来源:下载
|
||||||
resumeStatVO.setDownLoadCounts(resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getResumeSource()) && "2".equals(record.getResumeSource())).count());
|
resumeStatVO.setDownLoadCounts(resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getResumeSource()) && "2".equals(record.getResumeSource())).count());
|
||||||
//7.简历来源:自投
|
//7.简历处理-自投
|
||||||
if(resumeHandleRecordList!=null){
|
if(resumeHandleRecordList!=null){
|
||||||
resumeStatVO.setSelfCounts(resumeHandleRecordList.stream()
|
resumeStatVO.setSelfCounts(resumeHandleRecordList.stream()
|
||||||
.filter(record -> record.getSelfCounts() != null)
|
.filter(record -> record.getSelfCounts() != null)
|
||||||
|
@ -106,10 +101,9 @@ public class HomePageController extends BaseController {
|
||||||
}else {
|
}else {
|
||||||
resumeStatVO.setSelfCounts(0);
|
resumeStatVO.setSelfCounts(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//8.封装实际到面人数
|
//8.封装实际到面人数
|
||||||
resumeStatVO.setActualArriveCounts(resumeFollowRecordActualArrivedList.stream().filter(record -> Objects.nonNull(record.getFirstReach()) && "1".equals(record.getFirstReach())).count());
|
resumeStatVO.setActualArriveCounts(resumeFollowRecordActualArrivedList.stream().filter(record -> Objects.nonNull(record.getFirstReach()) && "1".equals(record.getFirstReach())).count());
|
||||||
// 9. 通过比例(终面)=通过人数(终面)/初面实际到面人数
|
//9.通过比例(终面)=通过人数(终面)/初面实际到面人数
|
||||||
//long totalCount = resumeStatVO.getFinalPassCount() + resumeStatVO.getFinalFailCount();
|
//long totalCount = resumeStatVO.getFinalPassCount() + resumeStatVO.getFinalFailCount();
|
||||||
if (resumeStatVO.getActualArriveCounts() != null) {
|
if (resumeStatVO.getActualArriveCounts() != null) {
|
||||||
if (resumeStatVO.getActualArriveCounts() != 0L) {
|
if (resumeStatVO.getActualArriveCounts() != 0L) {
|
||||||
|
@ -128,17 +122,6 @@ public class HomePageController extends BaseController {
|
||||||
} else {
|
} else {
|
||||||
resumeStatVO.setEntryPercent(0d);
|
resumeStatVO.setEntryPercent(0d);
|
||||||
}
|
}
|
||||||
//11. 处理 内竞数/内推数
|
|
||||||
int internalRecommendedSize = 0;
|
|
||||||
int internalCompetitionSize = 0;
|
|
||||||
if (resumeFollowRecordInternalRecommendedList != null) {
|
|
||||||
internalRecommendedSize = resumeFollowRecordInternalRecommendedList.size();
|
|
||||||
}
|
|
||||||
if (resumeFollowRecordInternalCompetitionList != null) {
|
|
||||||
internalCompetitionSize = resumeFollowRecordInternalCompetitionList.size();
|
|
||||||
}
|
|
||||||
resumeStatVO.setInternalRecommendedSize(internalRecommendedSize);
|
|
||||||
resumeStatVO.setInternalCompetitionSize(internalCompetitionSize);
|
|
||||||
|
|
||||||
// // 使用流进行分组并求和
|
// // 使用流进行分组并求和
|
||||||
// Map<Long, Integer> groupedSum = resumeHandleRecordList.stream()
|
// Map<Long, Integer> groupedSum = resumeHandleRecordList.stream()
|
||||||
|
@ -232,7 +215,7 @@ public class HomePageController extends BaseController {
|
||||||
//某月份,某岗位合格简历数
|
//某月份,某岗位合格简历数
|
||||||
List<Integer> postQualifiedResumeCounts = new ArrayList<>();
|
List<Integer> postQualifiedResumeCounts = new ArrayList<>();
|
||||||
//某月份,某岗位简历自投数
|
//某月份,某岗位简历自投数
|
||||||
List<Long> postSelfCounts = new ArrayList<>();
|
List<Integer> postSelfCounts = new ArrayList<>();
|
||||||
//某月份,某岗位简历下载数
|
//某月份,某岗位简历下载数
|
||||||
List<Long> postDownLoadCounts = new ArrayList<>();
|
List<Long> postDownLoadCounts = new ArrayList<>();
|
||||||
//某月份,某岗位约面人数
|
//某月份,某岗位约面人数
|
||||||
|
@ -280,11 +263,21 @@ public class HomePageController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
//封装该岗位的自投数
|
//封装该岗位的自投数
|
||||||
if (!CollectionUtils.isEmpty(resumeFollowRecordListByPostId)) {
|
// if (!CollectionUtils.isEmpty(resumeFollowRecordListByPostId)) {
|
||||||
postDetailDTO.setPostSelfCounts(resumeFollowRecordListByPostId.stream().filter(record -> Objects.nonNull(record.getResumeSource()) && "1".equals(record.getResumeSource())).count());
|
// postDetailDTO.setPostSelfCounts(resumeFollowRecordListByPostId.stream().filter(record -> Objects.nonNull(record.getResumeSource()) && "1".equals(record.getResumeSource())).count());
|
||||||
|
// } else {
|
||||||
|
// postDetailDTO.setPostSelfCounts(0L);
|
||||||
|
// }
|
||||||
|
//封装该岗位的自投数
|
||||||
|
if (!CollectionUtils.isEmpty(resumeHandleRecordListByPostId)) {
|
||||||
|
postDetailDTO.setPostSelfCounts(resumeHandleRecordListByPostId.stream()
|
||||||
|
.filter(record -> record.getSelfCounts() != null) // 过滤掉getSelfCounts为空的记录
|
||||||
|
.mapToInt(ResumeHandleRecord::getSelfCounts)
|
||||||
|
.sum());
|
||||||
} else {
|
} else {
|
||||||
postDetailDTO.setPostSelfCounts(0L);
|
postDetailDTO.setPostSelfCounts(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//封装该岗位的下载数
|
//封装该岗位的下载数
|
||||||
if (!CollectionUtils.isEmpty(resumeFollowRecordListByPostId)) {
|
if (!CollectionUtils.isEmpty(resumeFollowRecordListByPostId)) {
|
||||||
postDetailDTO.setPostDownLoadCounts(resumeFollowRecordListByPostId.stream().filter(record -> Objects.nonNull(record.getResumeSource()) && "2".equals(record.getResumeSource())).count());
|
postDetailDTO.setPostDownLoadCounts(resumeFollowRecordListByPostId.stream().filter(record -> Objects.nonNull(record.getResumeSource()) && "2".equals(record.getResumeSource())).count());
|
||||||
|
@ -429,6 +422,26 @@ public class HomePageController extends BaseController {
|
||||||
resumeStatVO.setArrivePercent(0d);
|
resumeStatVO.setArrivePercent(0d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//封装简历合格率
|
||||||
|
Integer total=resumeStatVO.getFindResumeCounts()+resumeStatVO.getSelfCounts();
|
||||||
|
if(resumeStatVO.getQualifiedCount()!=null && total!=0){
|
||||||
|
BigDecimal arrivePercent = new BigDecimal(resumeStatVO.getQualifiedCount()).divide(new BigDecimal(total), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
|
||||||
|
resumeStatVO.setQualifiedPercent(arrivePercent.doubleValue());
|
||||||
|
}else {
|
||||||
|
resumeStatVO.setQualifiedPercent(0d);
|
||||||
|
}
|
||||||
|
|
||||||
|
//封装约面率
|
||||||
|
if (resumeStatVO.getInvestInterviewCounts()!=null &&resumeStatVO.getQualifiedCount()!=null){
|
||||||
|
if(resumeStatVO.getQualifiedCount()!=0){
|
||||||
|
BigDecimal arrivePercent = new BigDecimal(resumeStatVO.getInvestInterviewCounts()).divide(new BigDecimal(resumeStatVO.getQualifiedCount()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
|
||||||
|
resumeStatVO.setInvitePercent(arrivePercent.doubleValue());
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
resumeStatVO.setInvitePercent(0d);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return success(resumeStatVO);
|
return success(resumeStatVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,12 @@ public class RecruitFollowController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Collections.sort(followVOList, new Comparator<FollowVO>() {
|
||||||
|
@Override
|
||||||
|
public int compare(FollowVO o1, FollowVO o2) {
|
||||||
|
return Long.compare(o1.getHrId(), o2.getHrId());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
return AjaxResult.success(followVOList);
|
return AjaxResult.success(followVOList);
|
||||||
|
|
|
@ -321,7 +321,7 @@ public class RecruitInterviewController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:add')")
|
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:list')")
|
||||||
@GetMapping("/interview/tag")
|
@GetMapping("/interview/tag")
|
||||||
@ApiOperation(value = "返回面试标签的树状列表")
|
@ApiOperation(value = "返回面试标签的树状列表")
|
||||||
public AjaxResult InterviewTag() {
|
public AjaxResult InterviewTag() {
|
||||||
|
|
|
@ -12,7 +12,7 @@ public class PostDetailDTO {
|
||||||
private String postName;
|
private String postName;
|
||||||
private Integer postLookResumeCounts;
|
private Integer postLookResumeCounts;
|
||||||
private Integer postQualifiedResumeCounts;
|
private Integer postQualifiedResumeCounts;
|
||||||
private Long postSelfCounts;
|
private Integer postSelfCounts;
|
||||||
private Long postDownLoadCounts;
|
private Long postDownLoadCounts;
|
||||||
private Integer postInviteCounts;
|
private Integer postInviteCounts;
|
||||||
private Long postArriveCounts;
|
private Long postArriveCounts;
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class FollowVO {
|
||||||
@ApiModelProperty(value = "查看过该岗位多少简历数")
|
@ApiModelProperty(value = "查看过该岗位多少简历数")
|
||||||
private Integer lookResumeCount;
|
private Integer lookResumeCount;
|
||||||
|
|
||||||
@ApiModelProperty(value = "hr提交部门简历数")
|
@ApiModelProperty(value = "合格简历数")
|
||||||
private Integer passResumeCount;
|
private Integer passResumeCount;
|
||||||
|
|
||||||
@ApiModelProperty(value = "约面人数")
|
@ApiModelProperty(value = "约面人数")
|
||||||
|
|
|
@ -26,12 +26,12 @@ public class ResumeStatVO {
|
||||||
|
|
||||||
@ApiModelProperty(value = "入职人数")
|
@ApiModelProperty(value = "入职人数")
|
||||||
private Long entryCount;
|
private Long entryCount;
|
||||||
|
//
|
||||||
@ApiModelProperty(value = "内推数")
|
// @ApiModelProperty(value = "内推数")
|
||||||
private Integer internalRecommendedSize;
|
// private Integer internalRecommendedSize;
|
||||||
|
//
|
||||||
@ApiModelProperty(value = "内竞数")
|
// @ApiModelProperty(value = "内竞数")
|
||||||
private Integer internalCompetitionSize;
|
// private Integer internalCompetitionSize;
|
||||||
|
|
||||||
@ApiModelProperty(value = "通过比例(终面)")
|
@ApiModelProperty(value = "通过比例(终面)")
|
||||||
private Double passPercent;
|
private Double passPercent;
|
||||||
|
@ -42,6 +42,12 @@ public class ResumeStatVO {
|
||||||
@ApiModelProperty(value = "到面率")
|
@ApiModelProperty(value = "到面率")
|
||||||
private Double arrivePercent;
|
private Double arrivePercent;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "简历合格率")
|
||||||
|
private Double qualifiedPercent;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "约面率")
|
||||||
|
private Double invitePercent;
|
||||||
|
|
||||||
@ApiModelProperty(value = "某月份,某岗位查看简历数")
|
@ApiModelProperty(value = "某月份,某岗位查看简历数")
|
||||||
private List<Integer> postLookResumeCounts;
|
private List<Integer> postLookResumeCounts;
|
||||||
|
|
||||||
|
@ -49,7 +55,7 @@ public class ResumeStatVO {
|
||||||
private List<Integer> postQualifiedResumeCounts;
|
private List<Integer> postQualifiedResumeCounts;
|
||||||
|
|
||||||
@ApiModelProperty(value = "某月份,某岗位简历自投数")
|
@ApiModelProperty(value = "某月份,某岗位简历自投数")
|
||||||
private List<Long> postSelfCounts;
|
private List<Integer> postSelfCounts;
|
||||||
|
|
||||||
@ApiModelProperty(value = "某月份,某岗位简历下载数")
|
@ApiModelProperty(value = "某月份,某岗位简历下载数")
|
||||||
private List<Long> postDownLoadCounts;
|
private List<Long> postDownLoadCounts;
|
||||||
|
|
|
@ -174,16 +174,16 @@
|
||||||
and final_date <![CDATA[>=]]> #{firstDay}
|
and final_date <![CDATA[>=]]> #{firstDay}
|
||||||
and final_date <![CDATA[<=]]> #{lastDay}
|
and final_date <![CDATA[<=]]> #{lastDay}
|
||||||
</if>
|
</if>
|
||||||
<if test="i == 7">
|
<!-- <if test="i == 7">-->
|
||||||
and recruitment_channel = 4
|
<!-- and recruitment_channel = 4-->
|
||||||
and receive_date <![CDATA[>=]]> #{firstDay}
|
<!-- and receive_date <![CDATA[>=]]> #{firstDay}-->
|
||||||
and receive_date <![CDATA[<=]]> #{lastDay}
|
<!-- and receive_date <![CDATA[<=]]> #{lastDay}-->
|
||||||
</if>
|
<!-- </if>-->
|
||||||
<if test="i == 8">
|
<!-- <if test="i == 8">-->
|
||||||
and recruitment_channel = 8
|
<!-- and recruitment_channel = 8-->
|
||||||
and receive_date <![CDATA[>=]]> #{firstDay}
|
<!-- and receive_date <![CDATA[>=]]> #{firstDay}-->
|
||||||
and receive_date <![CDATA[<=]]> #{lastDay}
|
<!-- and receive_date <![CDATA[<=]]> #{lastDay}-->
|
||||||
</if>
|
<!-- </if>-->
|
||||||
|
|
||||||
<if test="hrName!=null and hrName != ''">and hr_name like concat('%', #{hrName}, '%')</if>
|
<if test="hrName!=null and hrName != ''">and hr_name like concat('%', #{hrName}, '%')</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
Loading…
Reference in New Issue