1.删除面试管理里原有的其他字段,改为面试状态字段 2.新增面试状态标签数据库表以及相关接口。
This commit is contained in:
parent
2ce5eeefd7
commit
1af6d8c368
|
@ -18,10 +18,13 @@ import cn.zeroerr.common.utils.file.FileUtils;
|
||||||
import cn.zeroerr.common.utils.file.MimeTypeUtils;
|
import cn.zeroerr.common.utils.file.MimeTypeUtils;
|
||||||
import cn.zeroerr.common.utils.poi.ExcelUtil;
|
import cn.zeroerr.common.utils.poi.ExcelUtil;
|
||||||
import cn.zeroerr.domain.dto.ToppingDTO;
|
import cn.zeroerr.domain.dto.ToppingDTO;
|
||||||
|
import cn.zeroerr.domain.entity.InterviewTag;
|
||||||
import cn.zeroerr.domain.entity.PostPlanFollow;
|
import cn.zeroerr.domain.entity.PostPlanFollow;
|
||||||
import cn.zeroerr.domain.entity.RecruitPost;
|
import cn.zeroerr.domain.entity.RecruitPost;
|
||||||
import cn.zeroerr.domain.entity.ResumeFollowRecord;
|
import cn.zeroerr.domain.entity.ResumeFollowRecord;
|
||||||
|
import cn.zeroerr.domain.vo.InterViewTagVO;
|
||||||
import cn.zeroerr.domain.vo.UserVO;
|
import cn.zeroerr.domain.vo.UserVO;
|
||||||
|
import cn.zeroerr.service.InterviewTagService;
|
||||||
import cn.zeroerr.service.RecruitPostService;
|
import cn.zeroerr.service.RecruitPostService;
|
||||||
import cn.zeroerr.service.ResumeFollowRecordService;
|
import cn.zeroerr.service.ResumeFollowRecordService;
|
||||||
import cn.zeroerr.system.mapper.RecruitStructureMapper;
|
import cn.zeroerr.system.mapper.RecruitStructureMapper;
|
||||||
|
@ -45,8 +48,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/recruit/process")
|
@RequestMapping("/recruit/process")
|
||||||
|
@ -70,6 +72,10 @@ public class RecruitInterviewController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysDictDataService iSysDictDataService;
|
private ISysDictDataService iSysDictDataService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private InterviewTagService interviewTagService;
|
||||||
|
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:list')")
|
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:list')")
|
||||||
@GetMapping("/interview/getAllUser")
|
@GetMapping("/interview/getAllUser")
|
||||||
@ApiOperation(value = "查询所有的用户(领导+hr)")
|
@ApiOperation(value = "查询所有的用户(领导+hr)")
|
||||||
|
@ -110,8 +116,65 @@ public class RecruitInterviewController extends BaseController {
|
||||||
}
|
}
|
||||||
startPage();
|
startPage();
|
||||||
//找出所有置顶后的排序数据
|
//找出所有置顶后的排序数据
|
||||||
List<ResumeFollowRecord> resumeFollowRecordListTopping = resumeFollowRecordService.listByQuery(req);
|
List<ResumeFollowRecord> resumeFollowRecordList = resumeFollowRecordService.listByQuery(req);
|
||||||
return getDataTable(resumeFollowRecordListTopping);
|
if(!CollectionUtils.isEmpty(resumeFollowRecordList)){
|
||||||
|
//将每个tags,拿出来,分类
|
||||||
|
resumeFollowRecordList.forEach(
|
||||||
|
record -> {
|
||||||
|
if(record.getTags() != null && !record.getTags().trim().isEmpty()){
|
||||||
|
String tags = record.getTags();
|
||||||
|
String[] tagGroups = tags.split(";");
|
||||||
|
Map<String, List<String>> groupedTags = new HashMap<>();
|
||||||
|
// 将每个tags,拿出来,分类
|
||||||
|
for (String tag : tagGroups) {
|
||||||
|
String[] tagArray = tag.split(",");
|
||||||
|
String key = tagArray[0]; // 第一个数字作为分组的键
|
||||||
|
List<String> tagsList = Arrays.asList(tagArray);
|
||||||
|
groupedTags.computeIfAbsent(key, k -> new ArrayList<>()).add(tag);
|
||||||
|
}
|
||||||
|
List<String> pending=new ArrayList<>();
|
||||||
|
List<String> pass=new ArrayList<>();
|
||||||
|
List<String> fail=new ArrayList<>();
|
||||||
|
|
||||||
|
for (Map.Entry<String, List<String>> entry : groupedTags.entrySet()) {
|
||||||
|
// 根据key进行分类 (1:待定 2:通过 3:未通过)
|
||||||
|
if(entry.getKey().equals("1")){
|
||||||
|
//将每个string的以逗号分割,取出最后的元素
|
||||||
|
for (String value : entry.getValue()) {
|
||||||
|
String[] elements = value.split(",");
|
||||||
|
String lastElement = elements[elements.length - 1];
|
||||||
|
//根据这个元素,找到对应的名字
|
||||||
|
InterviewTag tag = interviewTagService.getById(lastElement);
|
||||||
|
pending.add(tag.getTagName());
|
||||||
|
}
|
||||||
|
}else if(entry.getKey().equals("2")){
|
||||||
|
//将每个string的以逗号分割,取出最后的元素
|
||||||
|
for (String value : entry.getValue()) {
|
||||||
|
String[] elements = value.split(",");
|
||||||
|
String lastElement = elements[elements.length - 1];
|
||||||
|
//根据这个元素,找到对应的名字
|
||||||
|
InterviewTag tag = interviewTagService.getById(lastElement);
|
||||||
|
pass.add(tag.getTagName());
|
||||||
|
}
|
||||||
|
}else if(entry.getKey().equals("3")){
|
||||||
|
//将每个string的以逗号分割,取出最后的元素
|
||||||
|
for (String value : entry.getValue()) {
|
||||||
|
String[] elements = value.split(",");
|
||||||
|
String lastElement = elements[elements.length - 1];
|
||||||
|
//根据这个元素,找到对应的名字
|
||||||
|
InterviewTag tag = interviewTagService.getById(lastElement);
|
||||||
|
fail.add(tag.getTagName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
record.setPending(pending);
|
||||||
|
record.setPass(pass);
|
||||||
|
record.setFail(fail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return getDataTable(resumeFollowRecordList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:add')")
|
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:add')")
|
||||||
|
@ -258,6 +321,36 @@ public class RecruitInterviewController extends BaseController {
|
||||||
}
|
}
|
||||||
return nameList.toString();
|
return nameList.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:add')")
|
||||||
|
@GetMapping("/interview/tag")
|
||||||
|
@ApiOperation(value = "返回面试标签的树状列表")
|
||||||
|
public AjaxResult InterviewTag() {
|
||||||
|
List<InterviewTag> allTags = interviewTagService.list();
|
||||||
|
List<InterViewTagVO> interViewTagVOList = buildTree(allTags, null);
|
||||||
|
return AjaxResult.success(interViewTagVOList);
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<InterViewTagVO> buildTree(List<InterviewTag> allTags, Long parentId) {
|
||||||
|
List<InterViewTagVO> result = new ArrayList<>();
|
||||||
|
for (InterviewTag tag : allTags) {
|
||||||
|
if ((parentId == null && tag.getParentId() == null) || (parentId != null && parentId.equals(tag.getParentId()))) {
|
||||||
|
InterViewTagVO vo = new InterViewTagVO();
|
||||||
|
vo.setValue(tag.getTagId());
|
||||||
|
vo.setLabel(tag.getTagName());
|
||||||
|
|
||||||
|
List<InterViewTagVO> children = buildTree(allTags, tag.getTagId());
|
||||||
|
if (!children.isEmpty()) {
|
||||||
|
vo.setChildren(children);
|
||||||
|
}
|
||||||
|
result.add(vo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
package cn.zeroerr.domain.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @TableName interview_tag
|
||||||
|
*/
|
||||||
|
@TableName(value ="interview_tag")
|
||||||
|
@Data
|
||||||
|
public class InterviewTag implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "tag_id", type = IdType.AUTO)
|
||||||
|
private Long tagId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父节点id
|
||||||
|
*/
|
||||||
|
@TableField(value = "parent_id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签名
|
||||||
|
*/
|
||||||
|
@TableField(value = "tag_name")
|
||||||
|
private String tagName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -291,6 +292,12 @@ public class ResumeFollowRecord implements Serializable {
|
||||||
@TableField(value = "topping")
|
@TableField(value = "topping")
|
||||||
private Boolean topping;
|
private Boolean topping;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签是否置顶
|
||||||
|
*/
|
||||||
|
@TableField(value = "tags")
|
||||||
|
private String tags;
|
||||||
/**
|
/**
|
||||||
* 置顶时间
|
* 置顶时间
|
||||||
*/
|
*/
|
||||||
|
@ -299,6 +306,24 @@ public class ResumeFollowRecord implements Serializable {
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime toppingTime;
|
private LocalDateTime toppingTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待定
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<String> pending;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<String> pass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未通过
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<String> fail;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
package cn.zeroerr.domain.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel
|
||||||
|
@Data
|
||||||
|
public class InterViewTagVO {
|
||||||
|
@ApiModelProperty("标签值")
|
||||||
|
private Long value;
|
||||||
|
|
||||||
|
@ApiModelProperty("标签名")
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
@ApiModelProperty("子节点")
|
||||||
|
private List<InterViewTagVO> children;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package cn.zeroerr.mapper;
|
||||||
|
|
||||||
|
import cn.zeroerr.domain.entity.InterviewTag;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Ze-java
|
||||||
|
* @description 针对表【interview_tag】的数据库操作Mapper
|
||||||
|
* @createDate 2024-06-29 10:01:59
|
||||||
|
* @Entity cn.zeroerr.domain.entity.InterviewTag
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface InterviewTagMapper extends BaseMapper<InterviewTag> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
package cn.zeroerr.service;
|
||||||
|
|
||||||
|
import cn.zeroerr.domain.entity.InterviewTag;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Ze-java
|
||||||
|
* @description 针对表【interview_tag】的数据库操作Service
|
||||||
|
* @createDate 2024-06-29 10:01:59
|
||||||
|
*/
|
||||||
|
public interface InterviewTagService extends IService<InterviewTag> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package cn.zeroerr.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import cn.zeroerr.domain.entity.InterviewTag;
|
||||||
|
import cn.zeroerr.service.InterviewTagService;
|
||||||
|
import cn.zeroerr.mapper.InterviewTagMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Ze-java
|
||||||
|
* @description 针对表【interview_tag】的数据库操作Service实现
|
||||||
|
* @createDate 2024-06-29 10:01:59
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class InterviewTagServiceImpl extends ServiceImpl<InterviewTagMapper, InterviewTag>
|
||||||
|
implements InterviewTagService{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,6 @@
|
||||||
<if test="req.entryId!=null">and entry_id = #{req.entryId}</if>
|
<if test="req.entryId!=null">and entry_id = #{req.entryId}</if>
|
||||||
<if test="req.hrId!=null">and hr_id = #{req.hrId}</if>
|
<if test="req.hrId!=null">and hr_id = #{req.hrId}</if>
|
||||||
<if test="req.isEntry!=null">and is_entry = #{req.isEntry}</if>
|
<if test="req.isEntry!=null">and is_entry = #{req.isEntry}</if>
|
||||||
order by final_pass_date desc
|
order by join_date desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="cn.zeroerr.mapper.InterviewTagMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="cn.zeroerr.domain.entity.InterviewTag">
|
||||||
|
<id property="tagId" column="tag_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="parentId" column="parent_id" jdbcType="BIGINT"/>
|
||||||
|
<result property="tagName" column="tag_name" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
tag_id,parent_id,tag_name
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
|
@ -40,6 +40,7 @@
|
||||||
<result property="updateDate" column="update_date" jdbcType="DATE"/>
|
<result property="updateDate" column="update_date" jdbcType="DATE"/>
|
||||||
<result property="actualJoinDate" column="actual_join_date" jdbcType="DATE"/>
|
<result property="actualJoinDate" column="actual_join_date" jdbcType="DATE"/>
|
||||||
<result property="specialReason" column="special_reason" jdbcType="VARCHAR"/>
|
<result property="specialReason" column="special_reason" jdbcType="VARCHAR"/>
|
||||||
|
<result property="tags" column="tags" jdbcType="VARCHAR"/>
|
||||||
<result property="topping" column="topping" />
|
<result property="topping" column="topping" />
|
||||||
<result property="toppingTime" column="topping_time" />
|
<result property="toppingTime" column="topping_time" />
|
||||||
<result property="file" column="file" />
|
<result property="file" column="file" />
|
||||||
|
@ -57,7 +58,7 @@
|
||||||
second_reach,second_interviewer_ids,second_pass,
|
second_reach,second_interviewer_ids,second_pass,
|
||||||
final_date,final_reach,final_interviewer_ids,
|
final_date,final_reach,final_interviewer_ids,
|
||||||
final_pass,accept_offer,join_date,create_date,update_date,actual_join_date,
|
final_pass,accept_offer,join_date,create_date,update_date,actual_join_date,
|
||||||
fail_reason,special_reason,file,topping,topping_time
|
fail_reason,special_reason,file,topping,topping_time,tags
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="listByQuery" resultMap="BaseResultMap">
|
<select id="listByQuery" resultMap="BaseResultMap">
|
||||||
|
|
Loading…
Reference in New Issue