邀请面试业务逻辑完善
This commit is contained in:
@@ -28,13 +28,13 @@ public class HotakeMeetingCalendarDetail extends BaseEntity
|
||||
@Excel(name = "会议ID")
|
||||
private Long meetingId;
|
||||
|
||||
/** 参会人员ID */
|
||||
@ApiModelProperty("参会人员ID")
|
||||
@Excel(name = "参会人员ID")
|
||||
private Long userId;
|
||||
/** 候选人ID */
|
||||
@ApiModelProperty("候选人ID")
|
||||
@Excel(name = "候选人ID")
|
||||
private Long candidateId;
|
||||
|
||||
@ApiModelProperty("参会人员详细信息")
|
||||
private SysUser user;
|
||||
@ApiModelProperty("候选人详细信息")
|
||||
private SysUser candidateUser;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -25,10 +25,13 @@ public class HotakeMeetingCalendarInfo extends BaseEntity
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
/** 用户ID */
|
||||
@ApiModelProperty("用户ID")
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
/** 招聘人ID */
|
||||
@ApiModelProperty("招聘人ID")
|
||||
@Excel(name = "招聘人ID")
|
||||
private Long recruiterId;
|
||||
|
||||
@ApiModelProperty("岗位申请ID")
|
||||
private Long roleApplyId;
|
||||
|
||||
/** 公司名称 */
|
||||
@ApiModelProperty("公司名称")
|
||||
@@ -50,11 +53,18 @@ public class HotakeMeetingCalendarInfo extends BaseEntity
|
||||
@Excel(name = "会议时间")
|
||||
private String times;
|
||||
|
||||
/** 发送消息方式(逗号分隔) */
|
||||
@ApiModelProperty("发送消息方式(逗号分隔)")
|
||||
@Excel(name = "发送消息方式(逗号分隔)")
|
||||
private String messageVia;
|
||||
|
||||
/** 状态(0 取消,1 正常) */
|
||||
@ApiModelProperty("状态(0 取消,1 正常)")
|
||||
@Excel(name = "状态", readConverterExp = "0=,取=消,1,正=常")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("岗位基本信息")
|
||||
private HotakeRolesInfo rolesInfo;
|
||||
|
||||
@ApiModelProperty("参会人员")
|
||||
private List<HotakeMeetingCalendarDetail> calendarDetails;
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.vetti.hotake.domain.vo;
|
||||
|
||||
import com.vetti.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 面试邀请会议记录
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-12-14
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class HotakeMeetingCalendarInfoVo {
|
||||
|
||||
/** 候选人ID */
|
||||
@ApiModelProperty("候选人ID")
|
||||
@Excel(name = "候选人ID")
|
||||
private Long candidateId;
|
||||
|
||||
/** 会议日期 */
|
||||
@ApiModelProperty("会议日期(年月日)")
|
||||
@Excel(name = "会议日期")
|
||||
private String meetingDate;
|
||||
|
||||
/** 会议时间 */
|
||||
@ApiModelProperty("会议时间")
|
||||
@Excel(name = "会议时间")
|
||||
private String times;
|
||||
|
||||
/** 发送消息方式(逗号分隔) */
|
||||
@ApiModelProperty("发送消息方式(逗号分隔)")
|
||||
@Excel(name = "发送消息方式(逗号分隔)")
|
||||
private String messageVia;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.vetti.hotake.domain.vo;
|
||||
|
||||
import com.vetti.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 面试邀请会议
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-12-14
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class HotakeMeetingCalendarVo {
|
||||
|
||||
/** 招聘人ID */
|
||||
@ApiModelProperty("招聘人ID")
|
||||
@Excel(name = "招聘人ID")
|
||||
private Long recruiterId;
|
||||
|
||||
/** 岗位申请ID */
|
||||
@ApiModelProperty("岗位申请ID")
|
||||
@Excel(name = "岗位申请ID")
|
||||
private Long roleApplyId;
|
||||
|
||||
/** 面试邀请数据集合 */
|
||||
@ApiModelProperty("面试邀请数据集合")
|
||||
@Excel(name = "面试邀请数据集合")
|
||||
private List<HotakeMeetingCalendarInfoVo> calendarInfoVoList;
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.vetti.hotake.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.vetti.hotake.domain.HotakeMeetingCalendarInfo;
|
||||
import com.vetti.hotake.domain.vo.HotakeMeetingCalendarVo;
|
||||
|
||||
/**
|
||||
* 会议日历记录主Service接口
|
||||
@@ -67,4 +68,14 @@ public interface IHotakeMeetingCalendarInfoService
|
||||
*/
|
||||
public int batchInsertHotakeMeetingCalendarInfo(List<HotakeMeetingCalendarInfo> hotakeMeetingCalendarInfoList);
|
||||
|
||||
|
||||
/**
|
||||
* 保存会议日历记录
|
||||
*
|
||||
* @param calendarVo 面试邀请信息
|
||||
* @return 结果
|
||||
*/
|
||||
public void saveHotakeMeetingCalendarInfo(HotakeMeetingCalendarVo calendarVo);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,16 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.vetti.common.core.domain.entity.SysUser;
|
||||
import com.vetti.common.core.service.BaseServiceImpl;
|
||||
import com.vetti.common.enums.FillTypeEnum;
|
||||
import com.vetti.common.enums.MeetingCalendarStatus;
|
||||
import com.vetti.common.enums.StageEnum;
|
||||
import com.vetti.hotake.domain.HotakeMeetingCalendarDetail;
|
||||
import com.vetti.hotake.domain.HotakeRolesApplyInfo;
|
||||
import com.vetti.hotake.domain.HotakeRolesInfo;
|
||||
import com.vetti.hotake.domain.vo.HotakeMeetingCalendarInfoVo;
|
||||
import com.vetti.hotake.domain.vo.HotakeMeetingCalendarVo;
|
||||
import com.vetti.hotake.mapper.HotakeMeetingCalendarDetailMapper;
|
||||
import com.vetti.hotake.mapper.HotakeRolesApplyInfoMapper;
|
||||
import com.vetti.hotake.mapper.HotakeRolesInfoMapper;
|
||||
import com.vetti.hotake.service.IHotakeMeetingCalendarDetailService;
|
||||
import com.vetti.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -28,12 +37,26 @@ import com.vetti.hotake.service.IHotakeMeetingCalendarInfoService;
|
||||
@SuppressWarnings("all")
|
||||
@Service
|
||||
public class HotakeMeetingCalendarInfoServiceImpl extends BaseServiceImpl implements IHotakeMeetingCalendarInfoService {
|
||||
|
||||
private final String meetingName = "Interview Invitation";
|
||||
|
||||
|
||||
@Autowired
|
||||
private HotakeMeetingCalendarInfoMapper hotakeMeetingCalendarInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private HotakeMeetingCalendarDetailMapper hotakeMeetingCalendarDetailMapper;
|
||||
|
||||
@Autowired
|
||||
private IHotakeMeetingCalendarDetailService calendarDetailService;
|
||||
|
||||
@Autowired
|
||||
private HotakeRolesInfoMapper hotakeRolesInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private HotakeRolesApplyInfoMapper hotakeRolesApplyInfoMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@@ -47,21 +70,42 @@ public class HotakeMeetingCalendarInfoServiceImpl extends BaseServiceImpl implem
|
||||
@Override
|
||||
public HotakeMeetingCalendarInfo selectHotakeMeetingCalendarInfoById(Long id) {
|
||||
HotakeMeetingCalendarInfo calendarInfo = hotakeMeetingCalendarInfoMapper.selectHotakeMeetingCalendarInfoById(id);
|
||||
|
||||
//查询岗位数据
|
||||
HotakeRolesInfo query = new HotakeRolesInfo();
|
||||
List<HotakeRolesInfo> rolesInfoList = hotakeRolesInfoMapper.selectHotakeRolesInfoList(query);
|
||||
|
||||
//查询岗位数据
|
||||
HotakeRolesApplyInfo queryApply = new HotakeRolesApplyInfo();
|
||||
List<HotakeRolesApplyInfo> applyInfoList = hotakeRolesApplyInfoMapper.selectHotakeRolesApplyInfoList(queryApply);
|
||||
|
||||
//获取对应的参会人员数据
|
||||
HotakeMeetingCalendarDetail queryDetail = new HotakeMeetingCalendarDetail();
|
||||
List<HotakeMeetingCalendarDetail> detailList = calendarDetailService.selectHotakeMeetingCalendarDetailList(queryDetail);
|
||||
if (CollectionUtil.isNotEmpty(detailList)) {
|
||||
|
||||
Map<Long, List<HotakeMeetingCalendarDetail>> mapDetailList = detailList.stream().collect(Collectors.groupingBy(HotakeMeetingCalendarDetail::getMeetingId));
|
||||
SysUser queryUser = new SysUser();
|
||||
List<SysUser> userList = userService.selectUserList(queryUser);
|
||||
List<HotakeMeetingCalendarDetail> calendarDetails = mapDetailList.get(calendarInfo.getId());
|
||||
for (HotakeMeetingCalendarDetail detail : calendarDetails) {
|
||||
List<SysUser> users = userList.stream().filter(e -> e.getUserId() == detail.getUserId()).collect(Collectors.toList());
|
||||
List<SysUser> users = userList.stream().filter(e -> e.getUserId() == detail.getCandidateId()).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(users)) {
|
||||
detail.setUser(users.get(0));
|
||||
detail.setCandidateUser(users.get(0));
|
||||
}
|
||||
}
|
||||
calendarInfo.setCalendarDetails(calendarDetails);
|
||||
//返回岗位数据信息
|
||||
//返回岗位数据信息
|
||||
List<HotakeRolesApplyInfo> applyInfos = applyInfoList.stream().filter(e->e.getId().longValue() == calendarInfo.getRoleApplyId().longValue()).toList();
|
||||
if(CollectionUtil.isNotEmpty(applyInfos)) {
|
||||
HotakeRolesApplyInfo applyInfo = applyInfos.get(0);
|
||||
List<HotakeRolesInfo> rolesInfos = rolesInfoList.stream().filter(e->e.getId().longValue() == applyInfo.getRoleId().longValue()).toList();
|
||||
if(CollectionUtil.isNotEmpty(rolesInfos)) {
|
||||
HotakeRolesInfo rolesInfo = rolesInfos.get(0);
|
||||
calendarInfo.setRolesInfo(rolesInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
return calendarInfo;
|
||||
}
|
||||
@@ -77,6 +121,13 @@ public class HotakeMeetingCalendarInfoServiceImpl extends BaseServiceImpl implem
|
||||
public List<HotakeMeetingCalendarInfo> selectHotakeMeetingCalendarInfoList(HotakeMeetingCalendarInfo hotakeMeetingCalendarInfo) {
|
||||
List<HotakeMeetingCalendarInfo> calendarInfos = hotakeMeetingCalendarInfoMapper.selectHotakeMeetingCalendarInfoList(hotakeMeetingCalendarInfo);
|
||||
if (CollectionUtil.isNotEmpty(calendarInfos)) {
|
||||
//查询岗位数据
|
||||
HotakeRolesInfo query = new HotakeRolesInfo();
|
||||
List<HotakeRolesInfo> rolesInfoList = hotakeRolesInfoMapper.selectHotakeRolesInfoList(query);
|
||||
|
||||
//查询岗位数据
|
||||
HotakeRolesApplyInfo queryApply = new HotakeRolesApplyInfo();
|
||||
List<HotakeRolesApplyInfo> applyInfoList = hotakeRolesApplyInfoMapper.selectHotakeRolesApplyInfoList(queryApply);
|
||||
//获取对应的参会人员数据
|
||||
HotakeMeetingCalendarDetail queryDetail = new HotakeMeetingCalendarDetail();
|
||||
List<HotakeMeetingCalendarDetail> detailList = calendarDetailService.selectHotakeMeetingCalendarDetailList(queryDetail);
|
||||
@@ -87,12 +138,22 @@ public class HotakeMeetingCalendarInfoServiceImpl extends BaseServiceImpl implem
|
||||
for (HotakeMeetingCalendarInfo calendarInfo : calendarInfos) {
|
||||
List<HotakeMeetingCalendarDetail> calendarDetails = mapDetailList.get(calendarInfo.getId());
|
||||
for (HotakeMeetingCalendarDetail detail : calendarDetails) {
|
||||
List<SysUser> users = userList.stream().filter(e -> e.getUserId() == detail.getUserId()).collect(Collectors.toList());
|
||||
List<SysUser> users = userList.stream().filter(e -> e.getUserId() == detail.getCandidateId()).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(users)) {
|
||||
detail.setUser(users.get(0));
|
||||
detail.setCandidateUser(users.get(0));
|
||||
}
|
||||
}
|
||||
calendarInfo.setCalendarDetails(calendarDetails);
|
||||
//返回岗位数据信息
|
||||
List<HotakeRolesApplyInfo> applyInfos = applyInfoList.stream().filter(e->e.getId().longValue() == calendarInfo.getRoleApplyId().longValue()).toList();
|
||||
if(CollectionUtil.isNotEmpty(applyInfos)) {
|
||||
HotakeRolesApplyInfo applyInfo = applyInfos.get(0);
|
||||
List<HotakeRolesInfo> rolesInfos = rolesInfoList.stream().filter(e->e.getId().longValue() == applyInfo.getRoleId().longValue()).toList();
|
||||
if(CollectionUtil.isNotEmpty(rolesInfos)) {
|
||||
HotakeRolesInfo rolesInfo = rolesInfos.get(0);
|
||||
calendarInfo.setRolesInfo(rolesInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,7 +171,6 @@ public class HotakeMeetingCalendarInfoServiceImpl extends BaseServiceImpl implem
|
||||
public HotakeMeetingCalendarInfo insertHotakeMeetingCalendarInfo(HotakeMeetingCalendarInfo hotakeMeetingCalendarInfo) {
|
||||
fill(FillTypeEnum.INSERT.getCode(), hotakeMeetingCalendarInfo);
|
||||
hotakeMeetingCalendarInfoMapper.insertHotakeMeetingCalendarInfo(hotakeMeetingCalendarInfo);
|
||||
|
||||
//保存参会人员
|
||||
//1.1 先删除对应的参会人员
|
||||
calendarDetailService.deleteHotakeMeetingCalendarDetailByInfoId(hotakeMeetingCalendarInfo.getId());
|
||||
@@ -182,4 +242,41 @@ public class HotakeMeetingCalendarInfoServiceImpl extends BaseServiceImpl implem
|
||||
public int batchInsertHotakeMeetingCalendarInfo(List<HotakeMeetingCalendarInfo> hotakeMeetingCalendarInfoList) {
|
||||
return hotakeMeetingCalendarInfoMapper.batchInsertHotakeMeetingCalendarInfo(hotakeMeetingCalendarInfoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存会议日历记录
|
||||
* @param calendarVo 面试邀请信息
|
||||
*/
|
||||
@Override
|
||||
public void saveHotakeMeetingCalendarInfo(HotakeMeetingCalendarVo calendarVo) {
|
||||
//保存面试邀请数据
|
||||
if(CollectionUtil.isNotEmpty(calendarVo.getCalendarInfoVoList())){
|
||||
for(HotakeMeetingCalendarInfoVo calendarInfoVo : calendarVo.getCalendarInfoVoList()){
|
||||
HotakeMeetingCalendarInfo calendarInfo = new HotakeMeetingCalendarInfo();
|
||||
calendarInfo.setRoleApplyId(calendarVo.getRoleApplyId());
|
||||
calendarInfo.setRecruiterId(calendarVo.getRecruiterId());
|
||||
calendarInfo.setMeetingDate(calendarInfoVo.getMeetingDate());
|
||||
calendarInfo.setTimes(calendarInfoVo.getTimes());
|
||||
calendarInfo.setMessageVia(calendarInfoVo.getMessageVia());
|
||||
calendarInfo.setStatus(MeetingCalendarStatus.NORMAL.getCode());
|
||||
calendarInfo.setMeetingName(meetingName);
|
||||
//保存主表数据
|
||||
fill(FillTypeEnum.INSERT.getCode(), calendarInfo);
|
||||
insertHotakeMeetingCalendarInfo(calendarInfo);
|
||||
//保存明细数据
|
||||
HotakeMeetingCalendarDetail hotakeMeetingCalendarDetail = new HotakeMeetingCalendarDetail();
|
||||
hotakeMeetingCalendarDetail.setMeetingId(calendarInfo.getId());
|
||||
hotakeMeetingCalendarDetail.setCandidateId(calendarInfoVo.getCandidateId());
|
||||
fill(FillTypeEnum.INSERT.getCode(), hotakeMeetingCalendarDetail);
|
||||
hotakeMeetingCalendarDetailMapper.insertHotakeMeetingCalendarDetail(hotakeMeetingCalendarDetail);
|
||||
|
||||
//更新申请岗位状态
|
||||
HotakeRolesApplyInfo applyInfo = new HotakeRolesApplyInfo();
|
||||
applyInfo.setId(calendarVo.getRoleApplyId());
|
||||
applyInfo.setStage(StageEnum.INTERVIEW.getCode());
|
||||
hotakeRolesApplyInfoMapper.updateHotakeRolesApplyInfo(applyInfo);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,11 @@ public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements
|
||||
applyInfo.setRolesInfo(rolesInfo);
|
||||
}
|
||||
}
|
||||
if(StrUtil.isNotEmpty(applyInfo.getCvTemplateJson())){
|
||||
HotakeCvInfoDto cvInfoDto = handleAnalysisCvInfo(applyInfo.getCvTemplateJson());
|
||||
applyInfo.setCvInfoDto(cvInfoDto);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return applyInfoList;
|
||||
|
||||
Reference in New Issue
Block a user