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, "任务跟踪"); }