From 3ccfd29d0147531d0f8ed93c5f2212f7863cb03f Mon Sep 17 00:00:00 2001 From: lw <532810027@qq.com> Date: Mon, 8 Jul 2024 15:06:11 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1=E8=B7=9F?= =?UTF-8?q?=E8=B8=AA=E7=9C=8B=E6=9D=BF=E9=80=BB=E8=BE=91=E4=B8=8E=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=20=E3=80=82=202.=E5=85=A5=E8=81=8C=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=96=B0=E5=A2=9E=E5=85=A5=E8=81=8C=E5=91=A8?= =?UTF-8?q?=E7=9F=A5=E5=AD=97=E6=AE=B5=E7=9A=84=E4=B8=8A=E4=BC=A0=E5=92=8C?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-druid.yml | 14 +- .../src/main/resources/application.yml | 12 +- .../controller/RecruitFollowController.java | 226 ++++++++++++++++-- .../RecruitPostGradeController.java | 2 +- .../controller/RecruitProcessController.java | 11 +- .../java/cn/zeroerr/domain/dto/FollowDTO.java | 6 + .../cn/zeroerr/domain/entity/EntryManage.java | 4 + .../java/cn/zeroerr/domain/vo/FollowVO.java | 21 +- .../cn/zeroerr/mapper/PostGradeMapper.java | 2 + .../cn/zeroerr/service/PostGradeService.java | 2 + .../service/impl/PostGradeServiceImpl.java | 5 + .../resources/mapper/EntryManageMapper.xml | 3 +- .../main/resources/mapper/PostGradeMapper.xml | 14 ++ .../mapper/system/RecruitStructureMapper.xml | 2 +- 14 files changed, 288 insertions(+), 36 deletions(-) diff --git a/zeroerr_oa-admin/src/main/resources/application-druid.yml b/zeroerr_oa-admin/src/main/resources/application-druid.yml index ddd2703..73a9d63 100644 --- a/zeroerr_oa-admin/src/main/resources/application-druid.yml +++ b/zeroerr_oa-admin/src/main/resources/application-druid.yml @@ -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: # 从数据源开关/默认关闭 diff --git a/zeroerr_oa-admin/src/main/resources/application.yml b/zeroerr_oa-admin/src/main/resources/application.yml index f44ce9a..3d7e309 100644 --- a/zeroerr_oa-admin/src/main/resources/application.yml +++ b/zeroerr_oa-admin/src/main/resources/application.yml @@ -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: diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitFollowController.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitFollowController.java index 73bb245..d4ce1c7 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitFollowController.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitFollowController.java @@ -8,6 +8,8 @@ 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.common.utils.poi.ExcelUtil; +import cn.zeroerr.domain.dto.EntryManagerDTO; import cn.zeroerr.domain.dto.FollowDTO; import cn.zeroerr.domain.entity.*; import cn.zeroerr.domain.vo.FollowVO; @@ -26,9 +28,12 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; import java.math.RoundingMode; import java.time.LocalDate; +import java.time.YearMonth; +import java.time.format.DateTimeFormatter; import java.util.*; import java.util.stream.Collectors; @@ -57,6 +62,9 @@ public class RecruitFollowController extends BaseController { @Autowired private ResumeFollowRecordService resumeFollowRecordService; + @Autowired + private PostGradeService postGradeService; + // @PreAuthorize("@ss.hasPermi('recruit:follow:add')") // @Log(title = "新增招聘计划与统计", businessType = BusinessType.INSERT) @@ -151,7 +159,16 @@ public class RecruitFollowController extends BaseController { @ApiOperation(value = "查询招聘计划与统计列表") public AjaxResult list(FollowDTO req) { List followVOList = new ArrayList<>(); - + String month = req.getMonth(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); + // 解析字符串为YearMonth对象 + YearMonth yearMonth = YearMonth.parse(month, formatter); + // 获取月份的第一天 + LocalDate startDate = yearMonth.atDay(1); + // 获取月份的最后一天 + LocalDate endDate =LocalDate.now(); + req.setStartDate(startDate); + req.setEndDate(endDate); // 获取符合条件的简历处理记录并按岗位ID分组 Map> mapResumeHandleRecord = resumeHandleRecordService.listBySelect(req) .stream().collect(Collectors.groupingBy(ResumeHandleRecord::getPostId)); @@ -182,10 +199,51 @@ public class RecruitFollowController extends BaseController { } // 获取符合条件的面试跟踪记录并按岗位ID分组 - handleFollowRecords(req, followVOList); + handleFollowRecords(req, followVOList,startDate,endDate); - // 遍历followVOList,将所有字段(除了deptName)为null的字段设置为0 - followVOList.forEach(followVO -> { + //获取该月份,筛选岗位等级的岗位信息 + List postGradeList=postGradeService.listByMonth(req.getMonth(),req.getGrade(),req.getHrName(),req.getPostName()); + // 获取所有的 postId 列表 + List postGradeIds = postGradeList.stream() + .map(PostGrade::getPostId) + .collect(Collectors.toList()); + // 获取 followVOList 中的所有 postId 列表 + Set followVOIds = followVOList.stream() + .map(FollowVO::getPostId) + .collect(Collectors.toSet()); + + // 找出 postGradeIds 中不包含在 followVOIds 的所有 postId + List missingPostIds = postGradeIds.stream() + .filter(postId -> !followVOIds.contains(postId)) + .collect(Collectors.toList()); + + // 过滤 followVOList 中的 postId 不在 postGradeIds 里的数据 + List filteredFollowVOList = followVOList.stream() + .filter(followVO -> postGradeIds.contains(followVO.getPostId())) + .collect(Collectors.toList()); + + missingPostIds.forEach( + missingPostId->{ + Optional optionalPostGrade = postGradeList.stream() + .filter(postGrade -> postGrade.getPostId() == missingPostId) + .findFirst(); + PostGrade postGrade = optionalPostGrade.get(); + FollowVO followVO = new FollowVO(); + followVO.setPostName(postGrade.getPostName()); + followVO.setPostId(postGrade.getPostId()); + followVO.setHrName(postGrade.getHrName()); + followVO.setDeptName(postGrade.getDeptName()); + RecruitStructure byNodeId = recruitStructureService.getByNodeId(missingPostId); + if(byNodeId.getTaskId()!=null){ + RecruitProcessTask byTaskId = recruitProcessTaskService.getByTaskId(byNodeId.getTaskId()); + followVO.setPostCount(byTaskId.getPostCount()); + } + filteredFollowVOList.add(followVO); + } + ); + + // filteredFollowVOList,将所有字段(除了deptName)为null的字段设置为0 + filteredFollowVOList.forEach(followVO -> { if (followVO.getPostId() == null) followVO.setPostId(0L); if (followVO.getPostName() == null) followVO.setPostName(""); if (followVO.getDeptId() == null) followVO.setDeptId(0L); @@ -203,6 +261,13 @@ public class RecruitFollowController extends BaseController { if (followVO.getOfferCount() == null) followVO.setOfferCount(0L); if (followVO.getEntryCount() == null) followVO.setEntryCount(0L); + Optional optionalPostGrade = postGradeList.stream() + .filter(postGrade -> Objects.equals(postGrade.getPostId(), followVO.getPostId())) + .findFirst(); + if(optionalPostGrade.isPresent()){ + followVO.setGrade(optionalPostGrade.get().getGrade()); + } + //封装到面率(一面人数/接受邀约人数) if(followVO.getInviteInterviewCount()!=null&&followVO.getInviteInterviewCount()!=0){ BigDecimal arrivePercentage = new BigDecimal(followVO.getFirstInterviewCount()).divide(new BigDecimal(followVO.getInviteInterviewCount()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); @@ -219,25 +284,19 @@ public class RecruitFollowController extends BaseController { } }); - Collections.sort(followVOList, new Comparator() { - @Override - public int compare(FollowVO o1, FollowVO o2) { - return Long.compare(o1.getHrId(), o2.getHrId()); - } - }); + filteredFollowVOList.sort(Comparator.comparing(followVO -> Integer.parseInt(followVO.getGrade()))); - return AjaxResult.success(followVOList); + return AjaxResult.success(filteredFollowVOList); } private String handleDeptName(Long postId) { return recruitStructureService.findTopLevelDepartmentNameByNodeId(postId); } - private void handleFollowRecords(FollowDTO req, List followVOList) { + private void handleFollowRecords(FollowDTO req, List followVOList,LocalDate startDate,LocalDate endDate) { String hrName = req.getHrName(); - LocalDate startDate = req.getStartDate(); - LocalDate endDate = req.getEndDate(); + // 定义所有需要处理的状态及其对应的Map Map>> statusMaps = new HashMap<>(); @@ -305,4 +364,143 @@ public class RecruitFollowController extends BaseController { + + @PostMapping("/export") + @PreAuthorize("@ss.hasAnyPermi('recruit:follow:export')") + @ApiOperation(value = "下载招聘计划与统计列表") + @Log(title = "下载招聘计划与统计列表", businessType = BusinessType.EXPORT) + public void export(HttpServletResponse response, FollowDTO req) { + + List followVOList = new ArrayList<>(); + String month = req.getMonth(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); + // 解析字符串为YearMonth对象 + YearMonth yearMonth = YearMonth.parse(month, formatter); + // 获取月份的第一天 + LocalDate startDate = yearMonth.atDay(1); + // 获取月份的最后一天 + LocalDate endDate =LocalDate.now(); + req.setStartDate(startDate); + req.setEndDate(endDate); + // 获取符合条件的简历处理记录并按岗位ID分组 + Map> mapResumeHandleRecord = resumeHandleRecordService.listBySelect(req) + .stream().collect(Collectors.groupingBy(ResumeHandleRecord::getPostId)); + + if (!mapResumeHandleRecord.isEmpty()) { + mapResumeHandleRecord.forEach((postId, listByPostId) -> { + if (!listByPostId.isEmpty()) { + ResumeHandleRecord firstRecord = listByPostId.get(0); + FollowVO followVO = new FollowVO(); + followVO.setPostId(firstRecord.getPostId()); + followVO.setPostName(firstRecord.getPostName()); + followVO.setDeptId(firstRecord.getDeptId()); + followVO.setDeptName(firstRecord.getDeptName()); + followVO.setHrId(firstRecord.getOperatorId()); + followVO.setHrName(firstRecord.getOperatorName()); + + RecruitStructure postNodeId = recruitStructureService.getByNodeId(followVO.getPostId()); + followVO.setPostCount(postNodeId != null && postNodeId.getTaskId() != null + ? recruitProcessTaskService.getByTaskId(postNodeId.getTaskId()).getPostCount() + : 0); + + followVO.setLookResumeCount(listByPostId.stream().mapToInt(ResumeHandleRecord::getGreetNum).sum()); + followVO.setInviteInterviewCount(listByPostId.stream().mapToInt(ResumeHandleRecord::getReceiveInviteNum).sum()); + + followVOList.add(followVO); + } + }); + } + + // 获取符合条件的面试跟踪记录并按岗位ID分组 + handleFollowRecords(req, followVOList,startDate,endDate); + + //获取该月份,筛选岗位等级的岗位信息 + List postGradeList=postGradeService.listByMonth(req.getMonth(),req.getGrade(),req.getHrName(),req.getPostName()); + // 获取所有的 postId 列表 + List postGradeIds = postGradeList.stream() + .map(PostGrade::getPostId) + .collect(Collectors.toList()); + // 获取 followVOList 中的所有 postId 列表 + Set followVOIds = followVOList.stream() + .map(FollowVO::getPostId) + .collect(Collectors.toSet()); + + // 找出 postGradeIds 中不包含在 followVOIds 的所有 postId + List missingPostIds = postGradeIds.stream() + .filter(postId -> !followVOIds.contains(postId)) + .collect(Collectors.toList()); + + // 过滤 followVOList 中的 postId 不在 postGradeIds 里的数据 + List filteredFollowVOList = followVOList.stream() + .filter(followVO -> postGradeIds.contains(followVO.getPostId())) + .collect(Collectors.toList()); + + missingPostIds.forEach( + missingPostId->{ + Optional optionalPostGrade = postGradeList.stream() + .filter(postGrade -> postGrade.getPostId() == missingPostId) + .findFirst(); + PostGrade postGrade = optionalPostGrade.get(); + FollowVO followVO = new FollowVO(); + followVO.setPostName(postGrade.getPostName()); + followVO.setPostId(postGrade.getPostId()); + followVO.setHrName(postGrade.getHrName()); + followVO.setDeptName(postGrade.getDeptName()); + RecruitStructure byNodeId = recruitStructureService.getByNodeId(missingPostId); + if(byNodeId.getTaskId()!=null){ + RecruitProcessTask byTaskId = recruitProcessTaskService.getByTaskId(byNodeId.getTaskId()); + followVO.setPostCount(byTaskId.getPostCount()); + } + filteredFollowVOList.add(followVO); + } + ); + + // filteredFollowVOList,将所有字段(除了deptName)为null的字段设置为0 + filteredFollowVOList.forEach(followVO -> { + if (followVO.getPostId() == null) followVO.setPostId(0L); + if (followVO.getPostName() == null) followVO.setPostName(""); + if (followVO.getDeptId() == null) followVO.setDeptId(0L); + if (followVO.getDeptName() == null) followVO.setDeptName(handleDeptName(followVO.getPostId())); + if (followVO.getHrId() == null) followVO.setHrId(0L); + if (followVO.getHrName() == null) followVO.setHrName(""); + if (followVO.getPostCount() == null) followVO.setPostCount(0); + if (followVO.getLookResumeCount() == null) followVO.setLookResumeCount(0); + if (followVO.getInviteInterviewCount() == null) followVO.setInviteInterviewCount(0); + if (followVO.getPassResumeCount() == null) followVO.setPassResumeCount(0); + if (followVO.getFirstInterviewCount() == null) followVO.setFirstInterviewCount(0L); + if (followVO.getSecondInterviewCount() == null) followVO.setSecondInterviewCount(0L); + if (followVO.getThirdInterviewCount() == null) followVO.setThirdInterviewCount(0L); + if (followVO.getSalaryCount() == null) followVO.setSalaryCount(0L); + if (followVO.getOfferCount() == null) followVO.setOfferCount(0L); + if (followVO.getEntryCount() == null) followVO.setEntryCount(0L); + + Optional optionalPostGrade = postGradeList.stream() + .filter(postGrade -> Objects.equals(postGrade.getPostId(), followVO.getPostId())) + .findFirst(); + if(optionalPostGrade.isPresent()){ + followVO.setGrade(optionalPostGrade.get().getGrade()); + } + + //封装到面率(一面人数/接受邀约人数) + if(followVO.getInviteInterviewCount()!=null&&followVO.getInviteInterviewCount()!=0){ + BigDecimal arrivePercentage = new BigDecimal(followVO.getFirstInterviewCount()).divide(new BigDecimal(followVO.getInviteInterviewCount()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + followVO.setArriveRate(arrivePercentage.doubleValue()); + }else { + followVO.setArriveRate(0d); + } + //封装招聘达成率(入职人数/需求人数) + 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); + } + + }); + + filteredFollowVOList.sort(Comparator.comparing(followVO -> Integer.parseInt(followVO.getGrade()))); + ExcelUtil util = new ExcelUtil(FollowVO.class); + util.exportExcel(response,filteredFollowVOList, "任务跟踪"); + } + } diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitPostGradeController.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitPostGradeController.java index 5255322..17a6305 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitPostGradeController.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitPostGradeController.java @@ -74,7 +74,7 @@ public class RecruitPostGradeController extends BaseController { return toAjax(postGradeService.updateById(req)); } - @PreAuthorize("@ss.hasAnyPermi('recruit:grade:list')") + @PreAuthorize("@ss.hasAnyPermi('recruit:grade:query')") @GetMapping("/list") @ApiOperation(value = "展示某月份的岗位评级") public TableDataInfo listPostGrade(PostGrade req) { diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitProcessController.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitProcessController.java index ea21dd0..32daf54 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitProcessController.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitProcessController.java @@ -115,7 +115,7 @@ public class RecruitProcessController extends BaseController { return error("上传图片异常,请联系管理员"); } - @PreAuthorize("@ss.hasAnyPermi('recruit:process:list,recruit:postsea:list,recruit:resume:list,recruit:follow:add')") + @GetMapping("/apply/listDept") @ApiOperation(value = "审批-《我的申请》获取所有二级部门") public AjaxResult dept() { @@ -372,7 +372,7 @@ public class RecruitProcessController extends BaseController { } - @PreAuthorize("@ss.hasAnyPermi('recruit:pending:repulse,recruit:postsea:distribution,recruit:follow:list')") + @GetMapping("/pending/getHr") @ApiOperation(value = "审批-《待我审批》查询所有的hr") public AjaxResult getHr() { @@ -422,7 +422,7 @@ public class RecruitProcessController extends BaseController { return success("成功分配"); } - @PreAuthorize("@ss.hasPermi('recruit:mypost:list')") + @PreAuthorize("@ss.hasPermi('recruit:postsea:distribution')") @GetMapping("/mypost/getOne/{taskId}") @ApiOperation(value = "岗位公海-获取某个岗位的hr分配数据") public AjaxResult getPostList(@PathVariable("taskId")String taskId) { @@ -505,12 +505,13 @@ public class RecruitProcessController extends BaseController { } - @PreAuthorize("@ss.hasAnyPermi('recruit:resume:add,recruit:interview:add,recruit:follow:add')") + @GetMapping("/mypost/resume/postList") @ApiOperation(value = "在招岗位-《简历处理》获取所有的岗位名字") public AjaxResult getPostList() { List postListVOList = new ArrayList<>(); - List recruitPostList = recruitPostService.listMyPost(getUserId()); + //List recruitPostList = recruitPostService.listMyPost(getUserId()); + List recruitPostList = recruitPostService.list(); if (!CollectionUtils.isEmpty(recruitPostList)) { recruitPostList.forEach( recruitPost -> { diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/dto/FollowDTO.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/dto/FollowDTO.java index c26dba6..570afea 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/dto/FollowDTO.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/dto/FollowDTO.java @@ -30,4 +30,10 @@ public class FollowDTO { @ApiModelProperty(value = "部门id") private Long deptId; + + @ApiModelProperty(value = "招聘等级") + private Integer grade; + + @ApiModelProperty(value = "选择月份") + private String month; } diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/entity/EntryManage.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/entity/EntryManage.java index 5aad1fc..71a8c5b 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/entity/EntryManage.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/entity/EntryManage.java @@ -130,6 +130,10 @@ public class EntryManage implements Serializable { @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime updateTime; + @TableField(value = "file") + @Excel(name = "入职周知", cellType = Excel.ColumnType.TEXT) + private String file; + @TableField(exist = false) private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/vo/FollowVO.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/vo/FollowVO.java index 2c122e7..0c7ca8c 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/vo/FollowVO.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/vo/FollowVO.java @@ -1,5 +1,6 @@ package cn.zeroerr.domain.vo; +import cn.zeroerr.common.annotation.Excel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -14,14 +15,20 @@ public class FollowVO { private Long deptId; @ApiModelProperty(value = "部门名字") + @Excel(name = "部门") private String deptName; @ApiModelProperty(value = "岗位id") private Long postId; @ApiModelProperty(value = "岗位名字") + @Excel(name = "岗位") private String postName; + @ApiModelProperty(value = "招聘等级") + @Excel(name = "招聘等级",dictType = "recruit_post_grade") + private String grade; + // /** // * 招聘时间 // */ @@ -31,6 +38,7 @@ public class FollowVO { // private LocalDate recruitDate; @ApiModelProperty(value = "需求人数") + @Excel(name = "需求人数") private Integer postCount; // /** @@ -51,34 +59,42 @@ public class FollowVO { // @TableField(value = "pass_count_target") // private Integer passCountTarget; - @ApiModelProperty(value = "查看过该岗位多少简历数") + @ApiModelProperty(value = "主动打招呼数") + @Excel(name = "主动打招呼数") private Integer lookResumeCount; @ApiModelProperty(value = "合格简历数") + @Excel(name = "合格简历数") private Integer passResumeCount; @ApiModelProperty(value = "约面人数") + @Excel(name = "约面人数") private Integer inviteInterviewCount; @ApiModelProperty(value = "接受邀约人数") private Integer acceptInviteCount; @ApiModelProperty(value = "一面人数") + @Excel(name = "初试数") private Long firstInterviewCount; @ApiModelProperty(value = "二面人数") private Long secondInterviewCount; @ApiModelProperty(value = "三面人数") + @Excel(name = "终试数") private Long thirdInterviewCount; @ApiModelProperty(value = "谈薪人数") + @Excel(name = "终试通过人数") private Long salaryCount; @ApiModelProperty(value = "offer人数") + @Excel(name = "接受offer人数") private Long offerCount; @ApiModelProperty(value = "入职人数") + @Excel(name = "入职人数") private Long entryCount; // @ApiModelProperty(value = "离职人数") @@ -112,10 +128,13 @@ public class FollowVO { private String hrName; @ApiModelProperty(value = "到面率") + @Excel(name = "到面率(%)") private Double arriveRate; @ApiModelProperty(value = "招聘达成率") + @Excel(name = "招聘达成率(%)") private Double achievementRate; + } diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/mapper/PostGradeMapper.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/mapper/PostGradeMapper.java index bffadd6..d6eb5b5 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/mapper/PostGradeMapper.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/mapper/PostGradeMapper.java @@ -15,6 +15,8 @@ import java.util.List; public interface PostGradeMapper extends BaseMapper { List listBySelect(@Param("req") PostGrade req); + + List listByMonth(@Param("month") String month, @Param("grade") Integer grade,@Param("hrName") String hrName,@Param("postName") String postName); } diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/PostGradeService.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/PostGradeService.java index eee5dd7..cf25fd9 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/PostGradeService.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/PostGradeService.java @@ -13,4 +13,6 @@ import java.util.List; public interface PostGradeService extends IService { List listBySelect(PostGrade req); + + List listByMonth(String month, Integer grade,String hrName,String postName); } diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/impl/PostGradeServiceImpl.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/impl/PostGradeServiceImpl.java index 4784a0a..6f28edf 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/impl/PostGradeServiceImpl.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/impl/PostGradeServiceImpl.java @@ -21,6 +21,11 @@ public class PostGradeServiceImpl extends ServiceImpl listBySelect(PostGrade req) { return this.baseMapper.listBySelect(req); } + + @Override + public List listByMonth(String month, Integer grade,String hrName,String postName) { + return this.baseMapper.listByMonth(month,grade,hrName,postName); + } } diff --git a/zeroerr_oa-recruit/src/main/resources/mapper/EntryManageMapper.xml b/zeroerr_oa-recruit/src/main/resources/mapper/EntryManageMapper.xml index 8030234..14d1cc3 100644 --- a/zeroerr_oa-recruit/src/main/resources/mapper/EntryManageMapper.xml +++ b/zeroerr_oa-recruit/src/main/resources/mapper/EntryManageMapper.xml @@ -11,6 +11,7 @@ + @@ -25,7 +26,7 @@ post_id,post_name, user_name,hr_id,hr_name, final_pass_date,join_date,actual_join_date, - entry_fail_reason,is_entry + entry_fail_reason,is_entry,file + + diff --git a/zeroerr_oa-system/src/main/resources/mapper/system/RecruitStructureMapper.xml b/zeroerr_oa-system/src/main/resources/mapper/system/RecruitStructureMapper.xml index 442a021..a407981 100644 --- a/zeroerr_oa-system/src/main/resources/mapper/system/RecruitStructureMapper.xml +++ b/zeroerr_oa-system/src/main/resources/mapper/system/RecruitStructureMapper.xml @@ -62,7 +62,7 @@ d.type, d.post_type, d.task_id, - d.post_complete_date + 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}