From dea36a610d9cf40e9c14dad93b5a519d1fcd60e5 Mon Sep 17 00:00:00 2001 From: lw <532810027@qq.com> Date: Mon, 22 Jul 2024 14:32:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BB=BB=E5=8A=A1=E8=B7=9F?= =?UTF-8?q?=E8=B8=AA=E5=AF=BC=E8=A1=A8=E7=9A=84=E5=90=88=E8=AE=A1=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/RecruitFollowController.java | 47 ++++++++++++++++++- 1 file changed, 45 insertions(+), 2 deletions(-) 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 00346b7..adf55d3 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 @@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiOperation; +import io.swagger.models.auth.In; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; @@ -463,9 +464,27 @@ public class RecruitFollowController extends BaseController { filteredFollowVOList.add(followVO); } ); + //需求人数总数 + Integer postCountTotal=0; + //主动打招呼总数 + Integer lookResumeCountTotal=0; + //合格简历总数 + Integer passResumeCountTotal=0; + //约面人数总数 + Integer inviteInterviewCountTotal=0; + //初试总数 + Long firstInterviewCountTotal=0L; + //终试总数 + Long thirdInterviewCountTotal=0L; + //终试通过人数总数 + Long salaryCountTotal=0L; + //接收offer人数总数 + Long offerCountTotal=0L; + //入职人数总数 + Long entryCountTotal=0L; // filteredFollowVOList,将所有字段(除了deptName)为null的字段设置为0 - filteredFollowVOList.forEach(followVO -> { + for (FollowVO followVO:filteredFollowVOList){ if (followVO.getPostId() == null) followVO.setPostId(0L); if (followVO.getPostName() == null) followVO.setPostName(""); if (followVO.getDeptId() == null) followVO.setDeptId(0L); @@ -504,10 +523,34 @@ public class RecruitFollowController extends BaseController { }else { followVO.setAchievementRate(0d); } + postCountTotal+=followVO.getPostCount(); + lookResumeCountTotal+=followVO.getLookResumeCount(); + passResumeCountTotal+=followVO.getPassResumeCount(); + inviteInterviewCountTotal+=followVO.getInviteInterviewCount(); + firstInterviewCountTotal+=followVO.getFirstInterviewCount(); + thirdInterviewCountTotal+=followVO.getThirdInterviewCount(); + salaryCountTotal+=followVO.getSalaryCount(); + offerCountTotal+= followVO.getOfferCount(); + entryCountTotal+=followVO.getEntryCount(); + + } - }); filteredFollowVOList.sort(Comparator.comparing(followVO -> Integer.parseInt(followVO.getGrade()))); + //在这里添加一个合计 + FollowVO followVOTotal = new FollowVO(); + followVOTotal.setDeptName("总计"); + followVOTotal.setPostCount(postCountTotal); + followVOTotal.setLookResumeCount(lookResumeCountTotal); + followVOTotal.setPassResumeCount(passResumeCountTotal); + followVOTotal.setInviteInterviewCount(inviteInterviewCountTotal); + followVOTotal.setFirstInterviewCount(firstInterviewCountTotal); + followVOTotal.setThirdInterviewCount(thirdInterviewCountTotal); + followVOTotal.setSalaryCount(salaryCountTotal); + followVOTotal.setOfferCount(offerCountTotal); + followVOTotal.setEntryCount(entryCountTotal); + filteredFollowVOList.add(followVOTotal); + ExcelUtil util = new ExcelUtil(FollowVO.class); util.exportExcel(response,filteredFollowVOList, "任务跟踪"); }