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