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 io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -78,12 +79,6 @@ public class HomePageController extends BaseController {
|
|||
//寻找该月份初试通过人数
|
||||
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();
|
||||
//1.合格简历数量
|
||||
resumeStatVO.setQualifiedCount(resumeFollowRecordList.size());
|
||||
|
@ -97,7 +92,7 @@ public class HomePageController extends BaseController {
|
|||
resumeStatVO.setEntryCount(resumeFollowRecordActualEntryList.stream().filter(record -> Objects.nonNull(record.getActualJoinDate())).count());
|
||||
//6.简历来源:下载
|
||||
resumeStatVO.setDownLoadCounts(resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getResumeSource()) && "2".equals(record.getResumeSource())).count());
|
||||
//7.简历来源:自投
|
||||
//7.简历处理-自投
|
||||
if(resumeHandleRecordList!=null){
|
||||
resumeStatVO.setSelfCounts(resumeHandleRecordList.stream()
|
||||
.filter(record -> record.getSelfCounts() != null)
|
||||
|
@ -106,7 +101,6 @@ public class HomePageController extends BaseController {
|
|||
}else {
|
||||
resumeStatVO.setSelfCounts(0);
|
||||
}
|
||||
|
||||
//8.封装实际到面人数
|
||||
resumeStatVO.setActualArriveCounts(resumeFollowRecordActualArrivedList.stream().filter(record -> Objects.nonNull(record.getFirstReach()) && "1".equals(record.getFirstReach())).count());
|
||||
//9.通过比例(终面)=通过人数(终面)/初面实际到面人数
|
||||
|
@ -128,17 +122,6 @@ public class HomePageController extends BaseController {
|
|||
} else {
|
||||
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()
|
||||
|
@ -232,7 +215,7 @@ public class HomePageController extends BaseController {
|
|||
//某月份,某岗位合格简历数
|
||||
List<Integer> postQualifiedResumeCounts = new ArrayList<>();
|
||||
//某月份,某岗位简历自投数
|
||||
List<Long> postSelfCounts = new ArrayList<>();
|
||||
List<Integer> postSelfCounts = new ArrayList<>();
|
||||
//某月份,某岗位简历下载数
|
||||
List<Long> postDownLoadCounts = new ArrayList<>();
|
||||
//某月份,某岗位约面人数
|
||||
|
@ -280,11 +263,21 @@ public class HomePageController extends BaseController {
|
|||
}
|
||||
|
||||
//封装该岗位的自投数
|
||||
if (!CollectionUtils.isEmpty(resumeFollowRecordListByPostId)) {
|
||||
postDetailDTO.setPostSelfCounts(resumeFollowRecordListByPostId.stream().filter(record -> Objects.nonNull(record.getResumeSource()) && "1".equals(record.getResumeSource())).count());
|
||||
// if (!CollectionUtils.isEmpty(resumeFollowRecordListByPostId)) {
|
||||
// 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 {
|
||||
postDetailDTO.setPostSelfCounts(0L);
|
||||
postDetailDTO.setPostSelfCounts(0);
|
||||
}
|
||||
|
||||
//封装该岗位的下载数
|
||||
if (!CollectionUtils.isEmpty(resumeFollowRecordListByPostId)) {
|
||||
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);
|
||||
}
|
||||
|
||||
//封装简历合格率
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -321,7 +321,7 @@ public class RecruitInterviewController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:add')")
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:list')")
|
||||
@GetMapping("/interview/tag")
|
||||
@ApiOperation(value = "返回面试标签的树状列表")
|
||||
public AjaxResult InterviewTag() {
|
||||
|
|
|
@ -12,7 +12,7 @@ public class PostDetailDTO {
|
|||
private String postName;
|
||||
private Integer postLookResumeCounts;
|
||||
private Integer postQualifiedResumeCounts;
|
||||
private Long postSelfCounts;
|
||||
private Integer postSelfCounts;
|
||||
private Long postDownLoadCounts;
|
||||
private Integer postInviteCounts;
|
||||
private Long postArriveCounts;
|
||||
|
|
|
@ -54,7 +54,7 @@ public class FollowVO {
|
|||
@ApiModelProperty(value = "查看过该岗位多少简历数")
|
||||
private Integer lookResumeCount;
|
||||
|
||||
@ApiModelProperty(value = "hr提交部门简历数")
|
||||
@ApiModelProperty(value = "合格简历数")
|
||||
private Integer passResumeCount;
|
||||
|
||||
@ApiModelProperty(value = "约面人数")
|
||||
|
|
|
@ -26,12 +26,12 @@ public class ResumeStatVO {
|
|||
|
||||
@ApiModelProperty(value = "入职人数")
|
||||
private Long entryCount;
|
||||
|
||||
@ApiModelProperty(value = "内推数")
|
||||
private Integer internalRecommendedSize;
|
||||
|
||||
@ApiModelProperty(value = "内竞数")
|
||||
private Integer internalCompetitionSize;
|
||||
//
|
||||
// @ApiModelProperty(value = "内推数")
|
||||
// private Integer internalRecommendedSize;
|
||||
//
|
||||
// @ApiModelProperty(value = "内竞数")
|
||||
// private Integer internalCompetitionSize;
|
||||
|
||||
@ApiModelProperty(value = "通过比例(终面)")
|
||||
private Double passPercent;
|
||||
|
@ -42,6 +42,12 @@ public class ResumeStatVO {
|
|||
@ApiModelProperty(value = "到面率")
|
||||
private Double arrivePercent;
|
||||
|
||||
@ApiModelProperty(value = "简历合格率")
|
||||
private Double qualifiedPercent;
|
||||
|
||||
@ApiModelProperty(value = "约面率")
|
||||
private Double invitePercent;
|
||||
|
||||
@ApiModelProperty(value = "某月份,某岗位查看简历数")
|
||||
private List<Integer> postLookResumeCounts;
|
||||
|
||||
|
@ -49,7 +55,7 @@ public class ResumeStatVO {
|
|||
private List<Integer> postQualifiedResumeCounts;
|
||||
|
||||
@ApiModelProperty(value = "某月份,某岗位简历自投数")
|
||||
private List<Long> postSelfCounts;
|
||||
private List<Integer> postSelfCounts;
|
||||
|
||||
@ApiModelProperty(value = "某月份,某岗位简历下载数")
|
||||
private List<Long> postDownLoadCounts;
|
||||
|
|
|
@ -174,16 +174,16 @@
|
|||
and final_date <![CDATA[>=]]> #{firstDay}
|
||||
and final_date <![CDATA[<=]]> #{lastDay}
|
||||
</if>
|
||||
<if test="i == 7">
|
||||
and recruitment_channel = 4
|
||||
and receive_date <![CDATA[>=]]> #{firstDay}
|
||||
and receive_date <![CDATA[<=]]> #{lastDay}
|
||||
</if>
|
||||
<if test="i == 8">
|
||||
and recruitment_channel = 8
|
||||
and receive_date <![CDATA[>=]]> #{firstDay}
|
||||
and receive_date <![CDATA[<=]]> #{lastDay}
|
||||
</if>
|
||||
<!-- <if test="i == 7">-->
|
||||
<!-- and recruitment_channel = 4-->
|
||||
<!-- and receive_date <![CDATA[>=]]> #{firstDay}-->
|
||||
<!-- and receive_date <![CDATA[<=]]> #{lastDay}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="i == 8">-->
|
||||
<!-- and recruitment_channel = 8-->
|
||||
<!-- and receive_date <![CDATA[>=]]> #{firstDay}-->
|
||||
<!-- and receive_date <![CDATA[<=]]> #{lastDay}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<if test="hrName!=null and hrName != ''">and hr_name like concat('%', #{hrName}, '%')</if>
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue