优化逻辑完善,接口补充

This commit is contained in:
2026-01-24 21:56:48 +08:00
parent 5a7c1035a1
commit c97329d3a1
7 changed files with 64 additions and 4 deletions

View File

@@ -136,6 +136,12 @@ public class HotakeRolesApplyInfo extends BaseEntity
@ApiModelProperty("候选人匹配度最终得分")
private BigDecimal candidateCompatibilityScore;
@ApiModelProperty("AI面试分析JSON 数据")
private String aiInterviewAnalysisJson;
@ApiModelProperty("AI面试问答数据记录JSON")
private String aiInterviewAnalysisQaJson;
@ApiModelProperty("岗位信息")
private HotakeRolesInfo rolesInfo;

View File

@@ -1,6 +1,8 @@
package com.vetti.hotake.domain;
import java.math.BigDecimal;
import java.util.List;
import lombok.Data;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModelProperty;
@@ -175,5 +177,8 @@ public class HotakeRolesInfo extends BaseEntity
@ApiModelProperty("当前岗位状态(pause:暂停,archived:关闭/归档,open:发布,editing:编辑中)")
private String status;
@ApiModelProperty("岗位申请数据集合")
private List<HotakeRolesApplyInfo> rolesApplyInfoList;
}

View File

@@ -1138,8 +1138,13 @@ public class HotakeAiCommonToolsServiceImpl extends BaseServiceImpl implements I
throw new ServiceException("No rating");
}
}
//todo 把面试结果分析保存到记录表中
//把面试结果分析和问答Qa保存到记录表中
if(analysisVo.getRoleApplyId() != null){
HotakeRolesApplyInfo applyInfo = hotakeRolesApplyInfoMapper.selectHotakeRolesApplyInfoById(analysisVo.getRoleApplyId());
applyInfo.setAiInterviewAnalysisJson(JSONUtil.toJsonStr(analysisVo));
applyInfo.setAiInterviewAnalysisQaJson(JSONUtil.toJsonStr(analysisVo.getAiInterviewQuestionRecordVoList()));
hotakeRolesApplyInfoMapper.updateHotakeRolesApplyInfo(applyInfo);
}
return analysisDto;
}

View File

@@ -105,6 +105,7 @@ public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements
List<HotakeRolesApplyInfo> applyInfoList = hotakeRolesApplyInfoMapper.selectHotakeRolesApplyInfoList(hotakeRolesApplyInfo);
if(CollectionUtil.isNotEmpty(applyInfoList)) {
List<SysUser> sysUserList = userService.selectUserList(new SysUser());
List<HotakeInitScreQuestionsReplyRecordInfo> screQuestionsReplyRecordInfoList = initScreQuestionsReplyRecordInfoMapper.selectHotakeInitScreQuestionsReplyRecordInfoList(new HotakeInitScreQuestionsReplyRecordInfo());
@@ -149,6 +150,12 @@ public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements
}
applyInfo.setScreQuestionsReplyRecordInfoList(screQuestionsReplyRecordInfos);
}
if(applyInfo.getCandidateId() != null){
List<SysUser> userList = sysUserList.stream().filter(e->e.getUserId().longValue() == applyInfo.getCandidateId().longValue()).toList();
if(CollectionUtil.isNotEmpty(userList)) {
applyInfo.setCandidateUSer(userList.get(0));
}
}
}
}
return applyInfoList;

View File

@@ -16,10 +16,12 @@ import com.vetti.common.utils.SecurityUtils;
import com.vetti.common.utils.uuid.IdUtils;
import com.vetti.hotake.domain.HotakeAiInterviewQuestionsInfo;
import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo;
import com.vetti.hotake.domain.HotakeRolesApplyInfo;
import com.vetti.hotake.domain.HotakeRolesInfo;
import com.vetti.hotake.domain.dto.AiQuestionDto;
import com.vetti.hotake.domain.dto.HotakeRolesInfoDto;
import com.vetti.hotake.domain.dto.roleDto.*;
import com.vetti.hotake.mapper.HotakeRolesApplyInfoMapper;
import com.vetti.hotake.mapper.HotakeRolesInfoMapper;
import com.vetti.hotake.service.IHotakeAiInterviewQuestionsInfoService;
import com.vetti.hotake.service.IHotakeInitialScreeningQuestionsInfoService;
@@ -48,6 +50,9 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota
@Autowired
private SysUserMapper sysUserMapper;
@Autowired
private HotakeRolesApplyInfoMapper hotakeRolesApplyInfoMapper;
@Autowired
private IHotakeInitialScreeningQuestionsInfoService hotakeInitialScreeningQuestionsInfoService;
@@ -144,13 +149,30 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota
@Override
public List<HotakeRolesInfo> selectHotakeRolesInfoList(HotakeRolesInfo hotakeRolesInfo)
{
List<HotakeRolesInfo> rolesInfoList = hotakeRolesInfoMapper.selectHotakeRolesInfoList(hotakeRolesInfo);
//计算一个发布日期
if(CollectionUtil.isNotEmpty(rolesInfoList)){
List<HotakeRolesApplyInfo> applyInfoList = hotakeRolesApplyInfoMapper.selectHotakeRolesApplyInfoList(new HotakeRolesApplyInfo());
List<SysUser> sysUserList = sysUserMapper.selectUserList(new SysUser());
for (HotakeRolesInfo rolesInfo : rolesInfoList) {
String posted = DateUtils.getTimeAgo(rolesInfo.getCreateTime());
rolesInfo.setPosted(posted);
if(CollectionUtil.isNotEmpty(applyInfoList)){
List<HotakeRolesApplyInfo> applyInfos = applyInfoList.stream().filter(e->e.getRoleId().longValue() == rolesInfo.getId().longValue()).toList();
if(CollectionUtil.isNotEmpty(applyInfos)){
for (HotakeRolesApplyInfo applyInfo : applyInfos) {
if(applyInfo.getCandidateId() != null){
List<SysUser> userList = sysUserList.stream().filter(e->e.getUserId().longValue() == applyInfo.getCandidateId().longValue()).toList();
if(CollectionUtil.isNotEmpty(userList)) {
applyInfo.setCandidateUSer(userList.get(0));
}
}
}
rolesInfo.setRolesApplyInfoList(applyInfos);
}
}
}
}
return rolesInfoList;