1.重构任务跟踪页面 2.修复一系列bug
This commit is contained in:
parent
4af0979059
commit
360ee9a998
|
@ -5,14 +5,14 @@ spring:
|
|||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
druid:
|
||||
# 主库数据源
|
||||
# master:
|
||||
# url: jdbc:mysql://192.168.1.165:3306/zeoa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: zeoa
|
||||
# password: dHahLWNYB7tD2Mia
|
||||
master:
|
||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: zero
|
||||
url: jdbc:mysql://192.168.1.165:3306/zeoa?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: zeoa
|
||||
password: dHahLWNYB7tD2Mia
|
||||
# master:
|
||||
# url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: zero
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -8,14 +8,16 @@ import cn.zeroerr.common.core.domain.entity.SysDept;
|
|||
import cn.zeroerr.common.core.domain.entity.SysUser;
|
||||
import cn.zeroerr.common.core.page.TableDataInfo;
|
||||
import cn.zeroerr.common.enums.BusinessType;
|
||||
import cn.zeroerr.domain.entity.PostPlanFollow;
|
||||
import cn.zeroerr.domain.entity.RecruitPost;
|
||||
import cn.zeroerr.service.PostPlanFollowService;
|
||||
import cn.zeroerr.service.RecruitPostService;
|
||||
import cn.zeroerr.domain.dto.FollowDTO;
|
||||
import cn.zeroerr.domain.entity.*;
|
||||
import cn.zeroerr.domain.vo.FollowVO;
|
||||
import cn.zeroerr.service.*;
|
||||
import cn.zeroerr.system.service.ISysDeptService;
|
||||
import cn.zeroerr.system.service.ISysUserService;
|
||||
import cn.zeroerr.system.service.RecruitStructureService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
@ -30,6 +32,7 @@ import java.time.LocalDate;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
|
@ -48,95 +51,264 @@ public class RecruitFollowController extends BaseController {
|
|||
@Autowired
|
||||
private PostPlanFollowService postPlanFollowService;
|
||||
|
||||
@Autowired
|
||||
private ResumeHandleRecordService resumeHandleRecordService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('recruit:follow:add')")
|
||||
@Log(title = "新增招聘计划与统计", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/follow/add")
|
||||
@ApiOperation(value = "新增招聘计划与统计")
|
||||
public AjaxResult add(@Validated @RequestBody PostPlanFollow req) {
|
||||
//根据postId找到postName
|
||||
RecruitPost recruitPost = recruitPostService.getById(req.getPostId());
|
||||
//根据deptId找到deptName
|
||||
//SysDept sysDept = iSysDeptService.selectDeptById(req.getDeptId());
|
||||
RecruitStructure recruitStructure = recruitStructureService.selectNodeById(req.getDeptId());
|
||||
req.setPostName(recruitPost.getPostName());
|
||||
req.setDeptName(recruitStructure.getNodeName());
|
||||
req.setHrId(getUserId());
|
||||
req.setCreateDate(LocalDate.now());
|
||||
//根据userId找到用户名
|
||||
SysUser sysUser = iSysUserService.selectUserById(getUserId());
|
||||
req.setHrName(sysUser.getNickName());
|
||||
req.setId(String.valueOf(IdWorker.getId()));
|
||||
return toAjax(postPlanFollowService.save(req));
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private RecruitProcessTaskService recruitProcessTaskService;
|
||||
|
||||
@Autowired
|
||||
private ResumeFollowRecordService resumeFollowRecordService;
|
||||
|
||||
|
||||
// @PreAuthorize("@ss.hasPermi('recruit:follow:add')")
|
||||
// @Log(title = "新增招聘计划与统计", businessType = BusinessType.INSERT)
|
||||
// @PostMapping("/follow/add")
|
||||
// @ApiOperation(value = "新增招聘计划与统计")
|
||||
// public AjaxResult add(@Validated @RequestBody PostPlanFollow req) {
|
||||
// //根据postId找到postName
|
||||
// RecruitPost recruitPost = recruitPostService.getById(req.getPostId());
|
||||
// //根据deptId找到deptName
|
||||
// //SysDept sysDept = iSysDeptService.selectDeptById(req.getDeptId());
|
||||
// RecruitStructure recruitStructure = recruitStructureService.selectNodeById(req.getDeptId());
|
||||
// req.setPostName(recruitPost.getPostName());
|
||||
// req.setDeptName(recruitStructure.getNodeName());
|
||||
// req.setHrId(getUserId());
|
||||
// req.setCreateDate(LocalDate.now());
|
||||
// //根据userId找到用户名
|
||||
// SysUser sysUser = iSysUserService.selectUserById(getUserId());
|
||||
// req.setHrName(sysUser.getNickName());
|
||||
// req.setId(String.valueOf(IdWorker.getId()));
|
||||
// return toAjax(postPlanFollowService.save(req));
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @PreAuthorize("@ss.hasPermi('recruit:follow:list')")
|
||||
// @GetMapping("/follow/list")
|
||||
// @ApiOperation(value = "查询招聘计划与统计列表")
|
||||
// public List<TableDataInfo> list(PostPlanFollow req) {
|
||||
// startPage();
|
||||
// List<PostPlanFollow> postPlanFollowList=postPlanFollowService.listBySelect(req);
|
||||
// List<TableDataInfo> tableDataInfoList=new ArrayList<>();
|
||||
// //拿到筛选完条件的list后(应该是具体的某个月的list),再根据week进行分组
|
||||
// Map<String, List<PostPlanFollow>> groupByWeek = postPlanFollowList.stream().collect(Collectors.groupingBy(PostPlanFollow::getWeek));
|
||||
// for (Map.Entry<String, List<PostPlanFollow>> entry : groupByWeek.entrySet()) {
|
||||
// List<PostPlanFollow> postPlanFollows = entry.getValue();
|
||||
// postPlanFollows.forEach(
|
||||
// postPlanFollow -> {
|
||||
// //到面率=实际到人数/约面人数;
|
||||
// if(postPlanFollow.getInviteInterviewCount() != 0) {
|
||||
// BigDecimal actualCountBigDecimal = new BigDecimal(postPlanFollow.getActualCount());
|
||||
// BigDecimal inviteInterviewCountBigDecimal = new BigDecimal(postPlanFollow.getInviteInterviewCount());
|
||||
//
|
||||
// // 计算到达率,保留两位小数
|
||||
// BigDecimal arriveRateBigDecimal = actualCountBigDecimal.divide(inviteInterviewCountBigDecimal, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP);
|
||||
//
|
||||
// double arriveRate = arriveRateBigDecimal.doubleValue();
|
||||
// postPlanFollow.setArriveRate(arriveRate);
|
||||
// }else {
|
||||
// postPlanFollow.setArriveRate(0d);
|
||||
// }
|
||||
// //招聘达成率=入职人数/需求人数
|
||||
// if(postPlanFollow.getPostCount() != 0) {
|
||||
// BigDecimal entryCountBigDecimal = new BigDecimal(postPlanFollow.getEntryCount());
|
||||
// BigDecimal postCountBigDecimal = new BigDecimal(postPlanFollow.getPostCount());
|
||||
//
|
||||
// // 计算达成率,保留两位小数
|
||||
// BigDecimal achievementRateBigDecimal = entryCountBigDecimal.divide(postCountBigDecimal, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP);
|
||||
//
|
||||
// double achievementRate = achievementRateBigDecimal.doubleValue();
|
||||
// postPlanFollow.setAchievementRate(achievementRate);
|
||||
// }else {
|
||||
// postPlanFollow.setAchievementRate(0d);
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
// tableDataInfoList.add(getDataTable(postPlanFollows));
|
||||
// }
|
||||
// return tableDataInfoList;
|
||||
// }
|
||||
//
|
||||
// @PreAuthorize("@ss.hasAnyPermi('recruit:follow:edit')")
|
||||
// @GetMapping("/follow/{id}")
|
||||
// @ApiOperation(value = "获取某条招聘计划与统计")
|
||||
// public AjaxResult get(@PathVariable ("id")String id){
|
||||
// return success(postPlanFollowService.getById(id));
|
||||
// }
|
||||
//
|
||||
// @PreAuthorize("@ss.hasAnyPermi('recruit:follow:edit')")
|
||||
// @PutMapping("/follow/edit")
|
||||
// @ApiOperation(value = "修改某条招聘计划与统计")
|
||||
// public AjaxResult edit(@Validated@RequestBody PostPlanFollow postPlanFollow){
|
||||
// return toAjax(postPlanFollowService.updateById(postPlanFollow));
|
||||
// }
|
||||
//
|
||||
// @PreAuthorize("@ss.hasAnyPermi('recruit:follow:delete')")
|
||||
// @DeleteMapping("follow/delete/{id}")
|
||||
// @ApiOperation(value = "删除某条招聘计划与统计")
|
||||
// public AjaxResult delete (@PathVariable("id") String id){
|
||||
// return toAjax(postPlanFollowService.removeById(id));
|
||||
// }
|
||||
@PreAuthorize("@ss.hasPermi('recruit:follow:list')")
|
||||
@GetMapping("/follow/list")
|
||||
@ApiOperation(value = "查询招聘计划与统计列表")
|
||||
public List<TableDataInfo> list(PostPlanFollow req) {
|
||||
startPage();
|
||||
List<PostPlanFollow> postPlanFollowList=postPlanFollowService.listBySelect(req);
|
||||
List<TableDataInfo> tableDataInfoList=new ArrayList<>();
|
||||
//拿到筛选完条件的list后(应该是具体的某个月的list),再根据week进行分组
|
||||
Map<String, List<PostPlanFollow>> groupByWeek = postPlanFollowList.stream().collect(Collectors.groupingBy(PostPlanFollow::getWeek));
|
||||
for (Map.Entry<String, List<PostPlanFollow>> entry : groupByWeek.entrySet()) {
|
||||
List<PostPlanFollow> postPlanFollows = entry.getValue();
|
||||
postPlanFollows.forEach(
|
||||
postPlanFollow -> {
|
||||
//到面率=实际到人数/约面人数;
|
||||
if(postPlanFollow.getInviteInterviewCount() != 0) {
|
||||
BigDecimal actualCountBigDecimal = new BigDecimal(postPlanFollow.getActualCount());
|
||||
BigDecimal inviteInterviewCountBigDecimal = new BigDecimal(postPlanFollow.getInviteInterviewCount());
|
||||
|
||||
// 计算到达率,保留两位小数
|
||||
BigDecimal arriveRateBigDecimal = actualCountBigDecimal.divide(inviteInterviewCountBigDecimal, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP);
|
||||
|
||||
double arriveRate = arriveRateBigDecimal.doubleValue();
|
||||
postPlanFollow.setArriveRate(arriveRate);
|
||||
public AjaxResult list(FollowDTO req) {
|
||||
List<FollowVO> followVOList=new ArrayList<>();
|
||||
//根据搜索条件,从简历处理表中查询所有符合条件的数据
|
||||
List<ResumeHandleRecord> resumeHandleRecordList=resumeHandleRecordService.listBySelect(req);
|
||||
Map<Long, List<ResumeHandleRecord>> mapResumeHandleRecord = resumeHandleRecordList.stream().collect(Collectors.groupingBy(ResumeHandleRecord::getPostId));
|
||||
if(!CollectionUtils.isEmpty(mapResumeHandleRecord)){
|
||||
for (Map.Entry<Long, List<ResumeHandleRecord>> entry : mapResumeHandleRecord.entrySet()) {
|
||||
List<ResumeHandleRecord> listByPostId = entry.getValue();
|
||||
if(!CollectionUtils.isEmpty(listByPostId)){
|
||||
FollowVO followVO = new FollowVO();
|
||||
ResumeHandleRecord resumeHandleRecord = listByPostId.get(0);
|
||||
followVO.setPostId(resumeHandleRecord.getPostId());
|
||||
followVO.setPostName(resumeHandleRecord.getPostName());
|
||||
followVO.setDeptId(resumeHandleRecord.getDeptId());
|
||||
followVO.setDeptName(resumeHandleRecord.getDeptName());
|
||||
followVO.setHrId(resumeHandleRecord.getOperatorId());
|
||||
followVO.setHrName(resumeHandleRecord.getOperatorName());
|
||||
//封装该岗位需求人数
|
||||
RecruitStructure postNodeId = recruitStructureService.getByNodeId(followVO.getPostId());
|
||||
if(!ObjectUtils.isEmpty(postNodeId)){
|
||||
if(postNodeId.getTaskId()!=null){
|
||||
RecruitProcessTask recruitProcessTask = recruitProcessTaskService.getByTaskId(postNodeId.getTaskId());
|
||||
followVO.setPostCount(recruitProcessTask.getPostCount());
|
||||
}else {
|
||||
postPlanFollow.setArriveRate(0d);
|
||||
followVO.setPostCount(0);
|
||||
}
|
||||
}
|
||||
//招聘达成率=入职人数/需求人数
|
||||
if(postPlanFollow.getPostCount() != 0) {
|
||||
BigDecimal entryCountBigDecimal = new BigDecimal(postPlanFollow.getEntryCount());
|
||||
BigDecimal postCountBigDecimal = new BigDecimal(postPlanFollow.getPostCount());
|
||||
|
||||
// 计算达成率,保留两位小数
|
||||
BigDecimal achievementRateBigDecimal = entryCountBigDecimal.divide(postCountBigDecimal, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP);
|
||||
//封装查看的简历数
|
||||
followVO.setLookResumeCount(listByPostId.stream()
|
||||
.mapToInt(ResumeHandleRecord::getGreetNum)
|
||||
.sum());
|
||||
//封装人力资源通过简历数
|
||||
followVO.setPassResumeCount(listByPostId.stream()
|
||||
.mapToInt(ResumeHandleRecord::getQualifiedNum)
|
||||
.sum());
|
||||
//封装约面人数
|
||||
followVO.setInviteInterviewCount(listByPostId.stream()
|
||||
.mapToInt(ResumeHandleRecord::getQualifiedNum)
|
||||
.sum());
|
||||
//封装接受邀约人数
|
||||
followVO.setAcceptInviteCount(listByPostId.stream()
|
||||
.mapToInt(ResumeHandleRecord::getReceiveInviteNum)
|
||||
.sum());
|
||||
followVOList.add(followVO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
double achievementRate = achievementRateBigDecimal.doubleValue();
|
||||
postPlanFollow.setAchievementRate(achievementRate);
|
||||
//根据搜索条件,从面试跟踪里查询所有符合条件的数据
|
||||
List<ResumeFollowRecord> resumeFollowRecordList=resumeFollowRecordService.listBySelect(req);
|
||||
Map<Long, List<ResumeFollowRecord>> mapResumeFollowRecord = resumeFollowRecordList.stream().collect(Collectors.groupingBy(ResumeFollowRecord::getPostId));
|
||||
if(!CollectionUtils.isEmpty(mapResumeFollowRecord)){
|
||||
for (Map.Entry<Long, List<ResumeFollowRecord>> entry : mapResumeFollowRecord.entrySet()) {
|
||||
//先去followVOList去找有没有对应的岗位
|
||||
Optional<FollowVO> result = followVOList.stream()
|
||||
.filter(followVO -> followVO.getPostId().equals(entry.getKey()))
|
||||
.findFirst();
|
||||
List<ResumeFollowRecord> resumeFollowRecords = entry.getValue();
|
||||
//如果存在,则插入数据
|
||||
if(result.isPresent()){
|
||||
FollowVO followVO = result.get();
|
||||
//设置一面人数
|
||||
followVO.setFirstInterviewCount(resumeFollowRecords.stream()
|
||||
.filter( record -> record.getFirstReach() != null && "1".equals(record.getFirstReach()))
|
||||
.count());
|
||||
//设置二面人数
|
||||
followVO.setSecondInterviewCount(resumeFollowRecords.stream()
|
||||
.filter(record -> record.getSecondReach() != null && "1".equals(record.getSecondReach()))
|
||||
.count());
|
||||
//设置三面人数
|
||||
followVO.setThirdInterviewCount(resumeFollowRecords.stream()
|
||||
.filter(record -> record.getFinalReach() != null && "1".equals(record.getFinalReach()))
|
||||
.count());
|
||||
//设置谈薪人数
|
||||
followVO.setSalaryCount(resumeFollowRecords.stream()
|
||||
.filter(record -> record.getFinalPass() != null && "1".equals(record.getFinalPass()))
|
||||
.count());
|
||||
//设置拿offer人数
|
||||
followVO.setOfferCount(resumeFollowRecords.stream()
|
||||
.filter(record -> record.getAcceptOffer() != null && "1".equals(record.getAcceptOffer()))
|
||||
.count());
|
||||
//设置入职人数(实际入职日期不为空的条数)
|
||||
followVO.setEntryCount(resumeFollowRecords.stream()
|
||||
.filter(record -> record.getActualJoinDate() != null)
|
||||
.count());
|
||||
//封装到面率(一面人数/接受邀约人数)
|
||||
if(followVO.getAcceptInviteCount()!=null&&followVO.getAcceptInviteCount()!=0){
|
||||
BigDecimal arrivePercentage = new BigDecimal(followVO.getFirstInterviewCount()).divide(new BigDecimal(followVO.getAcceptInviteCount()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
|
||||
followVO.setArriveRate(arrivePercentage.doubleValue());
|
||||
}else {
|
||||
postPlanFollow.setAchievementRate(0d);
|
||||
followVO.setArriveRate(0d);
|
||||
}
|
||||
}
|
||||
);
|
||||
tableDataInfoList.add(getDataTable(postPlanFollows));
|
||||
}
|
||||
return tableDataInfoList;
|
||||
//封装招聘达成率(入职人数/需求人数)
|
||||
if(followVO.getPostCount()!=null&&followVO.getPostCount()!=0){
|
||||
BigDecimal entryPercentage = new BigDecimal(followVO.getEntryCount()).divide(new BigDecimal(followVO.getPostCount()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
|
||||
followVO.setAchievementRate(entryPercentage.doubleValue());
|
||||
}else {
|
||||
followVO.setAchievementRate(0d);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:follow:edit')")
|
||||
@GetMapping("/follow/{id}")
|
||||
@ApiOperation(value = "获取某条招聘计划与统计")
|
||||
public AjaxResult get(@PathVariable ("id")String id){
|
||||
return success(postPlanFollowService.getById(id));
|
||||
//将更新完的数据放回去
|
||||
int index = followVOList.indexOf(followVO);
|
||||
if (index >= 0) {
|
||||
followVOList.set(index, followVO);
|
||||
}
|
||||
}
|
||||
//如果不存在则新增数据
|
||||
else {
|
||||
FollowVO followVO = new FollowVO();
|
||||
ResumeFollowRecord resumeFollowRecord = resumeFollowRecords.get(0);
|
||||
followVO.setPostId(resumeFollowRecord.getPostId());
|
||||
followVO.setPostName(resumeFollowRecord.getPostName());
|
||||
RecruitStructure postNodeId = recruitStructureService.getByNodeId(followVO.getPostId());
|
||||
if(!ObjectUtils.isEmpty(postNodeId)) {
|
||||
if (postNodeId.getTaskId() != null) {
|
||||
RecruitProcessTask recruitProcessTask = recruitProcessTaskService.getByTaskId(postNodeId.getTaskId());
|
||||
followVO.setPostCount(recruitProcessTask.getPostCount());
|
||||
} else {
|
||||
followVO.setPostCount(0);
|
||||
}
|
||||
}
|
||||
followVO.setHrId(resumeFollowRecord.getHrId());
|
||||
followVO.setHrName(resumeFollowRecord.getHrName());
|
||||
//设置一面人数
|
||||
followVO.setFirstInterviewCount(resumeFollowRecords.stream()
|
||||
.filter( record -> record.getFirstReach() != null && "1".equals(record.getFirstReach()))
|
||||
.count());
|
||||
//设置二面人数
|
||||
followVO.setSecondInterviewCount(resumeFollowRecords.stream()
|
||||
.filter(record -> record.getSecondReach() != null && "1".equals(record.getSecondReach()))
|
||||
.count());
|
||||
//设置三面人数
|
||||
followVO.setThirdInterviewCount(resumeFollowRecords.stream()
|
||||
.filter(record -> record.getFinalReach() != null && "1".equals(record.getFinalReach()))
|
||||
.count());
|
||||
//设置谈薪人数
|
||||
followVO.setSalaryCount(resumeFollowRecords.stream()
|
||||
.filter(record -> record.getFinalPass() != null && "1".equals(record.getFinalPass()))
|
||||
.count());
|
||||
//设置拿offer人数
|
||||
followVO.setOfferCount(resumeFollowRecords.stream()
|
||||
.filter(record -> record.getAcceptOffer() != null && "1".equals(record.getAcceptOffer()))
|
||||
.count());
|
||||
//设置入职人数(实际入职日期不为空的条数)
|
||||
followVO.setEntryCount(resumeFollowRecords.stream()
|
||||
.filter(record -> record.getActualJoinDate() != null)
|
||||
.count());
|
||||
//插入新数据
|
||||
followVOList.add(followVO);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:follow:edit')")
|
||||
@PutMapping("/follow/edit")
|
||||
@ApiOperation(value = "修改某条招聘计划与统计")
|
||||
public AjaxResult edit(@Validated@RequestBody PostPlanFollow postPlanFollow){
|
||||
return toAjax(postPlanFollowService.updateById(postPlanFollow));
|
||||
}
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:follow:delete')")
|
||||
@DeleteMapping("follow/delete/{id}")
|
||||
@ApiOperation(value = "删除某条招聘计划与统计")
|
||||
public AjaxResult delete (@PathVariable("id") String id){
|
||||
return toAjax(postPlanFollowService.removeById(id));
|
||||
return AjaxResult.success(followVOList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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.RecruitStructure;
|
||||
import cn.zeroerr.common.core.domain.entity.SysRole;
|
||||
import cn.zeroerr.common.core.domain.entity.SysUser;
|
||||
import cn.zeroerr.common.core.domain.model.LoginUser;
|
||||
|
@ -21,8 +22,10 @@ import cn.zeroerr.domain.entity.ResumeFollowRecord;
|
|||
import cn.zeroerr.domain.vo.UserVO;
|
||||
import cn.zeroerr.service.RecruitPostService;
|
||||
import cn.zeroerr.service.ResumeFollowRecordService;
|
||||
import cn.zeroerr.system.mapper.RecruitStructureMapper;
|
||||
import cn.zeroerr.system.service.ISysRoleService;
|
||||
import cn.zeroerr.system.service.ISysUserService;
|
||||
import cn.zeroerr.system.service.RecruitStructureService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
|
@ -58,6 +61,9 @@ public class RecruitInterviewController extends BaseController {
|
|||
@Autowired
|
||||
private ISysRoleService iSysRoleService;
|
||||
|
||||
@Autowired
|
||||
private RecruitStructureService recruitStructureService;
|
||||
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:interview:list')")
|
||||
@GetMapping("/interview/getAllUser")
|
||||
@ApiOperation(value = "查询所有的用户(领导+hr)")
|
||||
|
@ -109,8 +115,8 @@ public class RecruitInterviewController extends BaseController {
|
|||
req.setHrId(getUserId());
|
||||
SysUser sysUser = iSysUserService.selectUserById(getUserId());
|
||||
req.setHrName(sysUser.getNickName());
|
||||
RecruitPost post = recruitPostService.getById(req.getPostId());
|
||||
req.setPostName(post.getPostName());
|
||||
RecruitStructure recruitStructure = recruitStructureService.getByNodeId(req.getPostId());
|
||||
req.setPostName(recruitStructure.getNodeName());
|
||||
req.setCreateDate(LocalDate.now());
|
||||
//默认不置顶
|
||||
req.setTopping(false);
|
||||
|
|
|
@ -478,10 +478,13 @@ public class RecruitProcessController extends BaseController {
|
|||
SysUser user = iSysUserService.selectUserById(getUserId());
|
||||
record.setOperatorName(user.getNickName());
|
||||
//根据岗位id获取岗位name
|
||||
RecruitPost recruitPost = recruitPostService.getById(record.getPostId());
|
||||
record.setPostName(recruitPost.getPostName());
|
||||
//寻找组织架构中,该岗位所属的最大部门
|
||||
|
||||
// RecruitPost recruitPost = recruitPostService.getById(record.getPostId());
|
||||
// record.setPostName(recruitPost.getPostName());
|
||||
RecruitStructure post = recruitStructureService.getByNodeId(record.getPostId());
|
||||
record.setPostName(post.getNodeName());
|
||||
//根据deptId,找到部门名
|
||||
RecruitStructure recruitStructure = recruitStructureService.selectNodeById(record.getDeptId());
|
||||
record.setDeptName(recruitStructure.getNodeName());
|
||||
|
||||
return toAjax(resumeHandleRecordService.save(record));
|
||||
}
|
||||
|
@ -497,7 +500,8 @@ public class RecruitProcessController extends BaseController {
|
|||
recruitPostList.forEach(
|
||||
recruitPost -> {
|
||||
PostListVO postListVO = new PostListVO();
|
||||
postListVO.setPostId(recruitPost.getPostId());
|
||||
//这里传入的是组织架构节点id
|
||||
postListVO.setPostId(recruitPost.getNodeId());
|
||||
postListVO.setPostName(recruitPost.getPostName());
|
||||
postListVOList.add(postListVO);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
package cn.zeroerr.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
@ApiModel
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class FollowDTO {
|
||||
@ApiModelProperty(value = "岗位名称")
|
||||
private String postName;
|
||||
|
||||
@ApiModelProperty(value = "hr名")
|
||||
private String hrName;
|
||||
|
||||
@ApiModelProperty(value = "开始日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate startDate;
|
||||
|
||||
@ApiModelProperty(value = "结束日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate endDate;
|
||||
|
||||
@ApiModelProperty(value = "部门id")
|
||||
private Long deptId;
|
||||
}
|
|
@ -91,6 +91,18 @@ public class ResumeHandleRecord implements Serializable {
|
|||
@TableField(value = "operator_name")
|
||||
private String operatorName;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@TableField(value = "dept_id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 部门名字
|
||||
*/
|
||||
@TableField(value = "dept_name")
|
||||
private String deptName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
package cn.zeroerr.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
|
||||
@ApiModel
|
||||
@Data
|
||||
public class FollowVO {
|
||||
|
||||
@ApiModelProperty(value = "部门id")
|
||||
private Long deptId;
|
||||
|
||||
@ApiModelProperty(value = "部门名字")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty(value = "岗位id")
|
||||
private Long postId;
|
||||
|
||||
@ApiModelProperty(value = "岗位名字")
|
||||
private String postName;
|
||||
|
||||
// /**
|
||||
// * 招聘时间
|
||||
// */
|
||||
// @TableField(value = "recruit_date")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
// @DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
// private LocalDate recruitDate;
|
||||
|
||||
@ApiModelProperty(value = "需求人数")
|
||||
private Integer postCount;
|
||||
|
||||
// /**
|
||||
// * 招聘优先级
|
||||
// */
|
||||
// @TableField(value = "grade")
|
||||
// private Integer grade;
|
||||
|
||||
// /**
|
||||
// * 约面目标
|
||||
// */
|
||||
// @TableField(value = "interview_count")
|
||||
// private Integer interviewCount;
|
||||
//
|
||||
// /**
|
||||
// * 面试通过目标
|
||||
// */
|
||||
// @TableField(value = "pass_count_target")
|
||||
// private Integer passCountTarget;
|
||||
|
||||
@ApiModelProperty(value = "查看过该岗位多少简历数")
|
||||
private Integer lookResumeCount;
|
||||
|
||||
@ApiModelProperty(value = "hr提交部门简历数")
|
||||
private Integer passResumeCount;
|
||||
|
||||
@ApiModelProperty(value = "约面人数")
|
||||
private Integer inviteInterviewCount;
|
||||
|
||||
@ApiModelProperty(value = "接受邀约人数")
|
||||
private Integer acceptInviteCount;
|
||||
|
||||
@ApiModelProperty(value = "一面人数")
|
||||
private Long firstInterviewCount;
|
||||
|
||||
@ApiModelProperty(value = "二面人数")
|
||||
private Long secondInterviewCount;
|
||||
|
||||
@ApiModelProperty(value = "三面人数")
|
||||
private Long thirdInterviewCount;
|
||||
|
||||
@ApiModelProperty(value = "谈薪人数")
|
||||
private Long salaryCount;
|
||||
|
||||
@ApiModelProperty(value = "offer人数")
|
||||
private Long offerCount;
|
||||
|
||||
@ApiModelProperty(value = "入职人数")
|
||||
private Long entryCount;
|
||||
|
||||
// @ApiModelProperty(value = "离职人数")
|
||||
// private Long leaveCount;
|
||||
|
||||
// @ApiModelProperty(value = "实际到面人数")
|
||||
// private Long actualCount;
|
||||
|
||||
// /**
|
||||
// * 周初人数
|
||||
// */
|
||||
// @TableField(value = "early_week_count")
|
||||
// private Integer earlyWeekCount;
|
||||
//
|
||||
// /**
|
||||
// * 周末人数
|
||||
// */
|
||||
// @TableField(value = "late_week_count")
|
||||
// private Integer lateWeekCount;
|
||||
//
|
||||
// /**
|
||||
// * 离职率
|
||||
// */
|
||||
// @TableField(value = "leave_percent")
|
||||
// private Integer leavePercent;
|
||||
|
||||
@ApiModelProperty(value = "负责人id")
|
||||
private Long hrId;
|
||||
|
||||
@ApiModelProperty(value = "负责人名字")
|
||||
private String hrName;
|
||||
|
||||
@ApiModelProperty(value = "到面率")
|
||||
private Double arriveRate;
|
||||
|
||||
@ApiModelProperty(value = "招聘达成率")
|
||||
private Double achievementRate;
|
||||
|
||||
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package cn.zeroerr.mapper;
|
||||
|
||||
import cn.zeroerr.domain.dto.FollowDTO;
|
||||
import cn.zeroerr.domain.entity.ResumeFollowRecord;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
@ -25,7 +26,7 @@ public interface ResumeFollowRecordMapper extends BaseMapper<ResumeFollowRecord>
|
|||
|
||||
List<ResumeFollowRecord> getPostEntryList(@Param("postList") List<Long> postList, @Param("firstDay") LocalDate firstDay, @Param("lastDay")LocalDate lastDay);
|
||||
|
||||
|
||||
List<ResumeFollowRecord> listBySelect(@Param("req") FollowDTO req);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package cn.zeroerr.mapper;
|
||||
|
||||
import cn.zeroerr.domain.dto.FollowDTO;
|
||||
import cn.zeroerr.domain.dto.RecordListDTO;
|
||||
import cn.zeroerr.domain.entity.ResumeHandleRecord;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
@ -22,6 +23,8 @@ public interface ResumeHandleRecordMapper extends BaseMapper<ResumeHandleRecord>
|
|||
List<ResumeHandleRecord> listByCondition(@Param("req") RecordListDTO req,@Param("userId") Long userId);
|
||||
|
||||
List<ResumeHandleRecord> getBySelect(@Param("hrId")Long hrId, @Param("firstDay")LocalDate firstDay, @Param("lastDay")LocalDate lastDay);
|
||||
|
||||
List<ResumeHandleRecord> listBySelect(@Param("req") FollowDTO req);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package cn.zeroerr.service;
|
||||
|
||||
import cn.zeroerr.domain.dto.FollowDTO;
|
||||
import cn.zeroerr.domain.entity.ResumeFollowRecord;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
@ -21,5 +22,5 @@ public interface ResumeFollowRecordService extends IService<ResumeFollowRecord>
|
|||
|
||||
List<ResumeFollowRecord> getPostEntryList(List<Long> postList, LocalDate firstDay, LocalDate lastDay);
|
||||
|
||||
|
||||
List<ResumeFollowRecord> listBySelect(FollowDTO req);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package cn.zeroerr.service;
|
||||
|
||||
import cn.zeroerr.domain.dto.FollowDTO;
|
||||
import cn.zeroerr.domain.dto.RecordListDTO;
|
||||
import cn.zeroerr.domain.entity.ResumeHandleRecord;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
@ -18,4 +19,6 @@ public interface ResumeHandleRecordService extends IService<ResumeHandleRecord>
|
|||
List<ResumeHandleRecord> listByCondition(RecordListDTO req,Long userId);
|
||||
|
||||
List<ResumeHandleRecord> getBySelect(Long hrId, LocalDate firstDay, LocalDate lastDay);
|
||||
|
||||
List<ResumeHandleRecord> listBySelect(FollowDTO req);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package cn.zeroerr.service.impl;
|
||||
|
||||
import cn.zeroerr.domain.dto.FollowDTO;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import cn.zeroerr.domain.entity.ResumeFollowRecord;
|
||||
import cn.zeroerr.service.ResumeFollowRecordService;
|
||||
|
@ -42,6 +43,11 @@ public class ResumeFollowRecordServiceImpl extends ServiceImpl<ResumeFollowRecor
|
|||
return resumeFollowRecordMapper.getPostEntryList(postList,firstDay,lastDay);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ResumeFollowRecord> listBySelect(FollowDTO req) {
|
||||
return resumeFollowRecordMapper.listBySelect(req);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package cn.zeroerr.service.impl;
|
||||
|
||||
import cn.zeroerr.domain.dto.FollowDTO;
|
||||
import cn.zeroerr.domain.dto.RecordListDTO;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import cn.zeroerr.domain.entity.ResumeHandleRecord;
|
||||
|
@ -32,6 +33,11 @@ public class ResumeHandleRecordServiceImpl extends ServiceImpl<ResumeHandleRecor
|
|||
public List<ResumeHandleRecord> getBySelect(Long hrId, LocalDate firstDay, LocalDate lastDay) {
|
||||
return resumeHandleRecordMapper.getBySelect(hrId,firstDay,lastDay);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ResumeHandleRecord> listBySelect(FollowDTO req) {
|
||||
return resumeHandleRecordMapper.listBySelect(req);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -115,4 +115,16 @@
|
|||
</select>
|
||||
|
||||
|
||||
<select id="listBySelect" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from resume_follow_record
|
||||
where receive_date <![CDATA[>=]]> #{req.startDate}
|
||||
and receive_date <![CDATA[<=]]> #{req.endDate}
|
||||
<if test="req.hrName!=null and req.hrName != ''">and hr_name like concat('%', #{req.hrName}, '%')</if>
|
||||
<if test="req.postName!=null and req.postName != ''">and post_name like concat('%', #{req.postName}, '%')</if>
|
||||
<if test="req.deptId!=null">and dept_id = #{req.deptId}</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -17,19 +17,21 @@
|
|||
<result property="receiveInviteNum" column="receive_invite_num" jdbcType="INTEGER"/>
|
||||
<result property="operatorId" column="operator_id" />
|
||||
<result property="operatorName" column="operator_name" />
|
||||
<result property="deptId" column="dept_Id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,post_id,post_name,
|
||||
handle_date,recruitment_channel,seen_num,
|
||||
greet_num,submit_num,qualified_num,
|
||||
receive_invite_num,operator_id,operator_name
|
||||
receive_invite_num,operator_id,operator_name,dept_id,dept_name
|
||||
</sql>
|
||||
|
||||
<select id="listByCondition" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"/> from resume_handle_record
|
||||
where operator_id=#{userId}
|
||||
<if test="req.postName!=null and postName != ''">and post_name like concat('%', #{req.postName}, '%')</if>
|
||||
<if test="req.postName!=null and req.postName != ''">and post_name like concat('%', #{req.postName}, '%')</if>
|
||||
<if test="req.startDate!=null">and handle_date <![CDATA[>=]]> #{req.startDate}</if>
|
||||
<if test="req.endDate!=null">and handle_date <![CDATA[<=]]> #{req.endDate}</if>
|
||||
<if test="req.deptId!=null">and dept_id = #{req.deptId}</if>
|
||||
|
@ -44,4 +46,17 @@
|
|||
and handle_date <![CDATA[<=]]> #{lastDay}
|
||||
<if test="hrId!=null">and operator_id=#{hrId}</if>
|
||||
</select>
|
||||
|
||||
<select id="listBySelect" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from resume_handle_record
|
||||
where handle_date <![CDATA[>=]]> #{req.startDate}
|
||||
and handle_date <![CDATA[<=]]> #{req.endDate}
|
||||
<if test="req.hrName!=null and req.hrName != ''">and operator_name like concat('%', #{req.hrName}, '%')</if>
|
||||
<if test="req.postName!=null and req.postName != ''">and post_name like concat('%', #{req.postName}, '%')</if>
|
||||
<if test="req.deptId!=null">and dept_id = #{req.deptId}</if>
|
||||
order by handle_date asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue