1.新增hr只能看的自己上传的简历 2.新增面试管理-置顶功能
This commit is contained in:
parent
5805dbfb36
commit
09125338e4
|
@ -5,6 +5,7 @@ import cn.zeroerr.common.config.RuoYiConfig;
|
|||
import cn.zeroerr.common.constant.Constants;
|
||||
import cn.zeroerr.common.core.controller.BaseController;
|
||||
import cn.zeroerr.common.core.domain.AjaxResult;
|
||||
import cn.zeroerr.common.core.domain.entity.SysRole;
|
||||
import cn.zeroerr.common.core.domain.entity.SysUser;
|
||||
import cn.zeroerr.common.core.domain.model.LoginUser;
|
||||
import cn.zeroerr.common.core.page.TableDataInfo;
|
||||
|
@ -13,6 +14,7 @@ import cn.zeroerr.common.utils.StringUtils;
|
|||
import cn.zeroerr.common.utils.file.FileUploadUtils;
|
||||
import cn.zeroerr.common.utils.file.FileUtils;
|
||||
import cn.zeroerr.common.utils.file.MimeTypeUtils;
|
||||
import cn.zeroerr.domain.dto.ToppingDTO;
|
||||
import cn.zeroerr.domain.entity.PostPlanFollow;
|
||||
import cn.zeroerr.domain.entity.RecruitPost;
|
||||
import cn.zeroerr.domain.entity.ResumeFollowRecord;
|
||||
|
@ -36,6 +38,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -79,9 +82,33 @@ public class RecruitInterviewController extends BaseController {
|
|||
@ApiOperation(value = "获取《面试管理》简历跟进记录列表")
|
||||
public TableDataInfo getResumeRecordList(ResumeFollowRecord req){
|
||||
startPage();
|
||||
//获取操作人的角色
|
||||
List<ResumeFollowRecord> resumeFollowRecordList= resumeFollowRecordService.listByQuery(req);
|
||||
return getDataTable(resumeFollowRecordList);
|
||||
//获取操作人的角色,如果是hr或者hr其他角色,则只显示自己的信息
|
||||
//根据用户id获取所有的该审批人的角色ids
|
||||
boolean isHr = false;
|
||||
List<SysRole> sysRoles = iSysRoleService.rolesByUserId(getUserId());
|
||||
if (!CollectionUtils.isEmpty(sysRoles)) {
|
||||
for (SysRole sysRole : sysRoles) {
|
||||
//如果角色是hr
|
||||
if (sysRole.getRoleKey().equals("hr")||sysRole.getRoleKey().equals("hrleader")) {
|
||||
isHr = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isHr){
|
||||
req.setHrId(getUserId());
|
||||
}
|
||||
//找出所有置顶后的排序数据
|
||||
List<ResumeFollowRecord> resumeFollowRecordListTopping= resumeFollowRecordService.listByQuery(req,true);
|
||||
//找出所有非置顶的排序数据
|
||||
List<ResumeFollowRecord> resumeFollowRecordListUnTopping= resumeFollowRecordService.listByQueryUnTopping(req,false);
|
||||
|
||||
// 将非置顶数据追加到置顶数据的列表后面
|
||||
resumeFollowRecordListTopping.addAll(resumeFollowRecordListUnTopping);
|
||||
|
||||
// 最终的排序列表
|
||||
List<ResumeFollowRecord> sortedResumeFollowRecordList = resumeFollowRecordListTopping;
|
||||
|
||||
return getDataTable(sortedResumeFollowRecordList);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:add')")
|
||||
|
@ -94,11 +121,11 @@ public class RecruitInterviewController extends BaseController {
|
|||
RecruitPost post = recruitPostService.getById(req.getPostId());
|
||||
req.setPostName(post.getPostName());
|
||||
req.setCreateDate(LocalDate.now());
|
||||
//默认不置顶
|
||||
req.setTopping(false);
|
||||
return toAjax(resumeFollowRecordService.save(req));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:query')")
|
||||
@GetMapping("/interview/{id}")
|
||||
@ApiOperation(value = "获取《面试管理》简历跟进记录列表")
|
||||
|
@ -106,7 +133,7 @@ public class RecruitInterviewController extends BaseController {
|
|||
return success(resumeFollowRecordService.getById(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:delete')")
|
||||
@DeleteMapping("/interview/{id}")
|
||||
@ApiOperation(value = "获取《面试管理》简历跟进记录列表")
|
||||
public AjaxResult deleteResumeRecordList(@PathVariable ("id")Long id){
|
||||
|
@ -136,4 +163,15 @@ public class RecruitInterviewController extends BaseController {
|
|||
return error("上传文件异常,请联系管理员");
|
||||
}
|
||||
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:edit')")
|
||||
@PutMapping("/interview/editTopping")
|
||||
@ApiOperation(value = "修改《面试管理》简历跟进记录是否置顶")
|
||||
public AjaxResult editTopping(@RequestBody ToppingDTO req){
|
||||
LocalDateTime localDateTime=LocalDateTime.now();
|
||||
if(req.getTopping()){
|
||||
return AjaxResult.success(resumeFollowRecordService.update(new LambdaUpdateWrapper<ResumeFollowRecord>().set(ResumeFollowRecord::getTopping,req.getTopping()).set(ResumeFollowRecord::getToppingTime,localDateTime).eq(ResumeFollowRecord::getId,req.getId())));
|
||||
}
|
||||
return AjaxResult.success(resumeFollowRecordService.update(new LambdaUpdateWrapper<ResumeFollowRecord>().set(ResumeFollowRecord::getTopping,req.getTopping()).set(ResumeFollowRecord::getToppingTime,null).set(ResumeFollowRecord::getToppingTime,localDateTime).eq(ResumeFollowRecord::getId,req.getId())));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package cn.zeroerr.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
@ApiModel
|
||||
public class ToppingDTO {
|
||||
@ApiModelProperty(value = "简历跟进记录id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "是否置顶")
|
||||
private Boolean topping;
|
||||
}
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.*;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
@ -247,13 +248,27 @@ public class ResumeFollowRecord implements Serializable {
|
|||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate actualJoinDate;
|
||||
|
||||
|
||||
/**
|
||||
* 上传的简历
|
||||
*/
|
||||
@TableField(value = "file")
|
||||
private String file;
|
||||
|
||||
/**
|
||||
* 是否置顶
|
||||
*/
|
||||
@TableField(value = "topping")
|
||||
private Boolean topping;
|
||||
|
||||
/**
|
||||
* 置顶时间
|
||||
*/
|
||||
@TableField(value = "topping_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime toppingTime;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -17,13 +17,15 @@ import java.util.List;
|
|||
@Repository
|
||||
public interface ResumeFollowRecordMapper extends BaseMapper<ResumeFollowRecord> {
|
||||
|
||||
List<ResumeFollowRecord> listByQuery(ResumeFollowRecord req);
|
||||
List<ResumeFollowRecord> listByQuery(@Param("req") ResumeFollowRecord req,@Param("topping") Boolean topping);
|
||||
|
||||
List<ResumeFollowRecord> getBySelect(@Param("hrId") Long hrId, @Param("firstDay") LocalDate firstDay,@Param("endDay") LocalDate lastDay);
|
||||
|
||||
List<ResumeFollowRecord> getPostInterViewList(@Param("postList") List<Long> postList,@Param("firstDay") LocalDate firstDay, @Param("lastDay") LocalDate lastDay);
|
||||
|
||||
List<ResumeFollowRecord> getPostEntryList(@Param("postList") List<Long> postList, @Param("firstDay") LocalDate firstDay, @Param("lastDay")LocalDate lastDay);
|
||||
|
||||
List<ResumeFollowRecord> listByQueryUnTopping(@Param("req")ResumeFollowRecord req, @Param("topping")boolean topping);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -13,11 +13,13 @@ import java.util.List;
|
|||
*/
|
||||
public interface ResumeFollowRecordService extends IService<ResumeFollowRecord> {
|
||||
|
||||
List<ResumeFollowRecord> listByQuery(ResumeFollowRecord req);
|
||||
List<ResumeFollowRecord> listByQuery(ResumeFollowRecord req,Boolean topping);
|
||||
|
||||
List<ResumeFollowRecord> getBySelect(Long hrId, LocalDate firstDay, LocalDate lastDay);
|
||||
|
||||
List<ResumeFollowRecord> getPostInterViewList(List<Long> postList, LocalDate firstDay, LocalDate lastDay);
|
||||
|
||||
List<ResumeFollowRecord> getPostEntryList(List<Long> postList, LocalDate firstDay, LocalDate lastDay);
|
||||
|
||||
List<ResumeFollowRecord> listByQueryUnTopping(ResumeFollowRecord req, boolean topping);
|
||||
}
|
||||
|
|
|
@ -23,8 +23,8 @@ public class ResumeFollowRecordServiceImpl extends ServiceImpl<ResumeFollowRecor
|
|||
private ResumeFollowRecordMapper resumeFollowRecordMapper;
|
||||
|
||||
@Override
|
||||
public List<ResumeFollowRecord> listByQuery(ResumeFollowRecord req) {
|
||||
return resumeFollowRecordMapper.listByQuery(req);
|
||||
public List<ResumeFollowRecord> listByQuery(ResumeFollowRecord req,Boolean topping) {
|
||||
return resumeFollowRecordMapper.listByQuery(req,topping);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -41,6 +41,12 @@ public class ResumeFollowRecordServiceImpl extends ServiceImpl<ResumeFollowRecor
|
|||
public List<ResumeFollowRecord> getPostEntryList(List<Long> postList, LocalDate firstDay, LocalDate lastDay) {
|
||||
return resumeFollowRecordMapper.getPostEntryList(postList,firstDay,lastDay);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ResumeFollowRecord> listByQueryUnTopping(ResumeFollowRecord req, boolean topping) {
|
||||
return resumeFollowRecordMapper.listByQueryUnTopping(req,topping);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
<result property="updateDate" column="update_date" jdbcType="DATE"/>
|
||||
<result property="actualJoinDate" column="actual_join_date" jdbcType="DATE"/>
|
||||
<result property="specialReason" column="special_reason" jdbcType="VARCHAR"/>
|
||||
<result property="topping" column="topping" />
|
||||
<result property="toppingTime" column="topping_time" />
|
||||
<result property="file" column="file" />
|
||||
</resultMap>
|
||||
|
||||
|
@ -55,22 +57,23 @@
|
|||
second_reach,second_interviewer_ids,second_pass,
|
||||
final_date,final_reach,final_interviewer_ids,
|
||||
final_pass,accept_offer,join_date,create_date,update_date,actual_join_date,
|
||||
fail_reason,special_reason,file
|
||||
fail_reason,special_reason,file,topping,topping_time
|
||||
</sql>
|
||||
|
||||
<select id="listByQuery" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from resume_follow_record where name is not null
|
||||
<if test="postName!=null">and post_name like concat('%', #{postName}, '%')</if>
|
||||
<if test="name!=null">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="interviewDate!=null">and interview_date =#{interviewDate}</if>
|
||||
<if test="hrId!=null">and hr_id =#{hrId}</if>
|
||||
<if test="firstPass!=null and firstPass!=''">and first_pass=#{firstPass}</if>
|
||||
<if test="secondPass!=null and secondPass!=''">and second_pass =#{secondPass}</if>
|
||||
<if test="finalPass!=null and finalPass!=''">and final_pass=#{finalPass}</if>
|
||||
<if test="isPass!=null and isPass!=''">and is_pass=#{isPass}</if>
|
||||
order by receive_date desc
|
||||
<if test="topping!=null">and topping =#{topping}</if>
|
||||
<if test="req.postName!=null">and post_name like concat('%', #{req.postName}, '%')</if>
|
||||
<if test="req.name!=null">and name like concat('%', #{req.name}, '%')</if>
|
||||
<if test="req.interviewDate!=null">and interview_date =#{req.interviewDate}</if>
|
||||
<if test="req.hrId!=null">and hr_id =#{req.hrId}</if>
|
||||
<if test="req.firstPass!=null and req.firstPass!=''">and first_pass=#{req.firstPass}</if>
|
||||
<if test="req.secondPass!=null and req.secondPass!=''">and second_pass =#{req.secondPass}</if>
|
||||
<if test="req.finalPass!=null and req.finalPass!=''">and final_pass=#{req.finalPass}</if>
|
||||
<if test="req.isPass!=null and req.isPass!=''">and is_pass=#{req.isPass}</if>
|
||||
order by topping_time desc
|
||||
</select>
|
||||
|
||||
<select id="getBySelect" resultMap="BaseResultMap">
|
||||
|
@ -107,4 +110,21 @@
|
|||
#{postId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="listByQueryUnTopping" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from resume_follow_record where name is not null
|
||||
<if test="topping!=null">and topping =#{topping}</if>
|
||||
<if test="req.postName!=null">and post_name like concat('%', #{req.postName}, '%')</if>
|
||||
<if test="req.name!=null">and name like concat('%', #{req.name}, '%')</if>
|
||||
<if test="req.interviewDate!=null">and interview_date =#{req.interviewDate}</if>
|
||||
<if test="req.hrId!=null">and hr_id =#{req.hrId}</if>
|
||||
<if test="req.firstPass!=null and req.firstPass!=''">and first_pass=#{req.firstPass}</if>
|
||||
<if test="req.secondPass!=null and req.secondPass!=''">and second_pass =#{req.secondPass}</if>
|
||||
<if test="req.finalPass!=null and req.finalPass!=''">and final_pass=#{req.finalPass}</if>
|
||||
<if test="req.isPass!=null and req.isPass!=''">and is_pass=#{req.isPass}</if>
|
||||
order by receive_date desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue