Compare commits
No commits in common. "a4f344413592a1ee07843221f1b063b193f7b379" and "828000fe41f1228651f7ea2a1bcacb6f1f294cf8" have entirely different histories.
a4f3444135
...
828000fe41
|
@ -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 字符验证
|
||||
|
@ -58,9 +58,9 @@ spring:
|
|||
servlet:
|
||||
multipart:
|
||||
# 单个文件大小
|
||||
max-file-size: 20MB
|
||||
max-file-size: 10MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 40MB
|
||||
max-request-size: 20MB
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
|
@ -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:
|
||||
|
|
|
@ -16,11 +16,7 @@
|
|||
</description>
|
||||
|
||||
<dependencies>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba</groupId>-->
|
||||
<!-- <artifactId>easyexcel</artifactId>-->
|
||||
<!-- <version>2.2.6</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- Spring框架基本的核心工具 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
|
|
|
@ -35,11 +35,6 @@
|
|||
<artifactId>zeroerr_oa-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.zeroerr</groupId>
|
||||
<artifactId>zeroerr_oa-recruit</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -1,20 +1,8 @@
|
|||
package cn.zeroerr.quartz.task;
|
||||
|
||||
import cn.zeroerr.domain.entity.PostGrade;
|
||||
import cn.zeroerr.service.PostGradeService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import cn.zeroerr.common.utils.StringUtils;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 定时任务调度测试
|
||||
*
|
||||
|
@ -23,8 +11,6 @@ import java.util.stream.Collectors;
|
|||
@Component("ryTask")
|
||||
public class RyTask
|
||||
{
|
||||
@Autowired
|
||||
private PostGradeService postGradeService;
|
||||
public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i)
|
||||
{
|
||||
System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i));
|
||||
|
@ -39,45 +25,4 @@ public class RyTask
|
|||
{
|
||||
System.out.println("执行无参方法");
|
||||
}
|
||||
|
||||
public void handleGrade(){
|
||||
LocalDate now = LocalDate.now();
|
||||
|
||||
// 获取上个月的日期
|
||||
LocalDate lastMonth = now.minusMonths(1);
|
||||
|
||||
// 定义日期格式
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
|
||||
|
||||
// 格式化日期
|
||||
String lastMonthData = lastMonth.format(formatter);
|
||||
String currentMonthData = now.format(formatter);
|
||||
|
||||
//获取上个月的所有岗位评级
|
||||
List<PostGrade> lastList = postGradeService.list(
|
||||
new LambdaQueryWrapper<PostGrade>()
|
||||
.eq(PostGrade::getMonth, lastMonthData)
|
||||
);
|
||||
//获取这个月的所有岗位评级
|
||||
List<PostGrade> currentList = postGradeService.list(
|
||||
new LambdaQueryWrapper<PostGrade>()
|
||||
.eq(PostGrade::getMonth, currentMonthData)
|
||||
);
|
||||
List<PostGrade> postGradeList=new ArrayList<>();
|
||||
if (!CollectionUtils.isEmpty(lastList)) {
|
||||
// 获取这个月所有的postId
|
||||
List<Long> currentPostIds = currentList.stream()
|
||||
.map(PostGrade::getPostId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
for (PostGrade last : lastList) {
|
||||
if (!currentPostIds.contains(last.getPostId())) {
|
||||
last.setMonth(currentMonthData);
|
||||
postGradeList.add(last);
|
||||
}
|
||||
}
|
||||
}
|
||||
//将收集到需要添加的当月评级数据导入
|
||||
postGradeService.saveBatch(postGradeList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,11 +18,6 @@
|
|||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<version>3.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.zeroerr</groupId>
|
||||
<artifactId>zeroerr_oa-common</artifactId>
|
||||
|
|
|
@ -11,7 +11,6 @@ import cn.zeroerr.common.utils.poi.ExcelUtil;
|
|||
import cn.zeroerr.domain.dto.EntryManagerDTO;
|
||||
import cn.zeroerr.domain.entity.EntryManage;
|
||||
import cn.zeroerr.domain.entity.ResumeFollowRecord;
|
||||
import cn.zeroerr.domain.vo.EntryStatisticsVO;
|
||||
import cn.zeroerr.domain.vo.UserVO;
|
||||
import cn.zeroerr.service.EntryManageService;
|
||||
import cn.zeroerr.service.ResumeFollowRecordService;
|
||||
|
@ -28,15 +27,10 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.YearMonth;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collector;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/recruit/entryManage")
|
||||
|
@ -116,6 +110,19 @@ public class EntryManageController extends BaseController {
|
|||
@ApiOperation(value = "下载入职管理记录")
|
||||
@Log(title = "下载入职管理记录", businessType = BusinessType.EXPORT)
|
||||
public void export(HttpServletResponse response, EntryManagerDTO req) {
|
||||
// boolean isHr = false;
|
||||
// List<SysRole> sysRoles = iSysRoleService.rolesByUserId(getUserId());
|
||||
// if (!CollectionUtils.isEmpty(sysRoles)) {
|
||||
// for (SysRole sysRole : sysRoles) {
|
||||
// //如果角色是hr
|
||||
// if (sysRole.getRoleKey().equals("hr") || sysRole.getRoleKey().equals("hrleader")) {
|
||||
// isHr = true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (isHr) {
|
||||
// req.setHrId(getUserId());
|
||||
// }
|
||||
List<EntryManage> entryManageList = entryManageService.listBySelect(req);
|
||||
//将序号重新排列
|
||||
for (int i = 0; i < entryManageList.size(); i++) {
|
||||
|
@ -123,48 +130,7 @@ public class EntryManageController extends BaseController {
|
|||
entry.setEntryId((long) i);
|
||||
}
|
||||
ExcelUtil<EntryManage> util = new ExcelUtil<EntryManage>(EntryManage.class);
|
||||
util.exportExcel(response, entryManageList, "入职管理数据");
|
||||
util.exportExcel(response,entryManageList, "入职管理数据");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getStatistics/{year}")
|
||||
@PreAuthorize("@ss.hasAnyPermi('recruit:entry:statistics')")
|
||||
@ApiOperation(value = "查看入职管理统计")
|
||||
public AjaxResult getStatistics(@PathVariable("year") String year) {
|
||||
EntryStatisticsVO entryStatisticsVO = new EntryStatisticsVO();
|
||||
List<Integer> expectEntryCounts=new ArrayList<>();
|
||||
List<Integer> confirmEntryCounts=new ArrayList<>();
|
||||
List<Integer> refuseEntryCounts=new ArrayList<>();
|
||||
//找出所有该年份的入职信息,预计入职不为空的
|
||||
List<EntryManage> entryList = entryManageService.listByYear(year);
|
||||
//根据月份进行分组
|
||||
if (!CollectionUtils.isEmpty(entryList)) {
|
||||
Map<Integer, List<EntryManage>> listByMonth = entryList.stream().collect(Collectors.groupingBy(x -> x.getJoinDate().getMonthValue()));
|
||||
//从1月份开始,因为防止有月份没有数据导致错乱。
|
||||
for(int month =1 ;month<=12 ;month++){
|
||||
List<EntryManage> entryManageList = listByMonth.get(month);
|
||||
//如果该月份有数据
|
||||
if(!CollectionUtils.isEmpty(entryManageList)){
|
||||
//统计该月份的预计入职人数
|
||||
expectEntryCounts.add(entryManageList.size());
|
||||
//统计该月份实际入职人数
|
||||
confirmEntryCounts.add((int) entryManageList.stream().filter(x -> x.getIsEntry().equals("1")).count());
|
||||
//统计该月份拒绝入职人数
|
||||
refuseEntryCounts.add((int) entryManageList.stream().filter(x -> x.getIsEntry().equals("0")).count());
|
||||
}
|
||||
//如果该月份没有数据
|
||||
else {
|
||||
expectEntryCounts.add(null);
|
||||
confirmEntryCounts.add(null);
|
||||
refuseEntryCounts.add(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
entryStatisticsVO.setExpectEntryCounts(expectEntryCounts);
|
||||
entryStatisticsVO.setConfirmEntryCounts(confirmEntryCounts);
|
||||
entryStatisticsVO.setRefuseEntryCounts(refuseEntryCounts);
|
||||
return AjaxResult.success(entryStatisticsVO);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,43 +1,30 @@
|
|||
package cn.zeroerr.controller;
|
||||
|
||||
import cn.zeroerr.common.annotation.Anonymous;
|
||||
import cn.zeroerr.common.annotation.Log;
|
||||
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.enums.BusinessType;
|
||||
import cn.zeroerr.domain.dto.*;
|
||||
import cn.zeroerr.domain.dto.AnnouncementDTO;
|
||||
import cn.zeroerr.domain.dto.FollowDTO;
|
||||
import cn.zeroerr.domain.dto.HomePageDTO;
|
||||
import cn.zeroerr.domain.dto.PostDetailDTO;
|
||||
import cn.zeroerr.domain.entity.*;
|
||||
import cn.zeroerr.domain.vo.PostListVO;
|
||||
import cn.zeroerr.domain.vo.ResumeStatVO;
|
||||
import cn.zeroerr.service.*;
|
||||
import cn.zeroerr.system.service.RecruitStructureService;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.ExcelWriter;
|
||||
import com.alibaba.excel.write.metadata.WriteSheet;
|
||||
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
|
||||
import com.alibaba.excel.write.metadata.style.WriteFont;
|
||||
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.github.xiaoymin.knife4j.core.util.StrUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.net.URLEncoder;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
@ -419,7 +406,7 @@ public class HomePageController extends BaseController {
|
|||
if (resumeStatVO.getInvestInterviewCounts() != 0) {
|
||||
double percentage = (resumeStatVO.getActualArriveCounts().doubleValue() / resumeStatVO.getInvestInterviewCounts().doubleValue()) * 100;
|
||||
String formattedPercentage = String.format("%.2f%%", percentage);
|
||||
double percentageValueFromString = Double.parseDouble(formattedPercentage.substring(0, formattedPercentage.length() - 1));
|
||||
double percentageValueFromString = Double.parseDouble(formattedPercentage.substring(0, formattedPercentage.length() - 1)) ;
|
||||
resumeStatVO.setArrivePercent(percentageValueFromString);
|
||||
}
|
||||
} else {
|
||||
|
@ -429,9 +416,9 @@ public class HomePageController extends BaseController {
|
|||
//封装简历合格率
|
||||
Integer total = resumeStatVO.getFindResumeCounts() + resumeStatVO.getSelfCounts();
|
||||
if (resumeStatVO.getQualifiedCount() != null && total != 0) {
|
||||
double percentage = (resumeStatVO.getQualifiedCount().doubleValue() / total.doubleValue()) * 100;
|
||||
double percentage = ( resumeStatVO.getQualifiedCount().doubleValue() / total.doubleValue()) * 100;
|
||||
String formattedPercentage = String.format("%.2f%%", percentage);
|
||||
double percentageValueFromString = Double.parseDouble(formattedPercentage.substring(0, formattedPercentage.length() - 1));
|
||||
double percentageValueFromString = Double.parseDouble(formattedPercentage.substring(0, formattedPercentage.length() - 1)) ;
|
||||
resumeStatVO.setQualifiedPercent(percentageValueFromString);
|
||||
} else {
|
||||
resumeStatVO.setQualifiedPercent(0d);
|
||||
|
@ -439,9 +426,9 @@ public class HomePageController extends BaseController {
|
|||
//封装约面率
|
||||
if (resumeStatVO.getInvestInterviewCounts() != null && resumeStatVO.getQualifiedCount() != null) {
|
||||
if (resumeStatVO.getQualifiedCount() != 0) {
|
||||
double percentage = (resumeStatVO.getInvestInterviewCounts().doubleValue() / resumeStatVO.getQualifiedCount().doubleValue()) * 100;
|
||||
double percentage = ( resumeStatVO.getInvestInterviewCounts().doubleValue() / resumeStatVO.getQualifiedCount().doubleValue()) * 100;
|
||||
String formattedPercentage = String.format("%.2f%%", percentage);
|
||||
double percentageValueFromString = Double.parseDouble(formattedPercentage.substring(0, formattedPercentage.length() - 1));
|
||||
double percentageValueFromString = Double.parseDouble(formattedPercentage.substring(0, formattedPercentage.length() - 1)) ;
|
||||
resumeStatVO.setInvitePercent(percentageValueFromString);
|
||||
}
|
||||
} else {
|
||||
|
@ -530,7 +517,6 @@ public class HomePageController extends BaseController {
|
|||
if (interviewList != null) {
|
||||
Collections.sort(interviewList, Comparator.comparing(interview -> LocalTime.parse(interview.getInterviewTime(), formatter)));
|
||||
}
|
||||
|
||||
}
|
||||
return AjaxResult.success(announcementDTOList);
|
||||
}
|
||||
|
@ -640,10 +626,10 @@ public class HomePageController extends BaseController {
|
|||
announcementNode.setInterviewFirstResult("待定");
|
||||
}
|
||||
//如果初试有日期,但是未到面,则视为放弃
|
||||
|
||||
} else if (resumeFollowRecord.getFirstDate() != null && resumeFollowRecord.getFirstReach() != null) {
|
||||
if (resumeFollowRecord.getFirstReach().equals("0")) {
|
||||
announcementNode.setInterviewFirstResult("放弃");
|
||||
else if(resumeFollowRecord.getFirstDate()!=null ){
|
||||
if(resumeFollowRecord.getFirstReach().equals("0")|| resumeFollowRecord.getFirstReach().isEmpty()){
|
||||
announcementNode.setInterviewFirstResult("放弃");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (resumeFollowRecord.getFinalPass() != null) {
|
||||
|
@ -653,26 +639,13 @@ public class HomePageController extends BaseController {
|
|||
announcementNode.setInterviewFinalResult("淘汰");
|
||||
} else if (resumeFollowRecord.getFinalPass().equals("2")) {
|
||||
announcementNode.setInterviewFinalResult("待定");
|
||||
} else if (resumeFollowRecord.getFinalDate() != null) {
|
||||
if (resumeFollowRecord.getFinalReach().equals("0") || resumeFollowRecord.getFinalReach().isEmpty()) {
|
||||
}else if(resumeFollowRecord.getFinalDate()!=null ){
|
||||
if(resumeFollowRecord.getFinalReach().equals("0")|| resumeFollowRecord.getFinalReach().isEmpty()){
|
||||
announcementNode.setInterviewFinalResult("放弃");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (resumeFollowRecord.getIsAttend() != null) {
|
||||
if (resumeFollowRecord.getIsAttend().equals("1")) {
|
||||
announcementNode.setIsAttend("参与");
|
||||
} else if (resumeFollowRecord.getIsAttend().equals("0")) {
|
||||
announcementNode.setIsAttend("不参与");
|
||||
} else if (resumeFollowRecord.getIsAttend().equals("2")) {
|
||||
announcementNode.setIsAttend("待定");
|
||||
}
|
||||
}
|
||||
if (resumeFollowRecord.getManagerTime() != null) {
|
||||
announcementNode.setManagerTime(resumeFollowRecord.getManagerTime().toLocalTime().toString());
|
||||
}
|
||||
|
||||
if (tip.equals("first")) {
|
||||
//面试-时间
|
||||
announcementNode.setInterviewTime(getFormattedTime(resumeFollowRecord.getFirstDate()));
|
||||
|
@ -699,198 +672,4 @@ public class HomePageController extends BaseController {
|
|||
return dateTime.format(timeFormatter);
|
||||
}
|
||||
|
||||
private List<List<String>> head1() {
|
||||
List<List<String>> headTitles = Lists.newArrayList();
|
||||
headTitles.add(Lists.newArrayList("面试候选人", "日期"));
|
||||
headTitles.add(Lists.newArrayList("面试候选人", "时间"));
|
||||
headTitles.add(Lists.newArrayList("面试候选人", "姓名"));
|
||||
headTitles.add(Lists.newArrayList("面试候选人", "状态"));
|
||||
headTitles.add(Lists.newArrayList("面试候选人", "岗位"));
|
||||
headTitles.add(Lists.newArrayList("面试候选人", "招聘HR"));
|
||||
headTitles.add(Lists.newArrayList("面试候选人", "初试结果"));
|
||||
headTitles.add(Lists.newArrayList("面试候选人", "终试结果"));
|
||||
headTitles.add(Lists.newArrayList("面试候选人", "总经理预计面试时间"));
|
||||
return headTitles;
|
||||
}
|
||||
|
||||
|
||||
private List<List<String>> head2() {
|
||||
List<List<String>> headTitles = Lists.newArrayList();
|
||||
headTitles.add(Lists.newArrayList("预计入职候选人", "日期"));
|
||||
headTitles.add(Lists.newArrayList("预计入职候选人", "姓名"));
|
||||
headTitles.add(Lists.newArrayList("预计入职候选人", "部门"));
|
||||
headTitles.add(Lists.newArrayList("预计入职候选人", "岗位"));
|
||||
headTitles.add(Lists.newArrayList("预计入职候选人", "招聘HR"));
|
||||
return headTitles;
|
||||
}
|
||||
|
||||
private static HorizontalCellStyleStrategy setConfigure() {
|
||||
// 头的策略
|
||||
WriteCellStyle headWriteCellStyle = new WriteCellStyle();
|
||||
// 背景色
|
||||
headWriteCellStyle.setFillForegroundColor(IndexedColors.WHITE1.getIndex());
|
||||
WriteFont headWriteFont = new WriteFont();
|
||||
// 加粗/**/
|
||||
headWriteFont.setBold(true);
|
||||
headWriteFont.setFontHeightInPoints((short) 14); // 设置行高,不重要
|
||||
headWriteCellStyle.setWriteFont(headWriteFont);
|
||||
//headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.LEFT);
|
||||
headWriteCellStyle.setShrinkToFit(true);
|
||||
|
||||
// 内容的策略
|
||||
WriteCellStyle contentWriteCellStyle = new WriteCellStyle();
|
||||
// 字体策略
|
||||
WriteFont contentWriteFont = new WriteFont();
|
||||
// 字体大小
|
||||
// contentWriteFont.setFontHeightInPoints((short) 14);
|
||||
contentWriteCellStyle.setWriteFont(contentWriteFont);
|
||||
//边框
|
||||
//导出数据垂直居中
|
||||
contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
//导出数据水平居中
|
||||
contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
contentWriteCellStyle.setBorderLeft(BorderStyle.NONE);
|
||||
contentWriteCellStyle.setBorderTop(BorderStyle.NONE);
|
||||
contentWriteCellStyle.setBorderRight(BorderStyle.NONE);
|
||||
contentWriteCellStyle.setBorderBottom(BorderStyle.NONE);
|
||||
|
||||
//设置 自动换行
|
||||
contentWriteCellStyle.setWrapped(true);
|
||||
//设置
|
||||
// 这个策略是 头是头的样式 内容是内容的样式 其他的策略可以自己实现
|
||||
return new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle);
|
||||
}
|
||||
|
||||
@PostMapping("/export")
|
||||
@ApiOperation(value = "下载近日事项")
|
||||
@Log(title = "下载入职管理记录", businessType = BusinessType.EXPORT)
|
||||
public void export(HttpServletResponse response) throws IOException {
|
||||
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
String fileName = URLEncoder.encode("近日事项","UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
List<List<Object>> interviewData=new ArrayList<>();
|
||||
List<List<Object>> entryData=new ArrayList<>();
|
||||
handleData(interviewData,entryData);
|
||||
try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream())
|
||||
.registerWriteHandler(setConfigure())
|
||||
//.registerWriteHandler(new CustomCellWriteHandler())
|
||||
.build()) {
|
||||
//第一个sheet
|
||||
WriteSheet writeSheet = EasyExcel.writerSheet(0, "面试候选人").build();
|
||||
writeSheet.setHead(head1());
|
||||
excelWriter.write(interviewData, writeSheet);
|
||||
|
||||
//第二个sheet...
|
||||
WriteSheet writeSheet2 = EasyExcel.writerSheet(1, "预计入职候选人").build();
|
||||
writeSheet2.setHead(head2());
|
||||
excelWriter.write(entryData, writeSheet2);
|
||||
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void handleData(List<List<Object>> interviewData ,List<List<Object>> entryData){
|
||||
//封装公告内容
|
||||
List<AnnouncementDTO> announcementDTOList = new ArrayList<>();
|
||||
|
||||
// 获取从昨天开始的近七天的日期范围
|
||||
LocalDate yesterday = LocalDate.now().plusDays(-1);
|
||||
LocalDate plusDays = yesterday.plusDays(7);
|
||||
|
||||
// 获取近七天预计入职的人,并按时间分类
|
||||
Map<LocalDate, List<EntryManage>> groupByJoinDate = entryManageService.getListByWeek(yesterday, plusDays)
|
||||
.stream().collect(Collectors.groupingBy(EntryManage::getJoinDate));
|
||||
|
||||
// 获取近七天将要初试的人,并按时间分类
|
||||
List<ResumeFollowRecord> resumeFollowRecordList1 = resumeFollowRecordService.getFirstInterviewList(yesterday, plusDays);
|
||||
Map<LocalDate, List<ResumeFollowRecord>> collect1 = resumeFollowRecordList1.stream().collect(Collectors.groupingBy(record -> record.getFirstDate().toLocalDate()));
|
||||
|
||||
// 获取近七天将要终试的人,并按时间分类
|
||||
List<ResumeFollowRecord> resumeFollowRecordList2 = resumeFollowRecordService.getFinalInterviewList(yesterday, plusDays);
|
||||
Map<LocalDate, List<ResumeFollowRecord>> collect2 = resumeFollowRecordList2.stream().collect(Collectors.groupingBy(record -> record.getFinalDate().toLocalDate()));
|
||||
|
||||
// 获取近七天将要初试/终试的人,并按时间分类
|
||||
List<ResumeFollowRecord> resumeFollowRecordList3 = resumeFollowRecordService.getFirstAndFinalInterviewList(yesterday, plusDays);
|
||||
Map<LocalDate, List<ResumeFollowRecord>> collect3 = resumeFollowRecordList3.stream().collect(Collectors.groupingBy(record -> record.getFirstDate().toLocalDate()));
|
||||
|
||||
// 处理初试
|
||||
processAnnouncements(announcementDTOList, collect1, plusDays, "first");
|
||||
|
||||
// 处理终试
|
||||
processAnnouncements(announcementDTOList, collect2, plusDays, "final");
|
||||
|
||||
// 处理初/终试
|
||||
processAnnouncements(announcementDTOList, collect3, plusDays, "mix");
|
||||
|
||||
// 处理预计入职的公告
|
||||
processAnnouncements(announcementDTOList, groupByJoinDate, plusDays, "entry");
|
||||
|
||||
// 按日期排序
|
||||
announcementDTOList.sort(Comparator.comparing(AnnouncementDTO::getDate));
|
||||
//获取到每个List<AnnouncementDTO> announcementDTOList 里的 AnnouncementDTO 的private List<AnnouncementDTO.AnnouncementInterview> announcementInterviewList;,announcementInterviewList的interviewTime字段进行时间排序
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm");
|
||||
|
||||
List<AnnouncementDTO.AnnouncementInterview> list1 = new ArrayList<>();
|
||||
List<AnnouncementDTO.AnnouncementEntry> list2 = new ArrayList<>();
|
||||
for (AnnouncementDTO announcement : announcementDTOList) {
|
||||
List<AnnouncementDTO.AnnouncementInterview> interviewList = announcement.getAnnouncementInterviewList();
|
||||
List<AnnouncementDTO.AnnouncementEntry> entryList = announcement.getAnnouncementEntryList();
|
||||
if (interviewList != null) {
|
||||
Collections.sort(interviewList, Comparator.comparing(interview -> LocalTime.parse(interview.getInterviewTime(), formatter)));
|
||||
interviewList.forEach(
|
||||
x -> {
|
||||
x.setDate(announcement.getDate().toString());
|
||||
}
|
||||
);
|
||||
list1.addAll(interviewList);
|
||||
}
|
||||
if (entryList != null) {
|
||||
entryList.forEach(
|
||||
x -> {
|
||||
x.setDate(announcement.getDate().toString());
|
||||
}
|
||||
);
|
||||
list2.addAll(entryList);
|
||||
}
|
||||
}
|
||||
|
||||
if(!CollectionUtils.isEmpty(list1)){
|
||||
list1.forEach(
|
||||
x->{
|
||||
List<Object> element=new ArrayList<>();
|
||||
element.add(x.getDate());
|
||||
element.add(x.getInterviewTime());
|
||||
element.add(x.getInterviewName());
|
||||
element.add(x.getInterviewType());
|
||||
element.add(x.getInterviewPostName());
|
||||
element.add(x.getInterviewHrName());
|
||||
element.add(x.getInterviewFirstResult());
|
||||
element.add(x.getInterviewFinalResult());
|
||||
element.add(x.getManagerTime());
|
||||
interviewData.add(element);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if(!CollectionUtils.isEmpty(list2)){
|
||||
list2.forEach(
|
||||
x->{
|
||||
List<Object> element=new ArrayList<>();
|
||||
element.add(x.getDate());
|
||||
element.add(x.getEntryName());
|
||||
element.add(x.getEntryDept());
|
||||
element.add(x.getEntryPostName());
|
||||
element.add(x.getEntryHrName());
|
||||
entryData.add(element);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,14 +17,12 @@ 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.conditions.query.LambdaQueryWrapper;
|
||||
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;
|
||||
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;
|
||||
|
@ -67,9 +65,6 @@ public class RecruitFollowController extends BaseController {
|
|||
@Autowired
|
||||
private PostGradeService postGradeService;
|
||||
|
||||
@Autowired
|
||||
private EntryManageService entryManageService;
|
||||
|
||||
|
||||
// @PreAuthorize("@ss.hasPermi('recruit:follow:add')")
|
||||
// @Log(title = "新增招聘计划与统计", businessType = BusinessType.INSERT)
|
||||
|
@ -246,33 +241,6 @@ public class RecruitFollowController extends BaseController {
|
|||
filteredFollowVOList.add(followVO);
|
||||
}
|
||||
);
|
||||
//获取入职管理的(接受offer人数:是否确认入职)(入职人数:实际入职日期)
|
||||
List<EntryManage> entryManageList=entryManageService.getOfferCounts(startDate,endDate);
|
||||
if(!CollectionUtils.isEmpty(entryManageList)){
|
||||
//筛选出entryManageList里《接受offer人数》
|
||||
List<EntryManage> offerLists = entryManageList.stream()
|
||||
.filter(entry -> "1".equals(entry.getIsEntry()))
|
||||
.collect(Collectors.toList());
|
||||
//将这个offerList 根据岗位id进行分组
|
||||
Map<Long, List<EntryManage>> offerMap = offerLists.stream().collect(Collectors.groupingBy(EntryManage::getPostId));
|
||||
|
||||
//筛选出entryManageList里《入职人数》
|
||||
List<EntryManage> entryList = entryManageList.stream()
|
||||
.filter(entry -> entry.getActualJoinDate() != null)
|
||||
.collect(Collectors.toList());
|
||||
Map<Long, List<EntryManage>> entryMap = entryList.stream().collect(Collectors.groupingBy(EntryManage::getPostId));
|
||||
filteredFollowVOList.forEach(followVO -> {
|
||||
List<EntryManage> offer = offerMap.get(followVO.getPostId());
|
||||
List<EntryManage> entry = entryMap.get(followVO.getPostId());
|
||||
|
||||
if (offer != null) {
|
||||
followVO.setOfferCount(offer.size());
|
||||
}
|
||||
if(entry!=null){
|
||||
followVO.setEntryCount(entry.size());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// filteredFollowVOList,将所有字段(除了deptName)为null的字段设置为0
|
||||
filteredFollowVOList.forEach(followVO -> {
|
||||
|
@ -282,8 +250,7 @@ public class RecruitFollowController extends BaseController {
|
|||
if (followVO.getDeptName() == null) followVO.setDeptName(handleDeptName(followVO.getPostId()));
|
||||
if (followVO.getHrId() == null) followVO.setHrId(0L);
|
||||
if (followVO.getHrName() == null) followVO.setHrName("");
|
||||
//如果需求的岗位是空,则是突发生成的岗位,没有绑定jd的,所以默认为1
|
||||
if (followVO.getPostCount() == null||followVO.getPostCount()==0) followVO.setPostCount(1);
|
||||
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);
|
||||
|
@ -291,15 +258,8 @@ public class RecruitFollowController extends BaseController {
|
|||
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(0);
|
||||
if (followVO.getEntryCount() == null) followVO.setEntryCount(0);
|
||||
|
||||
//再根据岗位公海里绑定的hr进行重新覆盖写入;因为有可能某岗位被分配给其他人了。
|
||||
RecruitPost recruitPost = recruitPostService.getOne(new LambdaQueryWrapper<RecruitPost>().eq(RecruitPost::getNodeId, followVO.getPostId()));
|
||||
if(!ObjectUtils.isEmpty(recruitPost)){
|
||||
followVO.setHrId(recruitPost.getHrId());
|
||||
followVO.setHrName(recruitPost.getHrName());
|
||||
}
|
||||
if (followVO.getOfferCount() == null) followVO.setOfferCount(0L);
|
||||
if (followVO.getEntryCount() == null) followVO.setEntryCount(0L);
|
||||
|
||||
Optional<PostGrade> optionalPostGrade = postGradeList.stream()
|
||||
.filter(postGrade -> Objects.equals(postGrade.getPostId(), followVO.getPostId()))
|
||||
|
@ -336,6 +296,8 @@ public class RecruitFollowController extends BaseController {
|
|||
|
||||
private void handleFollowRecords(FollowDTO req, List<FollowVO> followVOList,LocalDate startDate,LocalDate endDate) {
|
||||
String hrName = req.getHrName();
|
||||
|
||||
|
||||
// 定义所有需要处理的状态及其对应的Map
|
||||
Map<Integer, Map<Long, List<ResumeFollowRecord>>> statusMaps = new HashMap<>();
|
||||
statusMaps.put(-1, resumeFollowRecordService.listBySelect(req).stream().collect(Collectors.groupingBy(ResumeFollowRecord::getPostId)));
|
||||
|
@ -343,8 +305,8 @@ public class RecruitFollowController extends BaseController {
|
|||
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)));
|
||||
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<Integer, Map<Long, List<ResumeFollowRecord>>> entry : statusMaps.entrySet()) {
|
||||
|
@ -387,12 +349,12 @@ public class RecruitFollowController extends BaseController {
|
|||
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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -492,55 +454,9 @@ public class RecruitFollowController extends BaseController {
|
|||
filteredFollowVOList.add(followVO);
|
||||
}
|
||||
);
|
||||
//获取入职管理的(接受offer人数:是否确认入职)(入职人数:实际入职日期)
|
||||
List<EntryManage> entryManageList=entryManageService.getOfferCounts(startDate,endDate);
|
||||
if(!CollectionUtils.isEmpty(entryManageList)){
|
||||
//筛选出entryManageList里《接受offer人数》
|
||||
List<EntryManage> offerLists = entryManageList.stream()
|
||||
.filter(entry -> "1".equals(entry.getIsEntry()))
|
||||
.collect(Collectors.toList());
|
||||
//将这个offerList 根据岗位id进行分组
|
||||
Map<Long, List<EntryManage>> offerMap = offerLists.stream().collect(Collectors.groupingBy(EntryManage::getPostId));
|
||||
|
||||
//筛选出entryManageList里《入职人数》
|
||||
List<EntryManage> entryList = entryManageList.stream()
|
||||
.filter(entry -> entry.getActualJoinDate() != null)
|
||||
.collect(Collectors.toList());
|
||||
Map<Long, List<EntryManage>> entryMap = entryList.stream().collect(Collectors.groupingBy(EntryManage::getPostId));
|
||||
filteredFollowVOList.forEach(followVO -> {
|
||||
List<EntryManage> offer = offerMap.get(followVO.getPostId());
|
||||
List<EntryManage> entry = entryMap.get(followVO.getPostId());
|
||||
|
||||
if (offer != null) {
|
||||
followVO.setOfferCount(offer.size());
|
||||
}
|
||||
if(entry!=null){
|
||||
followVO.setEntryCount(entry.size());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//需求人数总数
|
||||
Integer postCountTotal=0;
|
||||
//主动打招呼总数
|
||||
Integer lookResumeCountTotal=0;
|
||||
//合格简历总数
|
||||
Integer passResumeCountTotal=0;
|
||||
//约面人数总数
|
||||
Integer inviteInterviewCountTotal=0;
|
||||
//初试总数
|
||||
Long firstInterviewCountTotal=0L;
|
||||
//终试总数
|
||||
Long thirdInterviewCountTotal=0L;
|
||||
//终试通过人数总数
|
||||
Long salaryCountTotal=0L;
|
||||
//接收offer人数总数
|
||||
Integer offerCountTotal=0;
|
||||
//入职人数总数
|
||||
Integer entryCountTotal=0;
|
||||
|
||||
// filteredFollowVOList,将所有字段(除了deptName)为null的字段设置为0
|
||||
for (FollowVO followVO:filteredFollowVOList){
|
||||
filteredFollowVOList.forEach(followVO -> {
|
||||
if (followVO.getPostId() == null) followVO.setPostId(0L);
|
||||
if (followVO.getPostName() == null) followVO.setPostName("");
|
||||
if (followVO.getDeptId() == null) followVO.setDeptId(0L);
|
||||
|
@ -555,8 +471,8 @@ public class RecruitFollowController extends BaseController {
|
|||
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(0);
|
||||
if (followVO.getEntryCount() == null) followVO.setEntryCount(0);
|
||||
if (followVO.getOfferCount() == null) followVO.setOfferCount(0L);
|
||||
if (followVO.getEntryCount() == null) followVO.setEntryCount(0L);
|
||||
|
||||
Optional<PostGrade> optionalPostGrade = postGradeList.stream()
|
||||
.filter(postGrade -> Objects.equals(postGrade.getPostId(), followVO.getPostId()))
|
||||
|
@ -579,34 +495,10 @@ 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<FollowVO> util = new ExcelUtil<FollowVO>(FollowVO.class);
|
||||
util.exportExcel(response,filteredFollowVOList, "任务跟踪");
|
||||
}
|
||||
|
|
|
@ -39,7 +39,6 @@ import java.time.LocalDate;
|
|||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
|
@ -274,24 +273,16 @@ public class RecruitProcessController extends BaseController {
|
|||
if(req.getResult().equals(ProcessResult.approved.name())){
|
||||
RecruitProcessTask recruitProcessTask = recruitProcessTaskService.getByTaskId(req.getTaskId());
|
||||
//新增岗位,未绑定hr
|
||||
RecruitPost recruitPost = new RecruitPost();
|
||||
recruitPost.setNodeId(recruitProcessTask.getStructurePostId());
|
||||
recruitPost.setTaskId(req.getTaskId());
|
||||
recruitPost.setPostName(recruitProcessTask.getPostName());
|
||||
recruitPost.setDeptId(recruitProcessTask.getDeptId());
|
||||
recruitPost.setDeptName(recruitProcessTask.getDeptName());
|
||||
recruitPost.setIsAllocation(0);
|
||||
recruitPost.setCreateTime(LocalDate.now());
|
||||
// RecruitPost recruitPost = RecruitPost.builder()
|
||||
// .taskId(req.getTaskId())
|
||||
// .nodeId(recruitProcessTask.getStructurePostId())
|
||||
// .postName(recruitProcessTask.getPostName())
|
||||
// .deptId(recruitProcessTask.getDeptId())
|
||||
// .deptName(recruitProcessTask.getDeptName())
|
||||
// //默认未分配
|
||||
// .isAllocation(0)
|
||||
// .createTime(LocalDate.now())
|
||||
// .build();
|
||||
RecruitPost recruitPost = RecruitPost.builder()
|
||||
.taskId(req.getTaskId())
|
||||
.nodeId(recruitProcessTask.getStructurePostId())
|
||||
.postName(recruitProcessTask.getPostName())
|
||||
.deptId(recruitProcessTask.getDeptId())
|
||||
.deptName(recruitProcessTask.getDeptName())
|
||||
//默认未分配
|
||||
.isAllocation(0)
|
||||
.createTime(LocalDate.now())
|
||||
.build();
|
||||
recruitPostService.save(recruitPost);
|
||||
if(recruitProcessTask.getStructurePostId()!=null){
|
||||
//将该审批绑定的组织架构节点给更新成招聘中的状态
|
||||
|
@ -381,16 +372,6 @@ public class RecruitProcessController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('recruit:jd:list')")
|
||||
@GetMapping("/jd/list")
|
||||
@ApiOperation(value = "审批-《我已审批》分页/条件查询获取表单")
|
||||
public TableDataInfo jdList(RecruitProcessTask task) {
|
||||
startPage();
|
||||
List<RecruitProcessTask> taskList = recruitProcessTaskService.listAllPass(task);
|
||||
//把taskList的taskId变成字符串
|
||||
return getDataTable(taskList);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/pending/getHr")
|
||||
@ApiOperation(value = "审批-《待我审批》查询所有的hr")
|
||||
|
@ -416,17 +397,8 @@ public class RecruitProcessController extends BaseController {
|
|||
@ApiOperation(value = "岗位公海-分页/条件查询获取表单")
|
||||
public TableDataInfo postseaList(RecruitPost req) {
|
||||
startPage();
|
||||
//List<RecruitProcessTask> taskList = recruitProcessTaskService.listPostSea(task);
|
||||
List<RecruitPost> recruitPostList= recruitPostService.listPostSea(req);
|
||||
List<Long> nodeIds = recruitPostList.stream().map(RecruitPost::getNodeId).collect(Collectors.toList());
|
||||
List<RecruitStructure> recruitStructureList=recruitStructureService.getNodeList(nodeIds);
|
||||
Map<Long, List<RecruitStructure>> recruitStructureMap = recruitStructureList.stream().collect(Collectors.groupingBy(RecruitStructure::getNodeId));
|
||||
recruitPostList.forEach(
|
||||
recruitPost -> {
|
||||
if(recruitStructureMap.get(recruitPost.getNodeId()).size()>0){
|
||||
recruitPost.setPostType(recruitStructureMap.get(recruitPost.getNodeId()).get(0).getPostType());
|
||||
}
|
||||
}
|
||||
);
|
||||
//把taskList的taskId变成字符串
|
||||
return getDataTable(recruitPostList);
|
||||
}
|
||||
|
@ -440,25 +412,21 @@ public class RecruitProcessController extends BaseController {
|
|||
//查询该hr的信息
|
||||
SysUser sysUser = iSysUserService.selectUserById(req.getUserId());
|
||||
//更新岗位绑定该hr负责
|
||||
if(req.getTaskId()!=null){
|
||||
recruitProcessTaskService.updateBindHR(sysUser.getUserId(), sysUser.getNickName(), req.getTaskId());
|
||||
}
|
||||
recruitPostService.updateBindHR(sysUser.getUserId(), sysUser.getNickName(), req.getPostId());
|
||||
recruitProcessTaskService.updateBindHR(sysUser.getUserId(), sysUser.getNickName(), req.getTaskId());
|
||||
recruitPostService.updateBindHR(sysUser.getUserId(), sysUser.getNickName(), req.getTaskId());
|
||||
}else {
|
||||
if(req.getTaskId()!=null){
|
||||
recruitProcessTaskService.updateUnBindHR(req.getTaskId());
|
||||
}
|
||||
recruitPostService.updateUnBindHR(req.getPostId());
|
||||
recruitProcessTaskService.updateUnBindHR(req.getTaskId());
|
||||
recruitPostService.updateUnBindHR(req.getTaskId());
|
||||
}
|
||||
|
||||
return success("成功分配");
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('recruit:postsea:distribution')")
|
||||
@GetMapping("/mypost/getOne/{postId}")
|
||||
@GetMapping("/mypost/getOne/{taskId}")
|
||||
@ApiOperation(value = "岗位公海-获取某个岗位的hr分配数据")
|
||||
public AjaxResult getPostList(@PathVariable("postId")Long postId) {
|
||||
return AjaxResult.success(recruitPostService.getOne(new LambdaQueryWrapper<RecruitPost>().eq(RecruitPost::getPostId, postId)));
|
||||
public AjaxResult getPostList(@PathVariable("taskId")String taskId) {
|
||||
return AjaxResult.success(recruitPostService.getOne(new LambdaQueryWrapper<RecruitPost>().eq(RecruitPost::getTaskId, taskId)));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('recruit:mypost:list')")
|
||||
|
|
|
@ -7,8 +7,6 @@ import cn.zeroerr.common.core.domain.AjaxResult;
|
|||
import cn.zeroerr.common.core.domain.entity.RecruitStructure;
|
||||
import cn.zeroerr.common.enums.BusinessType;
|
||||
import cn.zeroerr.common.utils.StringUtils;
|
||||
import cn.zeroerr.domain.entity.RecruitPost;
|
||||
import cn.zeroerr.service.RecruitPostService;
|
||||
import cn.zeroerr.system.service.RecruitStructureService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
@ -26,11 +24,6 @@ import static cn.zeroerr.common.core.domain.AjaxResult.error;
|
|||
public class RecruitStructureController extends BaseController {
|
||||
@Autowired
|
||||
private RecruitStructureService recruitStructureService;
|
||||
|
||||
@Autowired
|
||||
private RecruitPostService recruitPostService;
|
||||
|
||||
|
||||
/**
|
||||
* 新增节点
|
||||
*/
|
||||
|
@ -39,20 +32,12 @@ public class RecruitStructureController extends BaseController {
|
|||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody RecruitStructure node)
|
||||
{
|
||||
|
||||
if (!recruitStructureService.checkNodeNameUnique(node))
|
||||
{
|
||||
return error("新增节点'" + node.getNodeName() + "'失败,节点名称已存在");
|
||||
}
|
||||
node.setCreateBy(getUsername());
|
||||
recruitStructureService.insertNode(node);
|
||||
node.setNodeId(node.getNodeId());
|
||||
RecruitStructure deptByNodeId = recruitStructureService.getDeptByNodeId(node.getNodeId());
|
||||
//如果是已招聘状态,则自动新增岗位在公海里等待被分配给具体的hr。
|
||||
if(node.getPostType().equals(2)){
|
||||
recruitPostService.newRecruitPost(node,deptByNodeId.getNodeId(),deptByNodeId.getNodeName());
|
||||
}
|
||||
return AjaxResult.success();
|
||||
return toAjax(recruitStructureService.insertNode(node));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ import lombok.Data;
|
|||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
@ -30,9 +29,6 @@ public class AnnouncementDTO {
|
|||
@Accessors(chain = true)
|
||||
@ApiModel
|
||||
public static class AnnouncementInterview {
|
||||
@ApiModelProperty(value = "面试-日期")
|
||||
private String date;
|
||||
|
||||
@ApiModelProperty(value = "面试-时间 HH:ss")
|
||||
private String interviewTime;
|
||||
|
||||
|
@ -54,21 +50,12 @@ public class AnnouncementDTO {
|
|||
@ApiModelProperty(value = "面试-终试")
|
||||
private String interviewFinalResult;
|
||||
|
||||
@ApiModelProperty(value = "面试-总经理预计面试时间")
|
||||
private String managerTime;
|
||||
|
||||
@ApiModelProperty(value = "总经理参与否")
|
||||
private String isAttend;
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel
|
||||
public static class AnnouncementEntry {
|
||||
@ApiModelProperty(value = "预计入职-日期")
|
||||
private String date;
|
||||
|
||||
@ApiModelProperty(value = "预计入职-姓名")
|
||||
private String entryName;
|
||||
|
||||
|
|
|
@ -139,25 +139,6 @@ public class EntryManage implements Serializable {
|
|||
@Excel(name = "档案", cellType = Excel.ColumnType.TEXT)
|
||||
private String dossier;
|
||||
|
||||
/**
|
||||
* 岗位等级
|
||||
*/
|
||||
@TableField(value = "rank")
|
||||
@Excel(name = "岗位等级",dictType = "recruit_post_rank")
|
||||
private String rank;
|
||||
|
||||
@TableField(value = "regular_date",updateStrategy = FieldStrategy.IGNORED)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "转正时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private LocalDate regularDate;
|
||||
|
||||
@TableField(value = "termination_date",updateStrategy = FieldStrategy.IGNORED)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "离职时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private LocalDate terminationDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -116,9 +116,6 @@ public class PostGrade implements Serializable {
|
|||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer postType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -18,6 +18,7 @@ import lombok.Data;
|
|||
*/
|
||||
@TableName(value ="recruit_post")
|
||||
@Data
|
||||
@Builder
|
||||
public class RecruitPost implements Serializable {
|
||||
/**
|
||||
*
|
||||
|
@ -85,9 +86,6 @@ public class RecruitPost implements Serializable {
|
|||
@TableField(value = "is_allocation")
|
||||
private Integer isAllocation;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer postType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -325,47 +325,6 @@ public class ResumeFollowRecord implements Serializable {
|
|||
@TableField(exist = false)
|
||||
private List<String> fail;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate startFirstDate;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate endFirstDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate startFinalDate;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate endFinalDate;
|
||||
|
||||
/**
|
||||
* 预计总经理参与时间
|
||||
*/
|
||||
@TableField(value = "manager_time",updateStrategy = FieldStrategy.IGNORED)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
@Excel(name = "预计总经理参与时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime managerTime;
|
||||
|
||||
|
||||
/**
|
||||
* 总经理是否参与
|
||||
*/
|
||||
@TableField(value = "is_attend")
|
||||
@Excel(name = "总经理是否参与", dictType = "recruit_interview_pass")
|
||||
private String isAttend;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -20,7 +20,5 @@ public class ApprovedResultVO {
|
|||
private String remark;
|
||||
@ApiModelProperty("hr的用户id;如果需要打回,则需要选择一个hr进行修改。")
|
||||
private Long userId;
|
||||
@ApiModelProperty("岗位公海的id,非真正的岗位id")
|
||||
private String postId;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
package cn.zeroerr.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel
|
||||
public class EntryStatisticsVO {
|
||||
@ApiModelProperty(value = "预计入职人数")
|
||||
List<Integer> expectEntryCounts;
|
||||
|
||||
@ApiModelProperty(value = "确认入职人数")
|
||||
List<Integer> confirmEntryCounts;
|
||||
|
||||
@ApiModelProperty(value = "拒绝入职人数")
|
||||
List<Integer> refuseEntryCounts;
|
||||
}
|
|
@ -91,11 +91,11 @@ public class FollowVO {
|
|||
|
||||
@ApiModelProperty(value = "offer人数")
|
||||
@Excel(name = "接受offer人数")
|
||||
private Integer offerCount;
|
||||
private Long offerCount;
|
||||
|
||||
@ApiModelProperty(value = "入职人数")
|
||||
@Excel(name = "入职人数")
|
||||
private Integer entryCount;
|
||||
private Long entryCount;
|
||||
|
||||
// @ApiModelProperty(value = "离职人数")
|
||||
// private Long leaveCount;
|
||||
|
|
|
@ -23,10 +23,6 @@ public interface EntryManageMapper extends BaseMapper<EntryManage> {
|
|||
List<EntryManage> getList(@Param("firstDay") LocalDate firstDay, @Param("lastDay") LocalDate lastDay);
|
||||
|
||||
List<EntryManage> getListByWeek(@Param("now") LocalDate now, @Param("plusDays") LocalDate plusDays);
|
||||
|
||||
List<EntryManage> listByYear(@Param("year") String year);
|
||||
|
||||
List<EntryManage> getOfferCounts(@Param("startDate")LocalDate startDate, @Param("endDate")LocalDate endDate);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,11 +18,11 @@ public interface RecruitPostMapper extends BaseMapper<RecruitPost> {
|
|||
|
||||
List<RecruitPost> listPostSea(@Param("req") RecruitPost req);
|
||||
|
||||
void updateBindHR(@Param("userId") Long userId, @Param("nickName") String nickName, @Param("postId") String postId);
|
||||
void updateBindHR(@Param("userId") Long userId, @Param("nickName") String nickName, @Param("taskId") String taskId);
|
||||
|
||||
List<RecruitPost> listMyPost(@Param("userId") Long userId);
|
||||
|
||||
void updateUnBindHR(@Param("postId") String postId);
|
||||
void updateUnBindHR(@Param("taskId") String taskId);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -44,8 +44,6 @@ public interface RecruitProcessTaskMapper extends BaseMapper<RecruitProcessTask>
|
|||
void updateReapply(@Param("taskId") String taskId);
|
||||
|
||||
void updateUnBindHR(@Param("taskId") String taskId);
|
||||
|
||||
List<RecruitProcessTask> listAllPass(RecruitProcessTask task);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,8 +20,4 @@ public interface EntryManageService extends IService<EntryManage> {
|
|||
List<EntryManage> getList(LocalDate firstDay, LocalDate lastDay);
|
||||
|
||||
List<EntryManage> getListByWeek(LocalDate now, LocalDate plusDays);
|
||||
|
||||
List<EntryManage> listByYear(String year);
|
||||
|
||||
List<EntryManage> getOfferCounts(LocalDate startDate, LocalDate endDate);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package cn.zeroerr.service;
|
||||
|
||||
import cn.zeroerr.common.core.domain.entity.RecruitStructure;
|
||||
import cn.zeroerr.domain.entity.RecruitPost;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
@ -15,11 +14,9 @@ public interface RecruitPostService extends IService<RecruitPost> {
|
|||
|
||||
List<RecruitPost> listPostSea(RecruitPost req);
|
||||
|
||||
void updateBindHR(Long userId, String nickName, String postId);
|
||||
void updateBindHR(Long userId, String nickName, String taskId);
|
||||
|
||||
List<RecruitPost> listMyPost(Long userId);
|
||||
|
||||
void updateUnBindHR(String postId);
|
||||
|
||||
void newRecruitPost(RecruitStructure node,Long deptId,String deptName);
|
||||
void updateUnBindHR(String taskId);
|
||||
}
|
||||
|
|
|
@ -44,6 +44,4 @@ public interface RecruitProcessTaskService extends IService<RecruitProcessTask>
|
|||
void updateReapply(String taskId);
|
||||
|
||||
void updateUnBindHR(String taskId);
|
||||
|
||||
List<RecruitProcessTask> listAllPass(RecruitProcessTask task);
|
||||
}
|
||||
|
|
|
@ -33,16 +33,6 @@ public class EntryManageServiceImpl extends ServiceImpl<EntryManageMapper, Entry
|
|||
public List<EntryManage> getListByWeek(LocalDate now, LocalDate plusDays) {
|
||||
return this.baseMapper.getListByWeek(now,plusDays);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EntryManage> listByYear(String year) {
|
||||
return this.baseMapper.listByYear(year);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EntryManage> getOfferCounts(LocalDate startDate, LocalDate endDate) {
|
||||
return this.baseMapper.getOfferCounts(startDate,endDate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
package cn.zeroerr.service.impl;
|
||||
|
||||
import cn.zeroerr.common.core.domain.entity.RecruitStructure;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import cn.zeroerr.domain.entity.RecruitPost;
|
||||
import cn.zeroerr.service.RecruitPostService;
|
||||
import cn.zeroerr.mapper.RecruitPostMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -25,8 +23,8 @@ public class RecruitPostServiceImpl extends ServiceImpl<RecruitPostMapper, Recru
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateBindHR(Long userId, String nickName, String postId) {
|
||||
this.baseMapper.updateBindHR(userId,nickName,postId);
|
||||
public void updateBindHR(Long userId, String nickName, String taskId) {
|
||||
this.baseMapper.updateBindHR(userId,nickName,taskId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -35,30 +33,8 @@ public class RecruitPostServiceImpl extends ServiceImpl<RecruitPostMapper, Recru
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateUnBindHR(String postId) {
|
||||
this.baseMapper.updateUnBindHR(postId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void newRecruitPost(RecruitStructure node,Long deptId,String deptName) {
|
||||
RecruitPost recruitPost = new RecruitPost();
|
||||
recruitPost.setNodeId(node.getNodeId());
|
||||
recruitPost.setPostName(node.getNodeName());
|
||||
recruitPost.setDeptId(deptId);
|
||||
recruitPost.setDeptName(deptName);
|
||||
recruitPost.setIsAllocation(0);
|
||||
recruitPost.setCreateTime(LocalDate.now());
|
||||
// RecruitPost recruitPost = RecruitPost.builder()
|
||||
// .nodeId(node.getNodeId())
|
||||
// .postName(node.getNodeName())
|
||||
// .deptId(deptId)
|
||||
// .deptName(deptName)
|
||||
// //默认未分配
|
||||
// .isAllocation(0)
|
||||
// .createTime(LocalDate.now())
|
||||
// .build();
|
||||
|
||||
this.baseMapper.insert(recruitPost);
|
||||
public void updateUnBindHR(String taskId) {
|
||||
this.baseMapper.updateUnBindHR(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -146,11 +146,6 @@ public class RecruitProcessTaskServiceImpl extends ServiceImpl<RecruitProcessTas
|
|||
recruitProcessTaskMapper.updateUnBindHR(taskId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RecruitProcessTask> listAllPass(RecruitProcessTask task) {
|
||||
return recruitProcessTaskMapper.listAllPass(task);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理流程节点
|
||||
|
|
|
@ -18,11 +18,8 @@
|
|||
<result property="finalPassDate" column="final_pass_date" jdbcType="DATE"/>
|
||||
<result property="joinDate" column="join_date" jdbcType="DATE"/>
|
||||
<result property="actualJoinDate" column="actual_join_date" jdbcType="DATE"/>
|
||||
<result property="regularDate" column="regular_date" jdbcType="DATE"/>
|
||||
<result property="terminationDate" column="termination_date" jdbcType="DATE"/>
|
||||
<result property="entryFailReason" column="entry_fail_reason" />
|
||||
<result property="isEntry" column="is_entry" />
|
||||
<result property="rank" column="rank" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
|
@ -30,7 +27,7 @@
|
|||
post_id,post_name,
|
||||
user_name,hr_id,hr_name,
|
||||
final_pass_date,join_date,actual_join_date,
|
||||
entry_fail_reason,is_entry,file,dossier,rank,regular_date,termination_date
|
||||
entry_fail_reason,is_entry,file,dossier
|
||||
</sql>
|
||||
|
||||
<select id="listBySelect" resultMap="BaseResultMap">
|
||||
|
@ -67,26 +64,5 @@
|
|||
where join_date is not null
|
||||
<if test="now!=null"> and join_date <![CDATA[>=]]> #{now}</if>
|
||||
<if test="plusDays!=null"> and join_date <![CDATA[<=]]> #{plusDays}</if>
|
||||
and is_entry =1
|
||||
</select>
|
||||
|
||||
<select id="listByYear" parameterType="String" resultMap="BaseResultMap">
|
||||
SELECT *
|
||||
FROM entry_manage
|
||||
WHERE join_date BETWEEN
|
||||
CONCAT(#{year}, '-01-01') AND
|
||||
CONCAT(#{year}, '-12-31')
|
||||
AND join_date is not null
|
||||
</select>
|
||||
|
||||
<select id="getOfferCounts" resultMap="BaseResultMap">
|
||||
SELECT *
|
||||
FROM entry_manage
|
||||
WHERE
|
||||
join_date IS NOT NULL
|
||||
AND join_date BETWEEN #{startDate} AND #{endDate}
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
|
||||
<update id="updateBindHR">
|
||||
update recruit_post set hr_id=#{userId} ,hr_name=#{nickName} ,is_allocation=1 where post_id=#{postId}
|
||||
update recruit_post set hr_id=#{userId} ,hr_name=#{nickName} ,is_allocation=1 where task_id=#{taskId}
|
||||
</update>
|
||||
|
||||
<select id="listMyPost" resultMap="BaseResultMap">
|
||||
|
@ -46,6 +46,6 @@
|
|||
</select>
|
||||
|
||||
<update id="updateUnBindHR">
|
||||
update recruit_post set hr_id=null ,hr_name=null,is_allocation=0 where post_id=#{postId}
|
||||
update recruit_post set hr_id=null ,hr_name=null,is_allocation=0 where task_id=#{taskId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
@ -266,20 +266,4 @@
|
|||
update recruit_process_task set hr_id=null ,hr_name=null where task_id=#{taskId}
|
||||
</update>
|
||||
|
||||
<select id="listAllPass" resultMap="BaseResultMap">
|
||||
select * from recruit_process_task where status='approved'
|
||||
<if test="postName != null and postName != ''">
|
||||
and post_name like concat('%', #{postName}, '%')
|
||||
</if>
|
||||
<if test="applyDate != null">
|
||||
and apply_date = #{applyDate}
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
and dept_id = #{deptId}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
order by apply_date desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -44,8 +44,6 @@
|
|||
<result property="topping" column="topping" />
|
||||
<result property="toppingTime" column="topping_time" />
|
||||
<result property="file" column="file" />
|
||||
<result property="isAttend" column="is_attend"/>
|
||||
<result property="managerTime" column="manager_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
|
@ -60,7 +58,7 @@
|
|||
second_reach,second_interviewer_ids,second_pass,
|
||||
final_date,final_reach,final_interviewer_ids,
|
||||
final_pass,accept_offer,join_date,create_date,update_date,actual_join_date,
|
||||
fail_reason,special_reason,file,topping,topping_time,tags,is_attend,manager_time
|
||||
fail_reason,special_reason,file,topping,topping_time,tags
|
||||
</sql>
|
||||
|
||||
<select id="listByQuery" resultMap="BaseResultMap">
|
||||
|
@ -76,10 +74,6 @@
|
|||
<if test="req.secondPass!=null and req.secondPass!=''">and second_pass = #{req.secondPass}</if>
|
||||
<if test="req.finalPass!=null and req.finalPass!=''">and final_pass = #{req.finalPass}</if>
|
||||
<if test="req.isPass!=null and req.isPass!=''">and is_pass = #{req.isPass}</if>
|
||||
<if test="req.startFirstDate!=null">and first_date is not null and first_date <![CDATA[>=]]> #{req.startFirstDate}</if>
|
||||
<if test="req.endFirstDate!=null">and first_date is not null and first_date <![CDATA[<=]]> #{req.endFirstDate}</if>
|
||||
<if test="req.startFinalDate!=null">and final_date is not null and final_date <![CDATA[>=]]> #{req.startFinalDate}</if>
|
||||
<if test="req.endFinalDate!=null">and final_date is not null and final_date <![CDATA[<=]]> #{req.endFinalDate}</if>
|
||||
<if test="req.id!=null">and id = #{req.id}</if>
|
||||
order by
|
||||
case when topping = b'1' then 0 else 1 end,
|
||||
|
|
|
@ -17,7 +17,7 @@ public interface RecruitStructureMapper extends BaseMapper<RecruitStructure> {
|
|||
|
||||
RecruitStructure selectNodeById(@Param("parentId") Long parentId);
|
||||
|
||||
Long insertNode(RecruitStructure node);
|
||||
int insertNode(RecruitStructure node);
|
||||
|
||||
List<RecruitStructure> selectNodeList(RecruitStructure node);
|
||||
|
||||
|
@ -61,6 +61,4 @@ public interface RecruitStructureMapper extends BaseMapper<RecruitStructure> {
|
|||
List<Long> filterByPostIdList(@Param("uniquePostIdList") List<Long> uniquePostIdList);
|
||||
|
||||
String findTopLevelDepartmentNameByNodeId(Long postId);
|
||||
|
||||
List<RecruitStructure> getNodeList(@Param("nodeIds")List<Long> nodeIds);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||
public interface RecruitStructureService extends IService<RecruitStructure> {
|
||||
boolean checkNodeNameUnique(RecruitStructure node);
|
||||
|
||||
Long insertNode(RecruitStructure node);
|
||||
int insertNode(RecruitStructure node);
|
||||
|
||||
List<RecruitStructure> selectNodeList(RecruitStructure node);
|
||||
|
||||
|
@ -51,7 +51,4 @@ public interface RecruitStructureService extends IService<RecruitStructure> {
|
|||
List<Long> filterByPostIdList(List<Long> uniquePostIdList);
|
||||
|
||||
String findTopLevelDepartmentNameByNodeId(Long postId);
|
||||
|
||||
|
||||
List<RecruitStructure> getNodeList(List<Long> nodeIds);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public class RecruitStructureServiceImpl extends ServiceImpl<RecruitStructureMap
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public Long insertNode(RecruitStructure node) {
|
||||
public int insertNode(RecruitStructure node) {
|
||||
RecruitStructure info = this.baseMapper.selectNodeById(node.getParentId());
|
||||
// 如果父节点不为正常状态,则不允许新增子节点
|
||||
if (!UserConstants.DEPT_NORMAL.equals(info.getStatus()))
|
||||
|
@ -196,17 +196,6 @@ public class RecruitStructureServiceImpl extends ServiceImpl<RecruitStructureMap
|
|||
return recruitStructureMapper.findTopLevelDepartmentNameByNodeId(postId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RecruitStructure> getNodeList(List<Long> nodeIds) {
|
||||
return recruitStructureMapper.getNodeList(nodeIds);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<RecruitStructure> getByNodeIds(List<Long> nodeIds) {
|
||||
// return recruitStructureMapper.getByNodeIds(nodeIds);
|
||||
// }
|
||||
|
||||
|
||||
private List<TreeSelect> buildDeptTreeSelect(List<RecruitStructure> depts) {
|
||||
List<RecruitStructure> deptTrees = buildDeptTree(depts);
|
||||
return deptTrees.stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
where d.node_id = #{parentId}
|
||||
</select>
|
||||
|
||||
<insert id="insertNode" parameterType="cn.zeroerr.common.core.domain.entity.RecruitStructure" useGeneratedKeys="true" keyProperty="nodeId">
|
||||
<insert id="insertNode" parameterType="cn.zeroerr.common.core.domain.entity.RecruitStructure">
|
||||
insert into recruit_structure(
|
||||
<if test="nodeId != null and nodeId != 0">node_id,</if>
|
||||
<if test="type != null ">type,</if>
|
||||
|
@ -342,13 +342,4 @@
|
|||
ORDER BY node_id LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="getNodeList" resultMap="RecruitStructureResult">
|
||||
select * from recruit_structure
|
||||
where node_id in
|
||||
<foreach collection="nodeIds" item="nodeId" open="(" separator="," close=")">
|
||||
#{nodeId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue