1.新增岗位评级页面
This commit is contained in:
parent
c93824e45c
commit
014086c888
|
@ -9,6 +9,7 @@ import javax.validation.constraints.Email;
|
|||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -65,6 +66,17 @@ public class RecruitStructure extends BaseEntity
|
|||
|
||||
private String taskId;
|
||||
|
||||
private LocalDate postCompleteDate;
|
||||
|
||||
public LocalDate getPostCompleteDate() {
|
||||
return postCompleteDate;
|
||||
}
|
||||
|
||||
public void setPostCompleteDate(LocalDate postCompleteDate) {
|
||||
this.postCompleteDate = postCompleteDate;
|
||||
}
|
||||
|
||||
|
||||
public Integer getPostType() {
|
||||
return postType;
|
||||
}
|
||||
|
|
|
@ -4,9 +4,15 @@ import cn.zeroerr.common.core.controller.BaseController;
|
|||
import cn.zeroerr.common.core.domain.AjaxResult;
|
||||
import cn.zeroerr.common.core.domain.entity.RecruitStructure;
|
||||
import cn.zeroerr.common.core.domain.entity.SysUser;
|
||||
import cn.zeroerr.common.core.page.TableDataInfo;
|
||||
import cn.zeroerr.domain.entity.PostGrade;
|
||||
import cn.zeroerr.domain.entity.RecruitProcessTask;
|
||||
import cn.zeroerr.domain.entity.ResumeFollowRecord;
|
||||
import cn.zeroerr.service.PostGradeService;
|
||||
import cn.zeroerr.service.RecruitProcessTaskService;
|
||||
import cn.zeroerr.system.service.ISysUserService;
|
||||
import cn.zeroerr.system.service.RecruitStructureService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -15,6 +21,7 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/recruit/postGrade")
|
||||
|
@ -24,12 +31,69 @@ public class RecruitPostGradeController extends BaseController {
|
|||
@Autowired
|
||||
private PostGradeService postGradeService;
|
||||
|
||||
@Autowired
|
||||
private RecruitProcessTaskService recruitProcessTaskService;
|
||||
|
||||
// @PreAuthorize("@ss.hasAnyPermi('recruit:grade:add')")
|
||||
// @PostMapping("/add")
|
||||
// @ApiOperation(value = "增加《面试管理》简历跟进记录")
|
||||
// public AjaxResult addPostGrade(@Validated @RequestBody PostGrade req) {
|
||||
//
|
||||
// }
|
||||
@Autowired
|
||||
private RecruitStructureService recruitStructureService;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService iSysUserService;
|
||||
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:grade:add')")
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "增加某月份的岗位评级")
|
||||
public AjaxResult addPostGrade(@Validated @RequestBody PostGrade req) {
|
||||
//封装该hr的信息
|
||||
req.setHrId(getUserId());
|
||||
req.setHrName(iSysUserService.selectUserById(getUserId()).getNickName());
|
||||
// //封装部门信息
|
||||
// RecruitStructure deptByNodeId = recruitStructureService.getDeptByNodeId(req.getPostId());
|
||||
// req.setDeptId(deptByNodeId.getNodeId());
|
||||
// req.setDeptName(deptByNodeId.getNodeName());
|
||||
//封装创建日期
|
||||
req.setCreateDate(LocalDate.now());
|
||||
|
||||
//找到对应的单据id
|
||||
RecruitStructure post = recruitStructureService.getByNodeId(req.getPostId());
|
||||
if(post.getTaskId()!=null){
|
||||
RecruitProcessTask byTaskId = recruitProcessTaskService.getByTaskId(post.getTaskId());
|
||||
if(!ObjectUtils.isEmpty(byTaskId)){
|
||||
req.setApplyDate(byTaskId.getApplyDate());
|
||||
req.setPostCount(byTaskId.getPostCount());
|
||||
}
|
||||
}
|
||||
return toAjax(postGradeService.save(req));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:grade:edit')")
|
||||
@PutMapping("/edit")
|
||||
@ApiOperation(value = "修改某月份的岗位评级")
|
||||
public AjaxResult editPostGrade(@Validated @RequestBody PostGrade req) {
|
||||
return toAjax(postGradeService.updateById(req));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:grade:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value = "展示某月份的岗位评级")
|
||||
public TableDataInfo listPostGrade(PostGrade req) {
|
||||
startPage();
|
||||
List<PostGrade> postGradeList=postGradeService.listBySelect(req);
|
||||
return getDataTable(postGradeList);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:grade:delete')")
|
||||
@DeleteMapping("/delete/{gradeId}")
|
||||
@ApiOperation(value = "删除某月份的岗位评级")
|
||||
public AjaxResult deletePostGrade(@PathVariable("gradeId")Long gradeId) {
|
||||
return toAjax(postGradeService.removeById(gradeId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:grade:edit')")
|
||||
@GetMapping("/get/{gradeId}")
|
||||
@ApiOperation(value = "获取某一个某月份的岗位评级")
|
||||
public AjaxResult getOnePostGrade(@PathVariable("gradeId")Long gradeId) {
|
||||
return AjaxResult.success(postGradeService.getById(gradeId));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class PostGrade implements Serializable {
|
|||
* 0:A ;1:B;2:C
|
||||
*/
|
||||
@TableField(value = "grade")
|
||||
private Integer grade;
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* hr的id
|
||||
|
|
|
@ -2,6 +2,9 @@ package cn.zeroerr.mapper;
|
|||
|
||||
import cn.zeroerr.domain.entity.PostGrade;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Ze-java
|
||||
|
@ -11,6 +14,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface PostGradeMapper extends BaseMapper<PostGrade> {
|
||||
|
||||
List<PostGrade> listBySelect(@Param("req") PostGrade req);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@ package cn.zeroerr.service;
|
|||
import cn.zeroerr.domain.entity.PostGrade;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Ze-java
|
||||
* @description 针对表【post_grade】的数据库操作Service
|
||||
|
@ -10,4 +12,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
*/
|
||||
public interface PostGradeService extends IService<PostGrade> {
|
||||
|
||||
List<PostGrade> listBySelect(PostGrade req);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import cn.zeroerr.service.PostGradeService;
|
|||
import cn.zeroerr.mapper.PostGradeMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Ze-java
|
||||
* @description 针对表【post_grade】的数据库操作Service实现
|
||||
|
@ -15,6 +17,10 @@ import org.springframework.stereotype.Service;
|
|||
public class PostGradeServiceImpl extends ServiceImpl<PostGradeMapper, PostGrade>
|
||||
implements PostGradeService{
|
||||
|
||||
@Override
|
||||
public List<PostGrade> listBySelect(PostGrade req) {
|
||||
return this.baseMapper.listBySelect(req);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<result property="postName" column="post_name" jdbcType="VARCHAR"/>
|
||||
<result property="applyDate" column="apply_date" jdbcType="DATE"/>
|
||||
<result property="postCount" column="post_count" jdbcType="INTEGER"/>
|
||||
<result property="grade" column="grade" jdbcType="TINYINT"/>
|
||||
<result property="grade" column="grade" jdbcType="VARCHAR"/>
|
||||
<result property="hrId" column="hr_id" jdbcType="BIGINT"/>
|
||||
<result property="hrName" column="hr_name" jdbcType="VARCHAR"/>
|
||||
<result property="deptId" column="dept_id" jdbcType="BIGINT"/>
|
||||
|
@ -29,4 +29,20 @@
|
|||
dept_name,month,create_date,
|
||||
update_date,cycle,remark
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="listBySelect" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"/>
|
||||
from post_grade
|
||||
where month = #{req.month}
|
||||
<if test="req.grade != null">and grade = #{req.grade}</if>
|
||||
<if test="req.deptId != null">and dept_id = #{req.deptId}</if>
|
||||
<if test="req.postName != null and req.postName != ''">
|
||||
and post_name like concat('%', #{req.postName}, '%')
|
||||
</if>
|
||||
<if test="req.hrName != null and req.hrName != ''">
|
||||
and hr_name like concat('%', #{req.hrName}, '%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="postCompleteDate" column="post_complete_date"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNodeVo">
|
||||
|
@ -38,7 +39,8 @@
|
|||
d.create_time,
|
||||
d.type,
|
||||
d.post_type,
|
||||
d.task_id
|
||||
d.task_id,
|
||||
d.post_complete_date
|
||||
from recruit_structure d
|
||||
</sql>
|
||||
|
||||
|
@ -60,6 +62,7 @@
|
|||
d.type,
|
||||
d.post_type,
|
||||
d.task_id,
|
||||
d.post_complete_date
|
||||
(select node_name from recruit_structure where node_id = d.parent_id) parent_name
|
||||
from recruit_structure d
|
||||
where d.node_id = #{parentId}
|
||||
|
|
Loading…
Reference in New Issue