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/HomePageController.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/HomePageController.java index 5b67af8..e6c6fae 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/HomePageController.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/HomePageController.java @@ -65,35 +65,50 @@ public class HomePageController extends BaseController { List resumeFollowRecordList = resumeFollowRecordService.getBySelect(req.getHrId(), firstDay, lastDay); //寻找《看过简历数》 List resumeHandleRecordList = resumeHandleRecordService.getBySelect(req.getHrId(), firstDay, lastDay); + + //寻找该月份实际到面的人数 + List resumeFollowRecordActualArrivedList =resumeFollowRecordService.getBySelectMonth(req.getHrName(), firstDay, lastDay,0); + + //寻找该月份终试通过人数 + List resumeFollowRecordFinalPassList =resumeFollowRecordService.getBySelectMonth(req.getHrName(), firstDay, lastDay,1); + + //寻找该月份实际入职人数 + List resumeFollowRecordActualEntryList =resumeFollowRecordService.getBySelectMonth(req.getHrName(), firstDay, lastDay,2); + + //寻找该月份初试通过人数 + List resumeFollowRecordFirstPassList =resumeFollowRecordService.getBySelectMonth(req.getHrName(), firstDay, lastDay,3); + ResumeStatVO resumeStatVO = new ResumeStatVO(); //1.合格简历数量 resumeStatVO.setQualifiedCount(resumeFollowRecordList.size()); //2 .初试通过人数 - resumeStatVO.setFistCount(resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getFirstPass()) && "1".equals(record.getFirstPass())).count()); + resumeStatVO.setFistCount(resumeFollowRecordFirstPassList.stream().filter(record -> Objects.nonNull(record.getFirstPass()) && "1".equals(record.getFirstPass())).count()); //3.通过人数(终面) - resumeStatVO.setFinalPassCount(resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getFinalPass()) && "1".equals(record.getFinalPass())).count()); + resumeStatVO.setFinalPassCount(resumeFollowRecordFinalPassList.stream().filter(record -> Objects.nonNull(record.getFinalPass()) && "1".equals(record.getFinalPass())).count()); //4.未通过人数(终面) resumeStatVO.setFinalFailCount(resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getFinalPass()) && "0".equals(record.getFinalPass())).count()); //5.入职人数("实际"入职日期不为空的数据统计) - resumeStatVO.setEntryCount(resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getActualJoinDate())).count()); + resumeStatVO.setEntryCount(resumeFollowRecordActualEntryList.stream().filter(record -> Objects.nonNull(record.getActualJoinDate())).count()); //6.简历来源:下载 resumeStatVO.setDownLoadCounts(resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getResumeSource()) && "2".equals(record.getResumeSource())).count()); //7.简历来源:自投 resumeStatVO.setSelfCounts(resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getResumeSource()) && "1".equals(record.getResumeSource())).count()); //8.封装实际到面人数 - resumeStatVO.setActualArriveCounts(resumeFollowRecordList.stream().filter(record -> Objects.nonNull(record.getFirstReach()) && "1".equals(record.getFirstReach())).count()); - // 9. 通过比例(终面)=通过人数(终面)/(通过人数(终面)+未通过人数(终面)) - long totalCount = resumeStatVO.getFinalPassCount() + resumeStatVO.getFinalFailCount(); - if (totalCount != 0L) { - BigDecimal passPercentage = new BigDecimal(resumeStatVO.getFinalPassCount()).divide(new BigDecimal(totalCount), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); - resumeStatVO.setPassPercent(passPercentage.doubleValue()); - } else { - resumeStatVO.setPassPercent(0d); + resumeStatVO.setActualArriveCounts(resumeFollowRecordActualArrivedList.stream().filter(record -> Objects.nonNull(record.getFirstReach()) && "1".equals(record.getFirstReach())).count()); + // 9. 通过比例(终面)=通过人数(终面)/初面实际到面人数 + //long totalCount = resumeStatVO.getFinalPassCount() + resumeStatVO.getFinalFailCount(); + if (resumeStatVO.getActualArriveCounts() != null) { + if (resumeStatVO.getActualArriveCounts() != 0L) { + BigDecimal passPercentage = new BigDecimal(resumeStatVO.getFinalPassCount()).divide(new BigDecimal(resumeStatVO.getActualArriveCounts()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + resumeStatVO.setPassPercent(passPercentage.doubleValue()); + } else { + resumeStatVO.setPassPercent(0d); + } } - //7.入职比例=入职人数/通过人数(终面) - if (resumeStatVO.getFinalPassCount() != null) { - if (resumeStatVO.getFinalPassCount() != 0L) { - BigDecimal entryPercentage = new BigDecimal(resumeStatVO.getEntryCount()).divide(new BigDecimal(resumeStatVO.getFinalPassCount()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + //7.入职比例=入职人数/初面实际到面人数 + if (resumeStatVO.getActualArriveCounts() != null) { + if (resumeStatVO.getActualArriveCounts() != 0L) { + BigDecimal entryPercentage = new BigDecimal(resumeStatVO.getEntryCount()).divide(new BigDecimal(resumeStatVO.getActualArriveCounts()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); resumeStatVO.setEntryPercent(entryPercentage.doubleValue()); } } else { 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 ba2c8ba..99ec03a 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 @@ -29,10 +29,7 @@ import org.springframework.web.bind.annotation.*; import java.math.BigDecimal; import java.math.RoundingMode; import java.time.LocalDate; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Optional; +import java.util.*; import java.util.stream.Collectors; @RestController @@ -61,7 +58,7 @@ public class RecruitFollowController extends BaseController { private ResumeFollowRecordService resumeFollowRecordService; -// @PreAuthorize("@ss.hasPermi('recruit:follow:add')") + // @PreAuthorize("@ss.hasPermi('recruit:follow:add')") // @Log(title = "新增招聘计划与统计", businessType = BusinessType.INSERT) // @PostMapping("/follow/add") // @ApiOperation(value = "新增招聘计划与统计") @@ -153,165 +150,146 @@ public class RecruitFollowController extends BaseController { @GetMapping("/follow/list") @ApiOperation(value = "查询招聘计划与统计列表") public AjaxResult list(FollowDTO req) { - List followVOList=new ArrayList<>(); - //根据搜索条件,从简历处理表中查询所有符合条件的数据 - List resumeHandleRecordList=resumeHandleRecordService.listBySelect(req); - Map> mapResumeHandleRecord = resumeHandleRecordList.stream().collect(Collectors.groupingBy(ResumeHandleRecord::getPostId)); - if(!CollectionUtils.isEmpty(mapResumeHandleRecord)){ - for (Map.Entry> entry : mapResumeHandleRecord.entrySet()) { - List 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 { - followVO.setPostCount(0); - } - } + List followVOList = new ArrayList<>(); + + // 获取符合条件的简历处理记录并按岗位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()); - //封装查看的简历数 - followVO.setLookResumeCount(listByPostId.stream() - .mapToInt(ResumeHandleRecord::getGreetNum) - .sum()); -// //封装人力资源通过简历数 -// followVO.setPassResumeCount(listByPostId.stream() -// .mapToInt(ResumeHandleRecord::getQualifiedNum) -// .sum()); - //封装约面人数 - followVO.setInviteInterviewCount(listByPostId.stream() - .mapToInt(ResumeHandleRecord::getReceiveInviteNum) - .sum()); - //封装接受邀约人数 -// followVO.setAcceptInviteCount(listByPostId.stream() -// .mapToInt(ResumeHandleRecord::getReceiveInviteNum) -// .sum()); followVOList.add(followVO); } + }); + } + + // 获取符合条件的面试跟踪记录并按岗位ID分组 + handleFollowRecords(req, followVOList); + + // 遍历followVOList,将所有字段(除了deptName)为null的字段设置为0 + followVOList.forEach(followVO -> { + if (followVO.getPostId() == null) followVO.setPostId(0L); + if (followVO.getPostName() == null) followVO.setPostName(""); + if (followVO.getDeptId() == null) followVO.setDeptId(0L); + 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); + + //封装到面率(一面人数/接受邀约人数) + 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); + } + + }); + + + + return AjaxResult.success(followVOList); + } + + private void handleFollowRecords(FollowDTO req, List followVOList) { + String hrName = req.getHrName(); + LocalDate startDate = req.getStartDate(); + LocalDate endDate = req.getEndDate(); + + // 定义所有需要处理的状态及其对应的Map + Map>> statusMaps = new HashMap<>(); + statusMaps.put(-1, resumeFollowRecordService.listBySelect(req).stream().collect(Collectors.groupingBy(ResumeFollowRecord::getPostId))); + statusMaps.put(0, resumeFollowRecordService.getBySelectMonth(hrName, startDate, endDate, 0).stream().collect(Collectors.groupingBy(ResumeFollowRecord::getPostId))); + statusMaps.put(4, resumeFollowRecordService.getBySelectMonth(hrName, startDate, endDate, 4).stream().collect(Collectors.groupingBy(ResumeFollowRecord::getPostId))); + statusMaps.put(5, resumeFollowRecordService.getBySelectMonth(hrName, startDate, endDate, 5).stream().collect(Collectors.groupingBy(ResumeFollowRecord::getPostId))); + statusMaps.put(1, resumeFollowRecordService.getBySelectMonth(hrName, startDate, endDate, 1).stream().collect(Collectors.groupingBy(ResumeFollowRecord::getPostId))); + statusMaps.put(2, resumeFollowRecordService.getBySelectMonth(hrName, startDate, endDate, 2).stream().collect(Collectors.groupingBy(ResumeFollowRecord::getPostId))); + statusMaps.put(6, resumeFollowRecordService.getBySelectMonth(hrName, startDate, endDate, 6).stream().collect(Collectors.groupingBy(ResumeFollowRecord::getPostId))); + + // 处理每种状态下的记录 + for (Map.Entry>> entry : statusMaps.entrySet()) { + int status = entry.getKey(); + Map> mapResumeFollowRecord = entry.getValue(); + + if (!mapResumeFollowRecord.isEmpty()) { + for (Map.Entry> recordEntry : mapResumeFollowRecord.entrySet()) { + Long postId = recordEntry.getKey(); + List records = recordEntry.getValue(); + + FollowVO followVO = followVOList.stream().filter(f -> f.getPostId().equals(postId)).findFirst().orElseGet(() -> { + FollowVO newFollowVO = new FollowVO(); + ResumeFollowRecord firstRecord = records.get(0); + newFollowVO.setPostId(firstRecord.getPostId()); + newFollowVO.setPostName(firstRecord.getPostName()); + newFollowVO.setHrId(firstRecord.getHrId()); + newFollowVO.setHrName(firstRecord.getHrName()); + RecruitStructure postNodeId = recruitStructureService.getByNodeId(newFollowVO.getPostId()); + newFollowVO.setPostCount(postNodeId != null && postNodeId.getTaskId() != null + ? recruitProcessTaskService.getByTaskId(postNodeId.getTaskId()).getPostCount() + : 0); + followVOList.add(newFollowVO); + return newFollowVO; + }); + + switch (status) { + case -1: + followVO.setPassResumeCount(records.size()); + break; + case 0: + followVO.setFirstInterviewCount(records.stream().filter(r -> "1".equals(r.getFirstReach())).count()); + break; + case 4: + followVO.setSecondInterviewCount(records.stream().filter(r -> "1".equals(r.getSecondReach())).count()); + break; + case 5: + followVO.setThirdInterviewCount(records.stream().filter(r -> "1".equals(r.getFinalReach())).count()); + break; + case 1: + followVO.setSalaryCount(records.stream().filter(r -> "1".equals(r.getFinalPass())).count()); + break; + case 6: + followVO.setOfferCount(records.stream().filter(r -> "1".equals(r.getAcceptOffer())).count()); + break; + case 2: + followVO.setEntryCount(records.stream().filter(r -> r.getActualJoinDate() != null).count()); + break; + } + } } } - - //根据搜索条件,从面试跟踪里查询所有符合条件的数据 - List resumeFollowRecordList=resumeFollowRecordService.listBySelect(req); - Map> mapResumeFollowRecord = resumeFollowRecordList.stream().collect(Collectors.groupingBy(ResumeFollowRecord::getPostId)); - if(!CollectionUtils.isEmpty(mapResumeFollowRecord)){ - for (Map.Entry> entry : mapResumeFollowRecord.entrySet()) { - //先去followVOList去找有没有对应的岗位 - Optional result = followVOList.stream() - .filter(followVO -> followVO.getPostId().equals(entry.getKey())) - .findFirst(); - List resumeFollowRecords = entry.getValue(); - //如果存在,则插入数据 - if(result.isPresent()){ - FollowVO followVO = result.get(); - //封装合格简历数 - followVO.setPassResumeCount(resumeFollowRecords.size()); - - //设置初试人数 - 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.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); - } - - //将更新完的数据放回去 - 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()); - followVO.setPassResumeCount(resumeFollowRecords.size()); - 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); - } - - } - } - - return AjaxResult.success(followVOList); } diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitInterviewController.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitInterviewController.java index 3e25daa..7f54492 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitInterviewController.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/controller/RecruitInterviewController.java @@ -213,7 +213,6 @@ public class RecruitInterviewController extends BaseController { return toAjax(resumeFollowRecordService.updateById(req)); } - @Log(title = "上传简历", businessType = BusinessType.UPDATE) @PreAuthorize("@ss.hasPermi('recruit:interview:add')") @PostMapping("/interview/uploadResume") @@ -229,7 +228,6 @@ public class RecruitInterviewController extends BaseController { return error("上传文件异常,请联系管理员"); } - @PreAuthorize("@ss.hasAnyPermi('recruit:interview:topping')") @PutMapping("/interview/editTopping") @ApiOperation(value = "修改《面试管理》简历跟进记录是否置顶") diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/dto/HomePageDTO.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/dto/HomePageDTO.java index bb1cece..8e0a9cd 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/dto/HomePageDTO.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/domain/dto/HomePageDTO.java @@ -19,4 +19,7 @@ public class HomePageDTO { @ApiModelProperty("hrId") private Long hrId; + @ApiModelProperty("hrName") + private String hrName; + } diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/mapper/ResumeFollowRecordMapper.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/mapper/ResumeFollowRecordMapper.java index 6250891..897b19e 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/mapper/ResumeFollowRecordMapper.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/mapper/ResumeFollowRecordMapper.java @@ -27,6 +27,8 @@ public interface ResumeFollowRecordMapper extends BaseMapper List getPostEntryList(@Param("postList") List postList, @Param("firstDay") LocalDate firstDay, @Param("lastDay")LocalDate lastDay); List listBySelect(@Param("req") FollowDTO req); + + List getBySelectMonth(@Param("hrName") String hrName, @Param("firstDay") LocalDate firstDay, @Param("lastDay") LocalDate lastDay, @Param("i") int i); } diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/ResumeFollowRecordService.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/ResumeFollowRecordService.java index 8c382e8..df05d18 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/ResumeFollowRecordService.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/ResumeFollowRecordService.java @@ -23,4 +23,7 @@ public interface ResumeFollowRecordService extends IService List getPostEntryList(List postList, LocalDate firstDay, LocalDate lastDay); List listBySelect(FollowDTO req); + + + List getBySelectMonth(String hrName, LocalDate firstDay, LocalDate lastDay, int i); } diff --git a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/impl/ResumeFollowRecordServiceImpl.java b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/impl/ResumeFollowRecordServiceImpl.java index 5790a3b..bddc304 100644 --- a/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/impl/ResumeFollowRecordServiceImpl.java +++ b/zeroerr_oa-recruit/src/main/java/cn/zeroerr/service/impl/ResumeFollowRecordServiceImpl.java @@ -48,6 +48,11 @@ public class ResumeFollowRecordServiceImpl extends ServiceImpl getBySelectMonth(String hrName, LocalDate firstDay, LocalDate lastDay, int i) { + return resumeFollowRecordMapper.getBySelectMonth(hrName,firstDay,lastDay,i); + } + } diff --git a/zeroerr_oa-recruit/src/main/resources/mapper/ResumeFollowRecordMapper.xml b/zeroerr_oa-recruit/src/main/resources/mapper/ResumeFollowRecordMapper.xml index 8331975..3a0030e 100644 --- a/zeroerr_oa-recruit/src/main/resources/mapper/ResumeFollowRecordMapper.xml +++ b/zeroerr_oa-recruit/src/main/resources/mapper/ResumeFollowRecordMapper.xml @@ -128,5 +128,54 @@ and dept_id = #{req.deptId} + +