parent
ac3c8c1617
commit
6af7e4207c
|
@ -7,8 +7,8 @@ ruoyi:
|
||||||
# 版权年份
|
# 版权年份
|
||||||
copyrightYear: 2024
|
copyrightYear: 2024
|
||||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||||
#profile: D:/zeroerr/uploadPath
|
profile: D:/zeroerr/uploadPath
|
||||||
profile: /home/zeroerr_oa/uploadPath
|
#profile: /home/zeroerr_oa/uploadPath
|
||||||
# 获取ip地址开关
|
# 获取ip地址开关
|
||||||
addressEnabled: false
|
addressEnabled: false
|
||||||
# 验证码类型 math 数字计算 char 字符验证
|
# 验证码类型 math 数字计算 char 字符验证
|
||||||
|
@ -69,15 +69,15 @@ spring:
|
||||||
# redis 配置
|
# redis 配置
|
||||||
redis:
|
redis:
|
||||||
# 地址
|
# 地址
|
||||||
host: 192.168.1.189
|
#host: 192.168.1.189
|
||||||
#host: localhost
|
host: localhost
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
port: 6379
|
port: 6379
|
||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: 0
|
database: 0
|
||||||
# 密码
|
# 密码
|
||||||
password: 123456
|
#password: 123456
|
||||||
#password:
|
password:
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
lettuce:
|
lettuce:
|
||||||
|
|
|
@ -78,6 +78,12 @@ 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());
|
||||||
|
@ -92,7 +98,15 @@ public class HomePageController extends BaseController {
|
||||||
//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.简历来源:自投
|
||||||
resumeStatVO.setSelfCounts(resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getResumeSource()) && "1".equals(record.getResumeSource())).count());
|
if(resumeHandleRecordList!=null){
|
||||||
|
resumeStatVO.setSelfCounts(resumeHandleRecordList.stream()
|
||||||
|
.filter(record -> record.getSelfCounts() != null)
|
||||||
|
.mapToInt(ResumeHandleRecord::getSelfCounts)
|
||||||
|
.sum());
|
||||||
|
}else {
|
||||||
|
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. 通过比例(终面)=通过人数(终面)/初面实际到面人数
|
||||||
|
@ -105,7 +119,7 @@ public class HomePageController extends BaseController {
|
||||||
resumeStatVO.setPassPercent(0d);
|
resumeStatVO.setPassPercent(0d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//7.入职比例=入职人数/初面实际到面人数
|
//10.入职比例=入职人数/初面实际到面人数
|
||||||
if (resumeStatVO.getActualArriveCounts() != null) {
|
if (resumeStatVO.getActualArriveCounts() != null) {
|
||||||
if (resumeStatVO.getActualArriveCounts() != 0L) {
|
if (resumeStatVO.getActualArriveCounts() != 0L) {
|
||||||
BigDecimal entryPercentage = new BigDecimal(resumeStatVO.getEntryCount()).divide(new BigDecimal(resumeStatVO.getActualArriveCounts()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
|
BigDecimal entryPercentage = new BigDecimal(resumeStatVO.getEntryCount()).divide(new BigDecimal(resumeStatVO.getActualArriveCounts()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
|
||||||
|
@ -114,6 +128,18 @@ 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()
|
||||||
// .collect(Collectors.groupingBy(ResumeHandleRecord::getPostId,
|
// .collect(Collectors.groupingBy(ResumeHandleRecord::getPostId,
|
||||||
|
@ -174,7 +200,6 @@ public class HomePageController extends BaseController {
|
||||||
// resumeStatVO.setPostNameList(postNameList);
|
// resumeStatVO.setPostNameList(postNameList);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//11.合格简历百分比:100 ;电话面试通过百分比:电话通过人数/简历合格数 ; 初试通过百分比: 初试通过人数/初试到面人数 ; 终试通过百分比:终试通过人数/终试到面人数。
|
//11.合格简历百分比:100 ;电话面试通过百分比:电话通过人数/简历合格数 ; 初试通过百分比: 初试通过人数/初试到面人数 ; 终试通过百分比:终试通过人数/终试到面人数。
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -189,6 +189,7 @@ public class RecruitFollowController extends BaseController {
|
||||||
if (followVO.getPostId() == null) followVO.setPostId(0L);
|
if (followVO.getPostId() == null) followVO.setPostId(0L);
|
||||||
if (followVO.getPostName() == null) followVO.setPostName("");
|
if (followVO.getPostName() == null) followVO.setPostName("");
|
||||||
if (followVO.getDeptId() == null) followVO.setDeptId(0L);
|
if (followVO.getDeptId() == null) followVO.setDeptId(0L);
|
||||||
|
if (followVO.getDeptName() == null) followVO.setDeptName(handleDeptName(followVO.getPostId()));
|
||||||
if (followVO.getHrId() == null) followVO.setHrId(0L);
|
if (followVO.getHrId() == null) followVO.setHrId(0L);
|
||||||
if (followVO.getHrName() == null) followVO.setHrName("");
|
if (followVO.getHrName() == null) followVO.setHrName("");
|
||||||
if (followVO.getPostCount() == null) followVO.setPostCount(0);
|
if (followVO.getPostCount() == null) followVO.setPostCount(0);
|
||||||
|
@ -224,6 +225,10 @@ public class RecruitFollowController extends BaseController {
|
||||||
return AjaxResult.success(followVOList);
|
return AjaxResult.success(followVOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String handleDeptName(Long postId) {
|
||||||
|
return recruitStructureService.findTopLevelDepartmentNameByNodeId(postId);
|
||||||
|
}
|
||||||
|
|
||||||
private void handleFollowRecords(FollowDTO req, List<FollowVO> followVOList) {
|
private void handleFollowRecords(FollowDTO req, List<FollowVO> followVOList) {
|
||||||
String hrName = req.getHrName();
|
String hrName = req.getHrName();
|
||||||
LocalDate startDate = req.getStartDate();
|
LocalDate startDate = req.getStartDate();
|
||||||
|
@ -293,4 +298,6 @@ public class RecruitFollowController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,6 +103,12 @@ public class ResumeHandleRecord implements Serializable {
|
||||||
@TableField(value = "dept_name")
|
@TableField(value = "dept_name")
|
||||||
private String deptName;
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自投数量
|
||||||
|
*/
|
||||||
|
@TableField(value = "self_counts")
|
||||||
|
private Integer selfCounts;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
|
@ -27,6 +27,12 @@ public class ResumeStatVO {
|
||||||
@ApiModelProperty(value = "入职人数")
|
@ApiModelProperty(value = "入职人数")
|
||||||
private Long entryCount;
|
private Long entryCount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "内推数")
|
||||||
|
private Integer internalRecommendedSize;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "内竞数")
|
||||||
|
private Integer internalCompetitionSize;
|
||||||
|
|
||||||
@ApiModelProperty(value = "通过比例(终面)")
|
@ApiModelProperty(value = "通过比例(终面)")
|
||||||
private Double passPercent;
|
private Double passPercent;
|
||||||
|
|
||||||
|
@ -79,7 +85,7 @@ public class ResumeStatVO {
|
||||||
private Integer findResumeCounts;
|
private Integer findResumeCounts;
|
||||||
|
|
||||||
@ApiModelProperty(value = "自投数量")
|
@ApiModelProperty(value = "自投数量")
|
||||||
private Long selfCounts;
|
private Integer selfCounts;
|
||||||
|
|
||||||
@ApiModelProperty(value = "下载数量")
|
@ApiModelProperty(value = "下载数量")
|
||||||
private Long downLoadCounts;
|
private Long downLoadCounts;
|
||||||
|
|
|
@ -174,6 +174,17 @@
|
||||||
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">
|
||||||
|
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>
|
<if test="hrName!=null and hrName != ''">and hr_name like concat('%', #{hrName}, '%')</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<result property="greetNum" column="greet_num" jdbcType="INTEGER"/>
|
<result property="greetNum" column="greet_num" jdbcType="INTEGER"/>
|
||||||
<result property="submitNum" column="submit_num" jdbcType="INTEGER"/>
|
<result property="submitNum" column="submit_num" jdbcType="INTEGER"/>
|
||||||
<result property="qualifiedNum" column="qualified_num" jdbcType="INTEGER"/>
|
<result property="qualifiedNum" column="qualified_num" jdbcType="INTEGER"/>
|
||||||
|
<result property="selfCounts" column="self_counts" jdbcType="INTEGER"/>
|
||||||
<result property="receiveInviteNum" column="receive_invite_num" jdbcType="INTEGER"/>
|
<result property="receiveInviteNum" column="receive_invite_num" jdbcType="INTEGER"/>
|
||||||
<result property="operatorId" column="operator_id" />
|
<result property="operatorId" column="operator_id" />
|
||||||
<result property="operatorName" column="operator_name" />
|
<result property="operatorName" column="operator_name" />
|
||||||
|
@ -25,7 +26,7 @@
|
||||||
id,post_id,post_name,
|
id,post_id,post_name,
|
||||||
handle_date,recruitment_channel,seen_num,
|
handle_date,recruitment_channel,seen_num,
|
||||||
greet_num,submit_num,qualified_num,
|
greet_num,submit_num,qualified_num,
|
||||||
receive_invite_num,operator_id,operator_name,dept_id,dept_name
|
receive_invite_num,operator_id,operator_name,dept_id,dept_name,self_counts
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="listByCondition" resultMap="BaseResultMap">
|
<select id="listByCondition" resultMap="BaseResultMap">
|
||||||
|
|
|
@ -59,4 +59,6 @@ public interface RecruitStructureMapper extends BaseMapper<RecruitStructure> {
|
||||||
RecruitStructure getDeptByNodeId(Long nodeId);
|
RecruitStructure getDeptByNodeId(Long nodeId);
|
||||||
|
|
||||||
List<Long> filterByPostIdList(@Param("uniquePostIdList") List<Long> uniquePostIdList);
|
List<Long> filterByPostIdList(@Param("uniquePostIdList") List<Long> uniquePostIdList);
|
||||||
|
|
||||||
|
String findTopLevelDepartmentNameByNodeId(Long postId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,4 +49,6 @@ public interface RecruitStructureService extends IService<RecruitStructure> {
|
||||||
RecruitStructure getDeptByNodeId(Long nodeId);
|
RecruitStructure getDeptByNodeId(Long nodeId);
|
||||||
|
|
||||||
List<Long> filterByPostIdList(List<Long> uniquePostIdList);
|
List<Long> filterByPostIdList(List<Long> uniquePostIdList);
|
||||||
|
|
||||||
|
String findTopLevelDepartmentNameByNodeId(Long postId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,6 +191,11 @@ public class RecruitStructureServiceImpl extends ServiceImpl<RecruitStructureMap
|
||||||
return recruitStructureMapper.filterByPostIdList(uniquePostIdList);
|
return recruitStructureMapper.filterByPostIdList(uniquePostIdList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String findTopLevelDepartmentNameByNodeId(Long postId) {
|
||||||
|
return recruitStructureMapper.findTopLevelDepartmentNameByNodeId(postId);
|
||||||
|
}
|
||||||
|
|
||||||
private List<TreeSelect> buildDeptTreeSelect(List<RecruitStructure> depts) {
|
private List<TreeSelect> buildDeptTreeSelect(List<RecruitStructure> depts) {
|
||||||
List<RecruitStructure> deptTrees = buildDeptTree(depts);
|
List<RecruitStructure> deptTrees = buildDeptTree(depts);
|
||||||
return deptTrees.stream().map(TreeSelect::new).collect(Collectors.toList());
|
return deptTrees.stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||||
|
|
|
@ -208,7 +208,8 @@
|
||||||
|
|
||||||
<update id="updatePostType">
|
<update id="updatePostType">
|
||||||
update recruit_structure
|
update recruit_structure
|
||||||
set post_type=#{i},task_id=#{taskId}
|
set post_type=#{i},
|
||||||
|
task_id=#{taskId}
|
||||||
where node_id = #{structurePostId}
|
where node_id = #{structurePostId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
@ -227,7 +228,8 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectDeptList" parameterType="cn.zeroerr.common.core.domain.entity.RecruitStructure" resultMap="RecruitStructureResult">
|
<select id="selectDeptList" parameterType="cn.zeroerr.common.core.domain.entity.RecruitStructure"
|
||||||
|
resultMap="RecruitStructureResult">
|
||||||
<include refid="selectNodeVo"/>
|
<include refid="selectNodeVo"/>
|
||||||
where d.del_flag = '0'
|
where d.del_flag = '0'
|
||||||
and type=0
|
and type=0
|
||||||
|
@ -249,7 +251,8 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPostAll" resultMap="RecruitStructureResult">
|
<select id="selectPostAll" resultMap="RecruitStructureResult">
|
||||||
<include refid="selectNodeVo"/> where type =1 and status =0
|
<include refid="selectNodeVo"/>
|
||||||
|
where type =1 and status =0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
@ -258,7 +261,8 @@
|
||||||
from recruit_structure p
|
from recruit_structure p
|
||||||
left join sys_user_post up on up.post_id = p.node_id
|
left join sys_user_post up on up.post_id = p.node_id
|
||||||
left join sys_user u on u.user_id = up.user_id
|
left join sys_user u on u.user_id = up.user_id
|
||||||
where u.user_id = #{userId} and p.type=1
|
where u.user_id = #{userId}
|
||||||
|
and p.type = 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getList" parameterType="String" resultMap="RecruitStructureResult">
|
<select id="getList" parameterType="String" resultMap="RecruitStructureResult">
|
||||||
|
@ -266,44 +270,35 @@
|
||||||
from recruit_structure p
|
from recruit_structure p
|
||||||
left join sys_user_post up on up.post_id = p.node_id
|
left join sys_user_post up on up.post_id = p.node_id
|
||||||
left join sys_user u on u.user_id = up.user_id
|
left join sys_user u on u.user_id = up.user_id
|
||||||
where u.user_name = #{userName} and p.type=1
|
where u.user_name = #{userName}
|
||||||
|
and p.type = 1
|
||||||
</select>
|
</select>
|
||||||
<select id="getDeptByNodeId" parameterType="Long" resultMap="RecruitStructureResult">
|
<select id="getDeptByNodeId" parameterType="Long" resultMap="RecruitStructureResult">
|
||||||
WITH RECURSIVE cte AS (
|
WITH RECURSIVE cte AS (
|
||||||
SELECT
|
SELECT node_id,
|
||||||
node_id,
|
|
||||||
parent_id,
|
parent_id,
|
||||||
type,
|
type,
|
||||||
node_name
|
node_name
|
||||||
FROM
|
FROM recruit_structure
|
||||||
recruit_structure
|
WHERE node_id = #{nodeId}
|
||||||
WHERE
|
|
||||||
node_id = #{nodeId}
|
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|
||||||
SELECT
|
SELECT rs.node_id,
|
||||||
rs.node_id,
|
|
||||||
rs.parent_id,
|
rs.parent_id,
|
||||||
rs.type,
|
rs.type,
|
||||||
rs.node_name
|
rs.node_name
|
||||||
FROM
|
FROM recruit_structure rs
|
||||||
recruit_structure rs
|
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
cte ON rs.node_id = cte.parent_id
|
cte ON rs.node_id = cte.parent_id
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT node_id,
|
||||||
node_id,
|
|
||||||
parent_id,
|
parent_id,
|
||||||
type,
|
type,
|
||||||
node_name
|
node_name
|
||||||
FROM
|
FROM cte
|
||||||
cte
|
WHERE type = 0
|
||||||
WHERE
|
ORDER BY parent_id ASC LIMIT 1
|
||||||
type = 0
|
|
||||||
ORDER BY
|
|
||||||
parent_id ASC
|
|
||||||
LIMIT 1
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
@ -320,4 +315,28 @@
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findTopLevelDepartmentNameByNodeId" parameterType="long" resultType="string">
|
||||||
|
WITH RECURSIVE hierarchy AS (
|
||||||
|
SELECT node_id,
|
||||||
|
parent_id,
|
||||||
|
node_name,
|
||||||
|
type
|
||||||
|
FROM recruit_structure
|
||||||
|
WHERE node_id = #{nodeId}
|
||||||
|
UNION ALL
|
||||||
|
SELECT rs.node_id,
|
||||||
|
rs.parent_id,
|
||||||
|
rs.node_name,
|
||||||
|
rs.type
|
||||||
|
FROM recruit_structure rs
|
||||||
|
INNER JOIN
|
||||||
|
hierarchy h ON rs.node_id = h.parent_id
|
||||||
|
)
|
||||||
|
SELECT node_name
|
||||||
|
FROM hierarchy
|
||||||
|
WHERE type = 0
|
||||||
|
ORDER BY node_id LIMIT 1
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue