修改入职管理里的岗位是绑定而非手填
This commit is contained in:
parent
61d03988ba
commit
84ac56b9fc
|
@ -58,9 +58,9 @@ spring:
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
# 单个文件大小
|
# 单个文件大小
|
||||||
max-file-size: 10MB
|
max-file-size: 20MB
|
||||||
# 设置总上传的文件大小
|
# 设置总上传的文件大小
|
||||||
max-request-size: 20MB
|
max-request-size: 40MB
|
||||||
# 服务模块
|
# 服务模块
|
||||||
devtools:
|
devtools:
|
||||||
restart:
|
restart:
|
||||||
|
|
|
@ -626,10 +626,10 @@ public class HomePageController extends BaseController {
|
||||||
announcementNode.setInterviewFirstResult("待定");
|
announcementNode.setInterviewFirstResult("待定");
|
||||||
}
|
}
|
||||||
//如果初试有日期,但是未到面,则视为放弃
|
//如果初试有日期,但是未到面,则视为放弃
|
||||||
else if(resumeFollowRecord.getFirstDate()!=null ){
|
|
||||||
if(resumeFollowRecord.getFirstReach().equals("0")|| resumeFollowRecord.getFirstReach().isEmpty()){
|
} else if(resumeFollowRecord.getFirstDate()!=null &&resumeFollowRecord.getFirstReach()!=null){
|
||||||
announcementNode.setInterviewFirstResult("放弃");
|
if(resumeFollowRecord.getFirstReach().equals("0")){
|
||||||
}
|
announcementNode.setInterviewFirstResult("放弃");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (resumeFollowRecord.getFinalPass() != null) {
|
if (resumeFollowRecord.getFinalPass() != null) {
|
||||||
|
|
|
@ -17,6 +17,7 @@ import cn.zeroerr.service.*;
|
||||||
import cn.zeroerr.system.service.ISysDeptService;
|
import cn.zeroerr.system.service.ISysDeptService;
|
||||||
import cn.zeroerr.system.service.ISysUserService;
|
import cn.zeroerr.system.service.ISysUserService;
|
||||||
import cn.zeroerr.system.service.RecruitStructureService;
|
import cn.zeroerr.system.service.RecruitStructureService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||||
|
@ -261,6 +262,13 @@ public class RecruitFollowController extends BaseController {
|
||||||
if (followVO.getOfferCount() == null) followVO.setOfferCount(0L);
|
if (followVO.getOfferCount() == null) followVO.setOfferCount(0L);
|
||||||
if (followVO.getEntryCount() == null) followVO.setEntryCount(0L);
|
if (followVO.getEntryCount() == null) followVO.setEntryCount(0L);
|
||||||
|
|
||||||
|
//再根据岗位公海里绑定的hr进行重新覆盖写入;因为有可能某岗位被分配给其他人了。
|
||||||
|
RecruitPost recruitPost = recruitPostService.getOne(new LambdaQueryWrapper<RecruitPost>().eq(RecruitPost::getNodeId, followVO.getPostId()));
|
||||||
|
if(!ObjectUtils.isEmpty(recruitPost)){
|
||||||
|
followVO.setHrId(recruitPost.getHrId());
|
||||||
|
followVO.setHrName(recruitPost.getHrName());
|
||||||
|
}
|
||||||
|
|
||||||
Optional<PostGrade> optionalPostGrade = postGradeList.stream()
|
Optional<PostGrade> optionalPostGrade = postGradeList.stream()
|
||||||
.filter(postGrade -> Objects.equals(postGrade.getPostId(), followVO.getPostId()))
|
.filter(postGrade -> Objects.equals(postGrade.getPostId(), followVO.getPostId()))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
|
|
@ -412,21 +412,25 @@ public class RecruitProcessController extends BaseController {
|
||||||
//查询该hr的信息
|
//查询该hr的信息
|
||||||
SysUser sysUser = iSysUserService.selectUserById(req.getUserId());
|
SysUser sysUser = iSysUserService.selectUserById(req.getUserId());
|
||||||
//更新岗位绑定该hr负责
|
//更新岗位绑定该hr负责
|
||||||
recruitProcessTaskService.updateBindHR(sysUser.getUserId(), sysUser.getNickName(), req.getTaskId());
|
if(req.getTaskId()!=null){
|
||||||
recruitPostService.updateBindHR(sysUser.getUserId(), sysUser.getNickName(), req.getTaskId());
|
recruitProcessTaskService.updateBindHR(sysUser.getUserId(), sysUser.getNickName(), req.getTaskId());
|
||||||
|
}
|
||||||
|
recruitPostService.updateBindHR(sysUser.getUserId(), sysUser.getNickName(), req.getPostId());
|
||||||
}else {
|
}else {
|
||||||
recruitProcessTaskService.updateUnBindHR(req.getTaskId());
|
if(req.getTaskId()!=null){
|
||||||
recruitPostService.updateUnBindHR(req.getTaskId());
|
recruitProcessTaskService.updateUnBindHR(req.getTaskId());
|
||||||
|
}
|
||||||
|
recruitPostService.updateUnBindHR(req.getPostId());
|
||||||
}
|
}
|
||||||
|
|
||||||
return success("成功分配");
|
return success("成功分配");
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('recruit:postsea:distribution')")
|
@PreAuthorize("@ss.hasPermi('recruit:postsea:distribution')")
|
||||||
@GetMapping("/mypost/getOne/{taskId}")
|
@GetMapping("/mypost/getOne/{postId}")
|
||||||
@ApiOperation(value = "岗位公海-获取某个岗位的hr分配数据")
|
@ApiOperation(value = "岗位公海-获取某个岗位的hr分配数据")
|
||||||
public AjaxResult getPostList(@PathVariable("taskId")String taskId) {
|
public AjaxResult getPostList(@PathVariable("postId")Long postId) {
|
||||||
return AjaxResult.success(recruitPostService.getOne(new LambdaQueryWrapper<RecruitPost>().eq(RecruitPost::getTaskId, taskId)));
|
return AjaxResult.success(recruitPostService.getOne(new LambdaQueryWrapper<RecruitPost>().eq(RecruitPost::getPostId, postId)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('recruit:mypost:list')")
|
@PreAuthorize("@ss.hasPermi('recruit:mypost:list')")
|
||||||
|
|
|
@ -7,6 +7,8 @@ import cn.zeroerr.common.core.domain.AjaxResult;
|
||||||
import cn.zeroerr.common.core.domain.entity.RecruitStructure;
|
import cn.zeroerr.common.core.domain.entity.RecruitStructure;
|
||||||
import cn.zeroerr.common.enums.BusinessType;
|
import cn.zeroerr.common.enums.BusinessType;
|
||||||
import cn.zeroerr.common.utils.StringUtils;
|
import cn.zeroerr.common.utils.StringUtils;
|
||||||
|
import cn.zeroerr.domain.entity.RecruitPost;
|
||||||
|
import cn.zeroerr.service.RecruitPostService;
|
||||||
import cn.zeroerr.system.service.RecruitStructureService;
|
import cn.zeroerr.system.service.RecruitStructureService;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
@ -24,6 +26,11 @@ import static cn.zeroerr.common.core.domain.AjaxResult.error;
|
||||||
public class RecruitStructureController extends BaseController {
|
public class RecruitStructureController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private RecruitStructureService recruitStructureService;
|
private RecruitStructureService recruitStructureService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RecruitPostService recruitPostService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增节点
|
* 新增节点
|
||||||
*/
|
*/
|
||||||
|
@ -32,12 +39,20 @@ public class RecruitStructureController extends BaseController {
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@Validated @RequestBody RecruitStructure node)
|
public AjaxResult add(@Validated @RequestBody RecruitStructure node)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!recruitStructureService.checkNodeNameUnique(node))
|
if (!recruitStructureService.checkNodeNameUnique(node))
|
||||||
{
|
{
|
||||||
return error("新增节点'" + node.getNodeName() + "'失败,节点名称已存在");
|
return error("新增节点'" + node.getNodeName() + "'失败,节点名称已存在");
|
||||||
}
|
}
|
||||||
node.setCreateBy(getUsername());
|
node.setCreateBy(getUsername());
|
||||||
return toAjax(recruitStructureService.insertNode(node));
|
recruitStructureService.insertNode(node);
|
||||||
|
node.setNodeId(node.getNodeId());
|
||||||
|
RecruitStructure deptByNodeId = recruitStructureService.getDeptByNodeId(node.getNodeId());
|
||||||
|
//如果是已招聘状态,则自动新增岗位在公海里等待被分配给具体的hr。
|
||||||
|
if(node.getPostType().equals(2)){
|
||||||
|
recruitPostService.newRecruitPost(node,deptByNodeId.getNodeId(),deptByNodeId.getNodeName());
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,5 +20,7 @@ public class ApprovedResultVO {
|
||||||
private String remark;
|
private String remark;
|
||||||
@ApiModelProperty("hr的用户id;如果需要打回,则需要选择一个hr进行修改。")
|
@ApiModelProperty("hr的用户id;如果需要打回,则需要选择一个hr进行修改。")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
@ApiModelProperty("岗位公海的id,非真正的岗位id")
|
||||||
|
private String postId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,11 @@ public interface RecruitPostMapper extends BaseMapper<RecruitPost> {
|
||||||
|
|
||||||
List<RecruitPost> listPostSea(@Param("req") RecruitPost req);
|
List<RecruitPost> listPostSea(@Param("req") RecruitPost req);
|
||||||
|
|
||||||
void updateBindHR(@Param("userId") Long userId, @Param("nickName") String nickName, @Param("taskId") String taskId);
|
void updateBindHR(@Param("userId") Long userId, @Param("nickName") String nickName, @Param("postId") String postId);
|
||||||
|
|
||||||
List<RecruitPost> listMyPost(@Param("userId") Long userId);
|
List<RecruitPost> listMyPost(@Param("userId") Long userId);
|
||||||
|
|
||||||
void updateUnBindHR(@Param("taskId") String taskId);
|
void updateUnBindHR(@Param("postId") String postId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package cn.zeroerr.service;
|
package cn.zeroerr.service;
|
||||||
|
|
||||||
|
import cn.zeroerr.common.core.domain.entity.RecruitStructure;
|
||||||
import cn.zeroerr.domain.entity.RecruitPost;
|
import cn.zeroerr.domain.entity.RecruitPost;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
@ -14,9 +15,11 @@ public interface RecruitPostService extends IService<RecruitPost> {
|
||||||
|
|
||||||
List<RecruitPost> listPostSea(RecruitPost req);
|
List<RecruitPost> listPostSea(RecruitPost req);
|
||||||
|
|
||||||
void updateBindHR(Long userId, String nickName, String taskId);
|
void updateBindHR(Long userId, String nickName, String postId);
|
||||||
|
|
||||||
List<RecruitPost> listMyPost(Long userId);
|
List<RecruitPost> listMyPost(Long userId);
|
||||||
|
|
||||||
void updateUnBindHR(String taskId);
|
void updateUnBindHR(String postId);
|
||||||
|
|
||||||
|
void newRecruitPost(RecruitStructure node,Long deptId,String deptName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
package cn.zeroerr.service.impl;
|
package cn.zeroerr.service.impl;
|
||||||
|
|
||||||
|
import cn.zeroerr.common.core.domain.entity.RecruitStructure;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import cn.zeroerr.domain.entity.RecruitPost;
|
import cn.zeroerr.domain.entity.RecruitPost;
|
||||||
import cn.zeroerr.service.RecruitPostService;
|
import cn.zeroerr.service.RecruitPostService;
|
||||||
import cn.zeroerr.mapper.RecruitPostMapper;
|
import cn.zeroerr.mapper.RecruitPostMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,8 +25,8 @@ public class RecruitPostServiceImpl extends ServiceImpl<RecruitPostMapper, Recru
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateBindHR(Long userId, String nickName, String taskId) {
|
public void updateBindHR(Long userId, String nickName, String postId) {
|
||||||
this.baseMapper.updateBindHR(userId,nickName,taskId);
|
this.baseMapper.updateBindHR(userId,nickName,postId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -33,8 +35,23 @@ public class RecruitPostServiceImpl extends ServiceImpl<RecruitPostMapper, Recru
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateUnBindHR(String taskId) {
|
public void updateUnBindHR(String postId) {
|
||||||
this.baseMapper.updateUnBindHR(taskId);
|
this.baseMapper.updateUnBindHR(postId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void newRecruitPost(RecruitStructure node,Long deptId,String deptName) {
|
||||||
|
RecruitPost recruitPost = RecruitPost.builder()
|
||||||
|
.nodeId(node.getNodeId())
|
||||||
|
.postName(node.getNodeName())
|
||||||
|
.deptId(deptId)
|
||||||
|
.deptName(deptName)
|
||||||
|
//默认未分配
|
||||||
|
.isAllocation(0)
|
||||||
|
.createTime(LocalDate.now())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
this.baseMapper.insert(recruitPost);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
|
|
||||||
<update id="updateBindHR">
|
<update id="updateBindHR">
|
||||||
update recruit_post set hr_id=#{userId} ,hr_name=#{nickName} ,is_allocation=1 where task_id=#{taskId}
|
update recruit_post set hr_id=#{userId} ,hr_name=#{nickName} ,is_allocation=1 where post_id=#{postId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="listMyPost" resultMap="BaseResultMap">
|
<select id="listMyPost" resultMap="BaseResultMap">
|
||||||
|
@ -46,6 +46,6 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateUnBindHR">
|
<update id="updateUnBindHR">
|
||||||
update recruit_post set hr_id=null ,hr_name=null,is_allocation=0 where task_id=#{taskId}
|
update recruit_post set hr_id=null ,hr_name=null,is_allocation=0 where post_id=#{postId}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -17,7 +17,7 @@ public interface RecruitStructureMapper extends BaseMapper<RecruitStructure> {
|
||||||
|
|
||||||
RecruitStructure selectNodeById(@Param("parentId") Long parentId);
|
RecruitStructure selectNodeById(@Param("parentId") Long parentId);
|
||||||
|
|
||||||
int insertNode(RecruitStructure node);
|
Long insertNode(RecruitStructure node);
|
||||||
|
|
||||||
List<RecruitStructure> selectNodeList(RecruitStructure node);
|
List<RecruitStructure> selectNodeList(RecruitStructure node);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||||
public interface RecruitStructureService extends IService<RecruitStructure> {
|
public interface RecruitStructureService extends IService<RecruitStructure> {
|
||||||
boolean checkNodeNameUnique(RecruitStructure node);
|
boolean checkNodeNameUnique(RecruitStructure node);
|
||||||
|
|
||||||
int insertNode(RecruitStructure node);
|
Long insertNode(RecruitStructure node);
|
||||||
|
|
||||||
List<RecruitStructure> selectNodeList(RecruitStructure node);
|
List<RecruitStructure> selectNodeList(RecruitStructure node);
|
||||||
|
|
||||||
|
@ -51,4 +51,6 @@ public interface RecruitStructureService extends IService<RecruitStructure> {
|
||||||
List<Long> filterByPostIdList(List<Long> uniquePostIdList);
|
List<Long> filterByPostIdList(List<Long> uniquePostIdList);
|
||||||
|
|
||||||
String findTopLevelDepartmentNameByNodeId(Long postId);
|
String findTopLevelDepartmentNameByNodeId(Long postId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class RecruitStructureServiceImpl extends ServiceImpl<RecruitStructureMap
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertNode(RecruitStructure node) {
|
public Long insertNode(RecruitStructure node) {
|
||||||
RecruitStructure info = this.baseMapper.selectNodeById(node.getParentId());
|
RecruitStructure info = this.baseMapper.selectNodeById(node.getParentId());
|
||||||
// 如果父节点不为正常状态,则不允许新增子节点
|
// 如果父节点不为正常状态,则不允许新增子节点
|
||||||
if (!UserConstants.DEPT_NORMAL.equals(info.getStatus()))
|
if (!UserConstants.DEPT_NORMAL.equals(info.getStatus()))
|
||||||
|
@ -196,6 +196,8 @@ public class RecruitStructureServiceImpl extends ServiceImpl<RecruitStructureMap
|
||||||
return recruitStructureMapper.findTopLevelDepartmentNameByNodeId(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());
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
where d.node_id = #{parentId}
|
where d.node_id = #{parentId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertNode" parameterType="cn.zeroerr.common.core.domain.entity.RecruitStructure">
|
<insert id="insertNode" parameterType="cn.zeroerr.common.core.domain.entity.RecruitStructure" useGeneratedKeys="true" keyProperty="nodeId">
|
||||||
insert into recruit_structure(
|
insert into recruit_structure(
|
||||||
<if test="nodeId != null and nodeId != 0">node_id,</if>
|
<if test="nodeId != null and nodeId != 0">node_id,</if>
|
||||||
<if test="type != null ">type,</if>
|
<if test="type != null ">type,</if>
|
||||||
|
|
Loading…
Reference in New Issue