业务逻辑修改以及完善

This commit is contained in:
2026-01-18 17:25:58 +08:00
parent f84f23df55
commit 7240cb74ad
13 changed files with 268 additions and 134 deletions

View File

@@ -1,6 +1,7 @@
package com.vetti.hotake.domain;
import java.math.BigDecimal;
import java.util.List;
import com.vetti.hotake.domain.dto.HotakeCvInfoDto;
import lombok.Data;
@@ -77,7 +78,7 @@ public class HotakeRolesApplyInfo extends BaseEntity
private String candidateStatus;
/** 当前阶段 */
@ApiModelProperty("当前阶段")
@ApiModelProperty("当前阶段(Applied:已申请,Shortlisted:入围,Interview:面试Offer邀约Hired受雇,refuseOffer:拒绝邀约InterviewFail面试失败)")
@Excel(name = "当前阶段")
private String stage;
@@ -122,4 +123,7 @@ public class HotakeRolesApplyInfo extends BaseEntity
@ApiModelProperty("解析的简历数据信息")
private HotakeCvInfoDto cvInfoDto;
@ApiModelProperty("岗位申请操作记录数据集合")
private List<HotakeRolesApplyOperRecord> applyOperRecords;
}

View File

@@ -1,16 +1,17 @@
package com.vetti.hotake.service.impl;
import java.util.List;
import com.fleet.common.core.service.BaseServiceImpl;
import com.fleet.common.utils.DateUtils;
import cn.hutool.core.util.StrUtil;
import com.vetti.common.core.service.BaseServiceImpl;
import com.vetti.common.enums.FillTypeEnum;
import com.vetti.common.enums.HotakeCompliancesStatusEnum;
import com.vetti.hotake.domain.HotakeComplianceInfo;
import com.vetti.hotake.mapper.HotakeComplianceInfoMapper;
import com.vetti.hotake.service.IHotakeComplianceInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.vetti.hotake.mapper.HotakeComplianceInfoMapper;
import com.vetti.hotake.domain.HotakeComplianceInfo;
import com.vetti.hotake.service.IHotakeComplianceInfoService;
import java.util.List;
/**
* 用户合规性信息Service业务层处理
@@ -61,7 +62,10 @@ public class HotakeComplianceInfoServiceImpl extends BaseServiceImpl implements
@Override
public int insertHotakeComplianceInfo(HotakeComplianceInfo hotakeComplianceInfo)
{
hotakeComplianceInfo.setCreateTime(DateUtils.getNowDate());
if(StrUtil.isEmpty(hotakeComplianceInfo.getStatus())){
hotakeComplianceInfo.setStatus(HotakeCompliancesStatusEnum.PENDING.getCode());
}
fill(FillTypeEnum.INSERT.getCode(), hotakeComplianceInfo);
return hotakeComplianceInfoMapper.insertHotakeComplianceInfo(hotakeComplianceInfo);
}
@@ -75,7 +79,7 @@ public class HotakeComplianceInfoServiceImpl extends BaseServiceImpl implements
@Override
public int updateHotakeComplianceInfo(HotakeComplianceInfo hotakeComplianceInfo)
{
hotakeComplianceInfo.setUpdateTime(DateUtils.getNowDate());
fill(FillTypeEnum.UPDATE.getCode(), hotakeComplianceInfo);
return hotakeComplianceInfoMapper.updateHotakeComplianceInfo(hotakeComplianceInfo);
}

View File

@@ -30,6 +30,7 @@ import com.vetti.hotake.mapper.HotakeCvInfoMapper;
import com.vetti.hotake.mapper.HotakeRolesApplyInfoMapper;
import com.vetti.hotake.mapper.HotakeRolesInfoMapper;
import com.vetti.hotake.service.IHotakeAiCommonToolsService;
import com.vetti.hotake.service.IHotakeRolesApplyOperRecordService;
import io.minio.GetObjectArgs;
import io.minio.MinioClient;
import lombok.extern.slf4j.Slf4j;
@@ -42,15 +43,14 @@ import com.vetti.hotake.service.IHotakeInitScreQuestionsReplyRecordInfoService;
/**
* 初步筛选问题回答记录信息Service业务层处理
*
*
* @author wangxiangshun
* @date 2025-12-14
*/
@Slf4j
@SuppressWarnings("all")
@Service
public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServiceImpl implements IHotakeInitScreQuestionsReplyRecordInfoService
{
public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServiceImpl implements IHotakeInitScreQuestionsReplyRecordInfoService {
@Autowired
private HotakeInitScreQuestionsReplyRecordInfoMapper hotakeInitScreQuestionsReplyRecordInfoMapper;
@@ -72,100 +72,99 @@ public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServi
@Autowired
private ChatGPTClient chatGPTClient;
@Autowired
private IHotakeRolesApplyOperRecordService rolesApplyOperRecordService;
/**
* 查询初步筛选问题回答记录信息
*
*
* @param id 初步筛选问题回答记录信息主键
* @return 初步筛选问题回答记录信息
*/
@Transactional(readOnly = true)
@Override
public HotakeInitScreQuestionsReplyRecordInfo selectHotakeInitScreQuestionsReplyRecordInfoById(Long id)
{
public HotakeInitScreQuestionsReplyRecordInfo selectHotakeInitScreQuestionsReplyRecordInfoById(Long id) {
return hotakeInitScreQuestionsReplyRecordInfoMapper.selectHotakeInitScreQuestionsReplyRecordInfoById(id);
}
/**
* 查询初步筛选问题回答记录信息列表
*
*
* @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息
* @return 初步筛选问题回答记录信息
*/
@Transactional(readOnly = true)
@Override
public List<HotakeInitScreQuestionsReplyRecordInfo> selectHotakeInitScreQuestionsReplyRecordInfoList(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo)
{
public List<HotakeInitScreQuestionsReplyRecordInfo> selectHotakeInitScreQuestionsReplyRecordInfoList(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo) {
return hotakeInitScreQuestionsReplyRecordInfoMapper.selectHotakeInitScreQuestionsReplyRecordInfoList(hotakeInitScreQuestionsReplyRecordInfo);
}
/**
* 新增初步筛选问题回答记录信息
*
*
* @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息
* @return 结果
*/
@Transactional(rollbackFor=Exception.class)
@Transactional(rollbackFor = Exception.class)
@Override
public int insertHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo)
{
public int insertHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo) {
hotakeInitScreQuestionsReplyRecordInfo.setCreateTime(DateUtils.getNowDate());
return hotakeInitScreQuestionsReplyRecordInfoMapper.insertHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfo);
}
/**
* 修改初步筛选问题回答记录信息
*
*
* @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息
* @return 结果
*/
@Transactional(rollbackFor=Exception.class)
@Transactional(rollbackFor = Exception.class)
@Override
public int updateHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo)
{
public int updateHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo) {
hotakeInitScreQuestionsReplyRecordInfo.setUpdateTime(DateUtils.getNowDate());
return hotakeInitScreQuestionsReplyRecordInfoMapper.updateHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfo);
}
/**
* 批量删除初步筛选问题回答记录信息
*
*
* @param ids 需要删除的初步筛选问题回答记录信息主键
* @return 结果
*/
@Transactional(rollbackFor=Exception.class)
@Transactional(rollbackFor = Exception.class)
@Override
public int deleteHotakeInitScreQuestionsReplyRecordInfoByIds(Long[] ids)
{
public int deleteHotakeInitScreQuestionsReplyRecordInfoByIds(Long[] ids) {
return hotakeInitScreQuestionsReplyRecordInfoMapper.deleteHotakeInitScreQuestionsReplyRecordInfoByIds(ids);
}
/**
* 删除初步筛选问题回答记录信息信息
*
*
* @param id 初步筛选问题回答记录信息主键
* @return 结果
*/
@Transactional(rollbackFor=Exception.class)
@Transactional(rollbackFor = Exception.class)
@Override
public int deleteHotakeInitScreQuestionsReplyRecordInfoById(Long id)
{
public int deleteHotakeInitScreQuestionsReplyRecordInfoById(Long id) {
return hotakeInitScreQuestionsReplyRecordInfoMapper.deleteHotakeInitScreQuestionsReplyRecordInfoById(id);
}
/**
* 批量新增初步筛选问题回答记录信息
*
* @param hotakeInitScreQuestionsReplyRecordInfoList 初步筛选问题回答记录信息列表
* @return 结果
*/
@Transactional(rollbackFor=Exception.class)
@Transactional(rollbackFor = Exception.class)
@Override
public int batchInsertHotakeInitScreQuestionsReplyRecordInfo(List<HotakeInitScreQuestionsReplyRecordInfo> hotakeInitScreQuestionsReplyRecordInfoList){
public int batchInsertHotakeInitScreQuestionsReplyRecordInfo(List<HotakeInitScreQuestionsReplyRecordInfo> hotakeInitScreQuestionsReplyRecordInfoList) {
return hotakeInitScreQuestionsReplyRecordInfoMapper.batchInsertHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfoList);
}
/**
* 初步筛选问题回答记录信息批量保存
*
* @param initScreQuestionsReplyRecordInfoList 初步筛选问题回答记录信息数据集合
* @return
*/
@@ -236,36 +235,46 @@ public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServi
// applyInfo.setExperience(cvInfoDto.getExperienceYear());
// scoreStr = resultMsg;
// }
//更新岗位申请数据记录--根据评分进行计算
//分数解析
//更新岗位申请数据记录--根据评分进行计算
//分数解析
// String[] strs = scoreStr.split("\n");
// if(strs != null && strs.length > 0){
// String score = strs[0].replaceAll("Score:","").trim();
// String[] scores = score.split("/");
// if(scores != null && scores.length > 0){
// applyInfo.setAiMatchScore(scores[0]);
try{
applyInfo.setAiMatchScorePercentage(new BigDecimal(eliminationScoreDto.getScore()).
divide(new BigDecimal(100)).setScale(2,4));
}catch (Exception e){e.printStackTrace();}
try {
applyInfo.setAiMatchScorePercentage(new BigDecimal(eliminationScoreDto.getScore()).
divide(new BigDecimal(100)).setScale(2, 4));
} catch (Exception e) {
e.printStackTrace();
}
// }
// }
if(applyInfo.getAiMatchScorePercentage() != null){
if(applyInfo.getAiMatchScorePercentage().compareTo(new BigDecimal(0.85)) >= 0){
applyInfo.setCandidateStatus(CandidateStatusEnum.HOT.getCode());
}else if(applyInfo.getAiMatchScorePercentage().compareTo(new BigDecimal(0.85)) < 0
&& applyInfo.getAiMatchScorePercentage().compareTo(new BigDecimal(0.6)) >= 0){
applyInfo.setCandidateStatus(CandidateStatusEnum.WARM.getCode());
}else if(applyInfo.getAiMatchScorePercentage().compareTo(new BigDecimal(0.6)) < 0
&& applyInfo.getAiMatchScorePercentage().compareTo(new BigDecimal(0.3)) >= 0){
applyInfo.setCandidateStatus(CandidateStatusEnum.COLD.getCode());
}else {
applyInfo.setCandidateStatus(CandidateStatusEnum.PENDING.getCode());
}
if (applyInfo.getAiMatchScorePercentage() != null) {
if (applyInfo.getAiMatchScorePercentage().compareTo(new BigDecimal(0.85)) >= 0) {
applyInfo.setCandidateStatus(CandidateStatusEnum.HOT.getCode());
} else if (applyInfo.getAiMatchScorePercentage().compareTo(new BigDecimal(0.85)) < 0
&& applyInfo.getAiMatchScorePercentage().compareTo(new BigDecimal(0.6)) >= 0) {
applyInfo.setCandidateStatus(CandidateStatusEnum.WARM.getCode());
} else if (applyInfo.getAiMatchScorePercentage().compareTo(new BigDecimal(0.6)) < 0
&& applyInfo.getAiMatchScorePercentage().compareTo(new BigDecimal(0.3)) >= 0) {
applyInfo.setCandidateStatus(CandidateStatusEnum.COLD.getCode());
} else {
applyInfo.setCandidateStatus(CandidateStatusEnum.PENDING.getCode());
}
applyInfo.setRecruiterId(rolesInf.getRecruiterId());
applyInfo.setStage(StageEnum.APPLIED.getCode());
hotakeRolesApplyInfoMapper.updateHotakeRolesApplyInfo(applyInfo);
}
applyInfo.setRecruiterId(rolesInf.getRecruiterId());
applyInfo.setStage(StageEnum.APPLIED.getCode());
hotakeRolesApplyInfoMapper.updateHotakeRolesApplyInfo(applyInfo);
//记录第一次申请记录
HotakeRolesApplyOperRecord hotakeRolesApplyOperRecord = new HotakeRolesApplyOperRecord();
hotakeRolesApplyOperRecord.setApplyStage(StageEnum.APPLIED.getCode());
hotakeRolesApplyOperRecord.setRoleApplyId(applyInfo.getId());
hotakeRolesApplyOperRecord.setRoleId(rolesInf.getId());
rolesApplyOperRecordService.insertHotakeRolesApplyOperRecord(hotakeRolesApplyOperRecord);
// } catch (Exception e) {
// e.printStackTrace();
// }
@@ -275,7 +284,6 @@ public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServi
}
/**
* 简历解析数据
*
@@ -285,84 +293,84 @@ public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServi
private HotakeCvInfoDto handleAnalysisCvInfo(String contents) {
log.info("开始简历解析");
try {
List<Map<String,String>> list = new LinkedList();
Map<String,String> entity = new HashMap<>();
entity.put("role","user");
entity.put("content","从下面提供的文本中提取所有能识别到的简历信息只提取原文中存在的内容不要补充、不推测、不总结。需要提取的字段包括name姓名或人名、phone电话号码、email电子邮件地址、experienceYear根据工作经验计算出来的工作年限、position岗位或者简历中自己期望的职位等、location地点或者地址、家庭住址、links所有链接地址、currentWork(当前工作公司)、about关于我/自我介绍、skills_tools关键资格许可证、注册/会员资格、认证、languages语言能力,主要就是Languages下面的语言、experience工作经历,除了title、company、location、durationStart、durationEnd,其他的都放到description里面,并且description里面要根据换行符分成不同的content),日期要拆分成开始时间(durationStart)和结束时间(durationEnd)、education教育经历,日期要拆分成开始时间(durationStart)和结束时间(durationEnd))。请将提取结果以结构化 JSON 格式返回,格式如下:{ \\\"name\\\": \\\"\\\", \\\"phone\\\": \\\"\\\", \\\"currentWork\\\": \\\"\\\", \\\"position\\\": \\\"\\\", \\\"location\\\": \\\"\\\", \\\"email\\\": \\\"\\\", \\\"experienceYear\\\": \\\"\\\", \\\"links\\\": [{\\\"content\\\":\\\"\\\"}], \\\"about\\\": \\\"\\\", \\\"skillsTools\\\": [{\\\"content\\\":\\\"\\\"}], \\\"languages\\\": [{\\\"content\\\":\\\"\\\"}], \\\"experience\\\": [{\\\"title\\\": \\\"\\\", \\\"company\\\": \\\"\\\",\\\"location\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\",\\\"description\\\": [{\\\"content\\\":\\\"\\\"}]}], \\\"education\\\": [{\\\"degree\\\": \\\"\\\",\\\"institution\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\"}] }。字段不存在则返回 null 或空数组。只返回标准可解析的 JSON结构 ,不要多余的```json等信息不要解释说明不要改写内容。以下为待处理文本"+contents);
List<Map<String, String>> list = new LinkedList();
Map<String, String> entity = new HashMap<>();
entity.put("role", "user");
entity.put("content", "从下面提供的文本中提取所有能识别到的简历信息只提取原文中存在的内容不要补充、不推测、不总结。需要提取的字段包括name姓名或人名、phone电话号码、email电子邮件地址、experienceYear根据工作经验计算出来的工作年限、position岗位或者简历中自己期望的职位等、location地点或者地址、家庭住址、links所有链接地址、currentWork(当前工作公司)、about关于我/自我介绍、skills_tools关键资格许可证、注册/会员资格、认证、languages语言能力,主要就是Languages下面的语言、experience工作经历,除了title、company、location、durationStart、durationEnd,其他的都放到description里面,并且description里面要根据换行符分成不同的content),日期要拆分成开始时间(durationStart)和结束时间(durationEnd)、education教育经历,日期要拆分成开始时间(durationStart)和结束时间(durationEnd))。请将提取结果以结构化 JSON 格式返回,格式如下:{ \\\"name\\\": \\\"\\\", \\\"phone\\\": \\\"\\\", \\\"currentWork\\\": \\\"\\\", \\\"position\\\": \\\"\\\", \\\"location\\\": \\\"\\\", \\\"email\\\": \\\"\\\", \\\"experienceYear\\\": \\\"\\\", \\\"links\\\": [{\\\"content\\\":\\\"\\\"}], \\\"about\\\": \\\"\\\", \\\"skillsTools\\\": [{\\\"content\\\":\\\"\\\"}], \\\"languages\\\": [{\\\"content\\\":\\\"\\\"}], \\\"experience\\\": [{\\\"title\\\": \\\"\\\", \\\"company\\\": \\\"\\\",\\\"location\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\",\\\"description\\\": [{\\\"content\\\":\\\"\\\"}]}], \\\"education\\\": [{\\\"degree\\\": \\\"\\\",\\\"institution\\\": \\\"\\\",\\\"durationStart\\\": \\\"\\\",\\\"durationEnd\\\": \\\"\\\"}] }。字段不存在则返回 null 或空数组。只返回标准可解析的 JSON结构 ,不要多余的```json等信息不要解释说明不要改写内容。以下为待处理文本" + contents);
//根据AI做
list.add(entity);
String resultCv = chatGPTClient.handleAiChat(JSONUtil.toJsonStr(list), "JX");
log.info("开始返回简历解析结果:{}", resultCv);
HotakeCvInfoDto cvInfoDto = JSONUtil.toBean(resultCv, HotakeCvInfoDto.class);
//数据添加默认值
if(cvInfoDto != null){
if(StrUtil.isEmpty(cvInfoDto.getName())){
if (cvInfoDto != null) {
if (StrUtil.isEmpty(cvInfoDto.getName())) {
cvInfoDto.setName("-");
}
if(StrUtil.isEmpty(cvInfoDto.getPhone())){
if (StrUtil.isEmpty(cvInfoDto.getPhone())) {
cvInfoDto.setPhone("-");
}
if(StrUtil.isEmpty(cvInfoDto.getEmail())){
if (StrUtil.isEmpty(cvInfoDto.getEmail())) {
cvInfoDto.setEmail("-");
}
if(StrUtil.isEmpty(cvInfoDto.getPosition())){
if (StrUtil.isEmpty(cvInfoDto.getPosition())) {
cvInfoDto.setPosition("-");
}
if(StrUtil.isEmpty(cvInfoDto.getLocation())){
if (StrUtil.isEmpty(cvInfoDto.getLocation())) {
cvInfoDto.setLocation("-");
}
if (StrUtil.isEmpty(cvInfoDto.getExperienceYear())){
if (StrUtil.isEmpty(cvInfoDto.getExperienceYear())) {
cvInfoDto.setExperienceYear("-");
}
if(StrUtil.isEmpty(cvInfoDto.getAbout())){
if (StrUtil.isEmpty(cvInfoDto.getAbout())) {
cvInfoDto.setAbout("-");
}
if (StrUtil.isEmpty(cvInfoDto.getCurrentWork())){
if (StrUtil.isEmpty(cvInfoDto.getCurrentWork())) {
cvInfoDto.setCurrentWork("-");
}
if(CollectionUtil.isNotEmpty(cvInfoDto.getSkillsTools())){
for (VcSkillsToolsDto toolsDto :cvInfoDto.getSkillsTools()) {
if(StrUtil.isEmpty(toolsDto.getContent())){
if (CollectionUtil.isNotEmpty(cvInfoDto.getSkillsTools())) {
for (VcSkillsToolsDto toolsDto : cvInfoDto.getSkillsTools()) {
if (StrUtil.isEmpty(toolsDto.getContent())) {
toolsDto.setContent("-");
}
}
}
if(CollectionUtil.isNotEmpty(cvInfoDto.getLinks())){
for (VcLinksDto linksDto :cvInfoDto.getLinks()) {
if(StrUtil.isEmpty(linksDto.getContent())){
if (CollectionUtil.isNotEmpty(cvInfoDto.getLinks())) {
for (VcLinksDto linksDto : cvInfoDto.getLinks()) {
if (StrUtil.isEmpty(linksDto.getContent())) {
linksDto.setContent("-");
}
}
}
if(CollectionUtil.isNotEmpty(cvInfoDto.getLanguages())){
for (VcLanguagesDto languagesDto :cvInfoDto.getLanguages()) {
if(StrUtil.isEmpty(languagesDto.getContent())){
if (CollectionUtil.isNotEmpty(cvInfoDto.getLanguages())) {
for (VcLanguagesDto languagesDto : cvInfoDto.getLanguages()) {
if (StrUtil.isEmpty(languagesDto.getContent())) {
languagesDto.setContent("-");
}
}
}
if(CollectionUtil.isNotEmpty(cvInfoDto.getExperience())){
for (VcExperienceDto experienceDto :cvInfoDto.getExperience()) {
if (StrUtil.isEmpty(experienceDto.getTitle())){
if (CollectionUtil.isNotEmpty(cvInfoDto.getExperience())) {
for (VcExperienceDto experienceDto : cvInfoDto.getExperience()) {
if (StrUtil.isEmpty(experienceDto.getTitle())) {
experienceDto.setTitle("-");
}
if(StrUtil.isEmpty(experienceDto.getCompany())){
if (StrUtil.isEmpty(experienceDto.getCompany())) {
experienceDto.setCompany("-");
}
if(StrUtil.isEmpty(experienceDto.getLocation())){
if (StrUtil.isEmpty(experienceDto.getLocation())) {
experienceDto.setLocation("-");
}
if(StrUtil.isEmpty(experienceDto.getDurationStart())){
if (StrUtil.isEmpty(experienceDto.getDurationStart())) {
experienceDto.setDurationStart("-");
}
if(StrUtil.isEmpty(experienceDto.getDurationEnd())){
if (StrUtil.isEmpty(experienceDto.getDurationEnd())) {
experienceDto.setDurationEnd("-");
}
if (CollectionUtil.isNotEmpty(experienceDto.getDescription())){
for(VcExperienceDescriptionDto descriptionDto :experienceDto.getDescription()){
if(StrUtil.isEmpty(descriptionDto.getContent())){
if (CollectionUtil.isNotEmpty(experienceDto.getDescription())) {
for (VcExperienceDescriptionDto descriptionDto : experienceDto.getDescription()) {
if (StrUtil.isEmpty(descriptionDto.getContent())) {
descriptionDto.setContent("-");
}
@@ -371,31 +379,31 @@ public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServi
}
}
if(CollectionUtil.isNotEmpty(cvInfoDto.getEducation())){
for (VcEducationDto educationDto :cvInfoDto.getEducation()) {
if (StrUtil.isEmpty(educationDto.getDegree())){
if (CollectionUtil.isNotEmpty(cvInfoDto.getEducation())) {
for (VcEducationDto educationDto : cvInfoDto.getEducation()) {
if (StrUtil.isEmpty(educationDto.getDegree())) {
educationDto.setDegree("-");
}
if(StrUtil.isEmpty(educationDto.getInstitution())){
if (StrUtil.isEmpty(educationDto.getInstitution())) {
educationDto.setInstitution("-");
}
if(StrUtil.isEmpty(educationDto.getDurationStart())){
if (StrUtil.isEmpty(educationDto.getDurationStart())) {
educationDto.setDurationStart("-");
}
if(StrUtil.isEmpty(educationDto.getDurationEnd())){
if (StrUtil.isEmpty(educationDto.getDurationEnd())) {
educationDto.setDurationEnd("-");
}
if(educationDto.getCertificate() != null){
if(StrUtil.isEmpty(educationDto.getCertificate().getFileName())){
if (educationDto.getCertificate() != null) {
if (StrUtil.isEmpty(educationDto.getCertificate().getFileName())) {
educationDto.getCertificate().setFileName("-");
}
if (StrUtil.isEmpty(educationDto.getCertificate().getFileSuffix())){
if (StrUtil.isEmpty(educationDto.getCertificate().getFileSuffix())) {
educationDto.getCertificate().setFileSuffix("-");
}
if (StrUtil.isEmpty(educationDto.getCertificate().getFileUrl())){
if (StrUtil.isEmpty(educationDto.getCertificate().getFileUrl())) {
educationDto.getCertificate().setFileUrl("-");
}
if (StrUtil.isEmpty(educationDto.getCertificate().getFileSizeShow())){
if (StrUtil.isEmpty(educationDto.getCertificate().getFileSizeShow())) {
educationDto.getCertificate().setFileSizeShow("-");
}
}

View File

@@ -1,29 +1,27 @@
package com.vetti.hotake.service.impl;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.vetti.common.core.service.BaseServiceImpl;
import com.vetti.common.enums.FillTypeEnum;
import com.vetti.common.utils.DateUtils;
import com.vetti.common.enums.StageEnum;
import com.vetti.common.utils.SecurityUtils;
import com.vetti.hotake.domain.HotakeRolesApplyInfo;
import com.vetti.hotake.domain.HotakeRolesApplyOperRecord;
import com.vetti.hotake.domain.HotakeRolesInfo;
import com.vetti.hotake.domain.dto.HotakeCvInfoDto;
import com.vetti.hotake.domain.dto.VcDto.*;
import com.vetti.hotake.mapper.HotakeRolesApplyInfoMapper;
import com.vetti.hotake.mapper.HotakeRolesInfoMapper;
import com.vetti.hotake.service.IHotakeRolesApplyInfoService;
import com.vetti.hotake.service.IHotakeRolesApplyOperRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.vetti.hotake.mapper.HotakeRolesApplyInfoMapper;
import com.vetti.hotake.domain.HotakeRolesApplyInfo;
import com.vetti.hotake.service.IHotakeRolesApplyInfoService;
import java.util.List;
/**
* 候选人岗位申请信息Service业务层处理
@@ -41,6 +39,9 @@ public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements
@Autowired
private HotakeRolesInfoMapper hotakeRolesInfoMapper;
@Autowired
private IHotakeRolesApplyOperRecordService rolesApplyOperRecordService;
/**
* 查询候选人岗位申请信息
*
@@ -66,6 +67,11 @@ public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements
applyInfo.setCvInfoDto(cvInfoDto);
}
HotakeRolesApplyOperRecord queryApplyOperRecord = new HotakeRolesApplyOperRecord();
queryApplyOperRecord.setRoleApplyId(id);
List<HotakeRolesApplyOperRecord> applyOperRecords = rolesApplyOperRecordService.selectHotakeRolesApplyOperRecordList(queryApplyOperRecord);
applyInfo.setApplyOperRecords(applyOperRecords);
return applyInfo;
}
@@ -86,6 +92,9 @@ public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements
// query.setRecruiterId(SecurityUtils.getUserId());
List<HotakeRolesInfo> rolesInfoList = hotakeRolesInfoMapper.selectHotakeRolesInfoList(query);
HotakeRolesApplyOperRecord queryApplyOperRecord = new HotakeRolesApplyOperRecord();
List<HotakeRolesApplyOperRecord> applyOperRecords = rolesApplyOperRecordService.selectHotakeRolesApplyOperRecordList(queryApplyOperRecord);
for(HotakeRolesApplyInfo applyInfo : applyInfoList) {
if(applyInfo.getRoleId() != null){
List<HotakeRolesInfo> rolesInfos = rolesInfoList.stream().filter(e->e.getId().longValue() == applyInfo.getRoleId().longValue()).toList();
@@ -97,6 +106,12 @@ public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements
HotakeCvInfoDto cvInfoDto = handleAnalysisCvInfo(applyInfo.getCvTemplateJson());
applyInfo.setCvInfoDto(cvInfoDto);
}
if(CollectionUtil.isNotEmpty(applyOperRecords)) {
List<HotakeRolesApplyOperRecord> operRecordList = applyOperRecords.stream().filter(e->e.getRoleApplyId().longValue() == applyInfo.getId().longValue()).toList();
if(CollectionUtil.isNotEmpty(operRecordList)) {
applyInfo.setApplyOperRecords(operRecordList);
}
}
}
}
return applyInfoList;
@@ -141,6 +156,19 @@ public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements
}
hotakeRolesApplyInfo.setCvFileSuffix(fileSuffix);
int resultNum = hotakeRolesApplyInfoMapper.updateHotakeRolesApplyInfo(hotakeRolesApplyInfo);
HotakeRolesApplyOperRecord query = new HotakeRolesApplyOperRecord();
query.setRoleApplyId(hotakeRolesApplyInfo.getId()).setApplyStage(hotakeRolesApplyInfo.getStage());
List<HotakeRolesApplyOperRecord> applyOperRecords = rolesApplyOperRecordService.selectHotakeRolesApplyOperRecordList(query);
if(CollectionUtil.isEmpty(applyOperRecords)) {
StageEnum stageEnum = StageEnum.getByInfo(hotakeRolesApplyInfo.getStage());
if(stageEnum != null){
HotakeRolesApplyOperRecord hotakeRolesApplyOperRecord = new HotakeRolesApplyOperRecord();
hotakeRolesApplyOperRecord.setApplyStage(hotakeRolesApplyInfo.getStage());
hotakeRolesApplyOperRecord.setRoleApplyId(hotakeRolesApplyInfo.getId());
hotakeRolesApplyOperRecord.setRoleId(hotakeRolesApplyInfo.getRoleId());
rolesApplyOperRecordService.insertHotakeRolesApplyOperRecord(hotakeRolesApplyOperRecord);
}
}
return hotakeRolesApplyInfo;
}
@@ -262,7 +290,6 @@ public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements
if(StrUtil.isEmpty(descriptionDto.getContent())){
descriptionDto.setContent("-");
}
}
}
}

View File

@@ -3,6 +3,7 @@ package com.vetti.hotake.service.impl;
import java.util.List;
import com.vetti.common.core.service.BaseServiceImpl;
import com.vetti.common.enums.FillTypeEnum;
import com.vetti.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -61,7 +62,7 @@ public class HotakeRolesApplyOperRecordServiceImpl extends BaseServiceImpl imple
@Override
public int insertHotakeRolesApplyOperRecord(HotakeRolesApplyOperRecord hotakeRolesApplyOperRecord)
{
hotakeRolesApplyOperRecord.setCreateTime(DateUtils.getNowDate());
fill(FillTypeEnum.INSERT.getCode(), hotakeRolesApplyOperRecord);
return hotakeRolesApplyOperRecordMapper.insertHotakeRolesApplyOperRecord(hotakeRolesApplyOperRecord);
}
@@ -75,7 +76,7 @@ public class HotakeRolesApplyOperRecordServiceImpl extends BaseServiceImpl imple
@Override
public int updateHotakeRolesApplyOperRecord(HotakeRolesApplyOperRecord hotakeRolesApplyOperRecord)
{
hotakeRolesApplyOperRecord.setUpdateTime(DateUtils.getNowDate());
fill(FillTypeEnum.UPDATE.getCode(), hotakeRolesApplyOperRecord);
return hotakeRolesApplyOperRecordMapper.updateHotakeRolesApplyOperRecord(hotakeRolesApplyOperRecord);
}

View File

@@ -28,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="roleApplyId != null "> and role_apply_id = #{roleApplyId}</if>
<if test="applyStage != null and applyStage != ''"> and apply_stage = #{applyStage}</if>
</where>
order by create_time ASC
</select>
<select id="selectHotakeRolesApplyOperRecordById" parameterType="Long" resultMap="HotakeRolesApplyOperRecordResult">