岗位申请业务逻辑
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
package com.vetti.hotake.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.vetti.common.annotation.Excel;
|
||||
import com.vetti.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 候选人岗位申请信息对象 hotake_roles_apply_info
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-12-17
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class HotakeRolesApplyInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@ApiModelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
/** 候选人ID */
|
||||
@ApiModelProperty("候选人ID")
|
||||
@Excel(name = "候选人ID")
|
||||
private Long candidateId;
|
||||
|
||||
/** 岗位ID */
|
||||
@ApiModelProperty("岗位ID")
|
||||
@Excel(name = "岗位ID")
|
||||
private Long roleId;
|
||||
|
||||
/** 姓名 */
|
||||
@ApiModelProperty("姓名")
|
||||
@Excel(name = "姓名")
|
||||
private String fullName;
|
||||
|
||||
/** 邮箱 */
|
||||
@ApiModelProperty("邮箱")
|
||||
@Excel(name = "邮箱")
|
||||
private String email;
|
||||
|
||||
/** 手机号 */
|
||||
@ApiModelProperty("手机号")
|
||||
@Excel(name = "手机号")
|
||||
private String phoneNumber;
|
||||
|
||||
/** CV 简历文件地址 */
|
||||
@ApiModelProperty("CV 简历文件地址")
|
||||
@Excel(name = "CV 简历文件地址")
|
||||
private String cvFile;
|
||||
|
||||
/** 简历类型(如:image/jpeg, application/pdf等) */
|
||||
@ApiModelProperty("简历文件后缀(doc/pdf)")
|
||||
private String cvFileSuffix;
|
||||
|
||||
@ApiModelProperty("简历文件大小")
|
||||
private String fileSizeShow;
|
||||
|
||||
/** 求职信 */
|
||||
@ApiModelProperty("求职信")
|
||||
@Excel(name = "求职信")
|
||||
private String coverLetter;
|
||||
|
||||
/** 候选人状态(Hot、Warm、Cold、Pending) */
|
||||
@ApiModelProperty("候选人状态(Hot、Warm、Cold、Pending)")
|
||||
private String candidateStatus;
|
||||
|
||||
/** 当前阶段 */
|
||||
@ApiModelProperty("当前阶段")
|
||||
@Excel(name = "当前阶段")
|
||||
private String stage;
|
||||
|
||||
/** 最后联系时间 */
|
||||
@ApiModelProperty("最后联系时间")
|
||||
@Excel(name = "最后联系时间")
|
||||
private String lastContact;
|
||||
|
||||
/** 简历模版Json */
|
||||
@ApiModelProperty("简历模版Json")
|
||||
@Excel(name = "简历模版Json")
|
||||
private String cvTemplateJson;
|
||||
|
||||
/** 简历评分以及说明 */
|
||||
@ApiModelProperty("简历评分以及说明")
|
||||
@Excel(name = "简历评分以及说明")
|
||||
private String cvScore;
|
||||
|
||||
/** 简历文件Hash */
|
||||
@ApiModelProperty("简历文件Hash")
|
||||
@Excel(name = "简历文件Hash")
|
||||
private String cvMd5;
|
||||
|
||||
/** 工作经验 */
|
||||
@ApiModelProperty("工作经验")
|
||||
@Excel(name = "工作经验")
|
||||
private String experience;
|
||||
|
||||
/** AI评分 */
|
||||
@ApiModelProperty("AI评分")
|
||||
@Excel(name = "AI评分")
|
||||
private String aiMatchScore;
|
||||
|
||||
/** AI评分百分比 */
|
||||
@ApiModelProperty("AI评分百分比")
|
||||
@Excel(name = "AI评分百分比")
|
||||
private BigDecimal aiMatchScorePercentage;
|
||||
|
||||
/** 删除状态(0正常 2删除) */
|
||||
@ApiModelProperty("删除状态(0正常 2删除)")
|
||||
private String delFlag;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.vetti.hotake.domain.vo;
|
||||
|
||||
import com.vetti.common.annotation.Excel;
|
||||
import com.vetti.hotake.domain.HotakeInitScreQuestionsReplyRecordInfo;
|
||||
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 HotakeInitScreQuestionsReplyRecordInfoVo {
|
||||
|
||||
@ApiModelProperty("岗位申请ID")
|
||||
private Long roleApplyId;
|
||||
|
||||
/** 岗位ID */
|
||||
@ApiModelProperty("岗位ID")
|
||||
@Excel(name = "岗位ID")
|
||||
private Long roleId;
|
||||
|
||||
@ApiModelProperty("初步筛选问题回答记录数据集合")
|
||||
private List<HotakeInitScreQuestionsReplyRecordInfo> initScreQuestionsReplyRecordInfoList;
|
||||
}
|
||||
@@ -58,6 +58,15 @@ public interface HotakeInitScreQuestionsReplyRecordInfoMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeInitScreQuestionsReplyRecordInfoByIds(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 删除初步筛选问题回答记录信息
|
||||
*
|
||||
* @param roleApplyId 岗位申请ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeInitScreQuestionsReplyRecordInfoByRoleApplyId(Long roleApplyId);
|
||||
/**
|
||||
* 批量新增初步筛选问题回答记录信息
|
||||
*
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.vetti.hotake.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.vetti.hotake.domain.HotakeRolesApplyInfo;
|
||||
|
||||
/**
|
||||
* 候选人岗位申请信息Mapper接口
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-12-17
|
||||
*/
|
||||
public interface HotakeRolesApplyInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询候选人岗位申请信息
|
||||
*
|
||||
* @param id 候选人岗位申请信息主键
|
||||
* @return 候选人岗位申请信息
|
||||
*/
|
||||
public HotakeRolesApplyInfo selectHotakeRolesApplyInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询候选人岗位申请信息列表
|
||||
*
|
||||
* @param hotakeRolesApplyInfo 候选人岗位申请信息
|
||||
* @return 候选人岗位申请信息集合
|
||||
*/
|
||||
public List<HotakeRolesApplyInfo> selectHotakeRolesApplyInfoList(HotakeRolesApplyInfo hotakeRolesApplyInfo);
|
||||
|
||||
/**
|
||||
* 新增候选人岗位申请信息
|
||||
*
|
||||
* @param hotakeRolesApplyInfo 候选人岗位申请信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHotakeRolesApplyInfo(HotakeRolesApplyInfo hotakeRolesApplyInfo);
|
||||
|
||||
/**
|
||||
* 修改候选人岗位申请信息
|
||||
*
|
||||
* @param hotakeRolesApplyInfo 候选人岗位申请信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHotakeRolesApplyInfo(HotakeRolesApplyInfo hotakeRolesApplyInfo);
|
||||
|
||||
/**
|
||||
* 删除候选人岗位申请信息
|
||||
*
|
||||
* @param id 候选人岗位申请信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeRolesApplyInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除候选人岗位申请信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeRolesApplyInfoByIds(Long[] ids);
|
||||
/**
|
||||
* 批量新增候选人岗位申请信息
|
||||
*
|
||||
* @param hotakeRolesApplyInfoList 候选人岗位申请信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertHotakeRolesApplyInfo(List<HotakeRolesApplyInfo> hotakeRolesApplyInfoList);
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.vetti.hotake.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.vetti.hotake.domain.HotakeInitScreQuestionsReplyRecordInfo;
|
||||
import com.vetti.hotake.domain.vo.HotakeInitScreQuestionsReplyRecordInfoVo;
|
||||
|
||||
/**
|
||||
* 初步筛选问题回答记录信息Service接口
|
||||
@@ -67,4 +68,13 @@ public interface IHotakeInitScreQuestionsReplyRecordInfoService
|
||||
*/
|
||||
public int batchInsertHotakeInitScreQuestionsReplyRecordInfo(List<HotakeInitScreQuestionsReplyRecordInfo> hotakeInitScreQuestionsReplyRecordInfoList);
|
||||
|
||||
|
||||
/**
|
||||
* 初步筛选问题回答记录信息批量保存
|
||||
*
|
||||
* @param initScreQuestionsReplyRecordInfoVo 初步筛选问题回答记录信息数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int saveHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfoVo initScreQuestionsReplyRecordInfoVo);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.vetti.hotake.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.vetti.hotake.domain.HotakeRolesApplyInfo;
|
||||
|
||||
/**
|
||||
* 候选人岗位申请信息Service接口
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-12-17
|
||||
*/
|
||||
public interface IHotakeRolesApplyInfoService
|
||||
{
|
||||
/**
|
||||
* 查询候选人岗位申请信息
|
||||
*
|
||||
* @param id 候选人岗位申请信息主键
|
||||
* @return 候选人岗位申请信息
|
||||
*/
|
||||
public HotakeRolesApplyInfo selectHotakeRolesApplyInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询候选人岗位申请信息列表
|
||||
*
|
||||
* @param hotakeRolesApplyInfo 候选人岗位申请信息
|
||||
* @return 候选人岗位申请信息集合
|
||||
*/
|
||||
public List<HotakeRolesApplyInfo> selectHotakeRolesApplyInfoList(HotakeRolesApplyInfo hotakeRolesApplyInfo);
|
||||
|
||||
/**
|
||||
* 新增候选人岗位申请信息
|
||||
*
|
||||
* @param hotakeRolesApplyInfo 候选人岗位申请信息
|
||||
* @return 结果
|
||||
*/
|
||||
public HotakeRolesApplyInfo insertHotakeRolesApplyInfo(HotakeRolesApplyInfo hotakeRolesApplyInfo);
|
||||
|
||||
/**
|
||||
* 修改候选人岗位申请信息
|
||||
*
|
||||
* @param hotakeRolesApplyInfo 候选人岗位申请信息
|
||||
* @return 结果
|
||||
*/
|
||||
public HotakeRolesApplyInfo updateHotakeRolesApplyInfo(HotakeRolesApplyInfo hotakeRolesApplyInfo);
|
||||
|
||||
/**
|
||||
* 批量删除候选人岗位申请信息
|
||||
*
|
||||
* @param ids 需要删除的候选人岗位申请信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeRolesApplyInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除候选人岗位申请信息信息
|
||||
*
|
||||
* @param id 候选人岗位申请信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeRolesApplyInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量新增候选人岗位申请信息
|
||||
*
|
||||
* @param hotakeRolesApplyInfoList 候选人岗位申请信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertHotakeRolesApplyInfo(List<HotakeRolesApplyInfo> hotakeRolesApplyInfoList);
|
||||
|
||||
}
|
||||
@@ -443,11 +443,6 @@ public class HotakeCvInfoServiceImpl extends BaseServiceImpl implements IHotakeC
|
||||
return resultMsg;
|
||||
}
|
||||
|
||||
public static void main(String[] args){
|
||||
String md5s = MD5.create().digestHex16("You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.");
|
||||
System.out.println(md5s);
|
||||
String md5s1 = MD5.create().digestHex16("You 1are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.You are a construction industry interview expert. Evaluate candidate responses and provide scores (1-5) and follow-up questions when needed. Always respond in JSON format.");
|
||||
System.out.println(md5s1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,33 @@
|
||||
package com.vetti.hotake.service.impl;
|
||||
|
||||
import java.io.InputStream;
|
||||
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.util.StrUtil;
|
||||
import cn.hutool.crypto.digest.MD5;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.vetti.common.ai.gpt.ChatGPTClient;
|
||||
import com.vetti.common.core.service.BaseServiceImpl;
|
||||
import com.vetti.common.enums.FillTypeEnum;
|
||||
import com.vetti.common.enums.MinioBucketNameEnum;
|
||||
import com.vetti.common.utils.DateUtils;
|
||||
import com.vetti.common.utils.SecurityUtils;
|
||||
import com.vetti.common.utils.readFile.FileContentUtil;
|
||||
import com.vetti.hotake.domain.HotakeCvInfo;
|
||||
import com.vetti.hotake.domain.HotakeProblemBaseInfo;
|
||||
import com.vetti.hotake.domain.HotakeRolesApplyInfo;
|
||||
import com.vetti.hotake.domain.dto.HotakeCvInfoDto;
|
||||
import com.vetti.hotake.domain.dto.VcDto.*;
|
||||
import com.vetti.hotake.domain.vo.HotakeInitScreQuestionsReplyRecordInfoVo;
|
||||
import com.vetti.hotake.mapper.HotakeCvInfoMapper;
|
||||
import com.vetti.hotake.mapper.HotakeRolesApplyInfoMapper;
|
||||
import io.minio.GetObjectArgs;
|
||||
import io.minio.MinioClient;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -18,6 +42,7 @@ import com.vetti.hotake.service.IHotakeInitScreQuestionsReplyRecordInfoService;
|
||||
* @author wangxiangshun
|
||||
* @date 2025-12-14
|
||||
*/
|
||||
@Slf4j
|
||||
@SuppressWarnings("all")
|
||||
@Service
|
||||
public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServiceImpl implements IHotakeInitScreQuestionsReplyRecordInfoService
|
||||
@@ -25,6 +50,19 @@ public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServi
|
||||
@Autowired
|
||||
private HotakeInitScreQuestionsReplyRecordInfoMapper hotakeInitScreQuestionsReplyRecordInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private HotakeRolesApplyInfoMapper hotakeRolesApplyInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private HotakeCvInfoMapper hotakeCvInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private MinioClient minioClient;
|
||||
|
||||
@Autowired
|
||||
private ChatGPTClient chatGPTClient;
|
||||
|
||||
|
||||
/**
|
||||
* 查询初步筛选问题回答记录信息
|
||||
*
|
||||
@@ -115,4 +153,242 @@ public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServi
|
||||
public int batchInsertHotakeInitScreQuestionsReplyRecordInfo(List<HotakeInitScreQuestionsReplyRecordInfo> hotakeInitScreQuestionsReplyRecordInfoList){
|
||||
return hotakeInitScreQuestionsReplyRecordInfoMapper.batchInsertHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初步筛选问题回答记录信息批量保存
|
||||
* @param initScreQuestionsReplyRecordInfoList 初步筛选问题回答记录信息数据集合
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int saveHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfoVo initScreQuestionsReplyRecordInfoVo) {
|
||||
//先删除对应问题答案记录数据
|
||||
hotakeInitScreQuestionsReplyRecordInfoMapper.deleteHotakeInitScreQuestionsReplyRecordInfoByRoleApplyId(initScreQuestionsReplyRecordInfoVo.getRoleApplyId());
|
||||
//批量保存数据
|
||||
if (CollectionUtil.isNotEmpty(initScreQuestionsReplyRecordInfoVo.getInitScreQuestionsReplyRecordInfoList())) {
|
||||
for (HotakeInitScreQuestionsReplyRecordInfo recordInfo : initScreQuestionsReplyRecordInfoVo.getInitScreQuestionsReplyRecordInfoList()) {
|
||||
recordInfo.setCandidateId(SecurityUtils.getUserId()).setRoleId(initScreQuestionsReplyRecordInfoVo.getRoleApplyId());
|
||||
recordInfo.setRoleApplyId(initScreQuestionsReplyRecordInfoVo.getRoleApplyId());
|
||||
fill(FillTypeEnum.INSERT.getCode(), recordInfo);
|
||||
}
|
||||
batchInsertHotakeInitScreQuestionsReplyRecordInfo(initScreQuestionsReplyRecordInfoVo.getInitScreQuestionsReplyRecordInfoList());
|
||||
}
|
||||
//获取申请的简历数据
|
||||
HotakeRolesApplyInfo applyInfo = hotakeRolesApplyInfoMapper.selectHotakeRolesApplyInfoById(initScreQuestionsReplyRecordInfoVo.getRoleApplyId());
|
||||
if (applyInfo != null) {
|
||||
//查询候选人的当前最新简历信息
|
||||
HotakeCvInfo queryCv = new HotakeCvInfo();
|
||||
queryCv.setUserId(SecurityUtils.getUserId());
|
||||
queryCv.setCvFileType("cv");
|
||||
List<HotakeCvInfo> cvInfos = hotakeCvInfoMapper.selectHotakeCvInfoList(queryCv);
|
||||
HotakeCvInfo cvInfo = null;
|
||||
if(CollectionUtil.isNotEmpty(cvInfos)) {
|
||||
cvInfo = cvInfos.get(0);
|
||||
}
|
||||
//解析简历内容以及获取简历对应的评分数据
|
||||
log.info("开始处理简历");
|
||||
try {
|
||||
InputStream inputStream = minioClient.getObject(
|
||||
GetObjectArgs.builder()
|
||||
.bucket(MinioBucketNameEnum.CV.getCode())
|
||||
.object(applyInfo.getCvFile())
|
||||
.build());
|
||||
String contents = FileContentUtil.readFileContent(inputStream, applyInfo.getCvFileSuffix());
|
||||
log.info("简历信息:{}", contents);
|
||||
//验证文件内容是否改变,如果未改变不进行模型解析直接返回原有结果
|
||||
String md5Hash = MD5.create().digestHex16(contents);
|
||||
if (StrUtil.isNotEmpty(md5Hash) && cvInfo != null && md5Hash.equals(cvInfo.getCvMd5())) {
|
||||
//直接获取简历表中的简历解析的详细数据
|
||||
applyInfo.setCvScore(cvInfo.getCvScore());
|
||||
applyInfo.setCvTemplateJson(cvInfo.getCvTemplateJson());
|
||||
fill(FillTypeEnum.UPDATE.getCode(), applyInfo);
|
||||
applyInfo.setCvMd5(md5Hash);
|
||||
}else{
|
||||
//生成简历模版数据信息
|
||||
HotakeCvInfoDto cvInfoDto = handleAnalysisCvInfo(contents);
|
||||
//生成对应的简历评分
|
||||
String resultMsg = handleHotakeCvInfoScore(cvInfoDto);
|
||||
applyInfo.setCvScore(resultMsg);
|
||||
applyInfo.setCvTemplateJson(JSONUtil.toJsonStr(cvInfoDto));
|
||||
fill(FillTypeEnum.UPDATE.getCode(), cvInfo);
|
||||
applyInfo.setCvMd5(md5Hash);
|
||||
}
|
||||
//更新岗位申请数据记录
|
||||
applyInfo.setCandidateStatus("Pending");
|
||||
applyInfo.setStage("");
|
||||
hotakeRolesApplyInfoMapper.updateHotakeRolesApplyInfo(applyInfo);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 简历解析数据
|
||||
*
|
||||
* @param contents
|
||||
* @return
|
||||
*/
|
||||
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(电子邮件地址)、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\\\": \\\"\\\", \\\"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())){
|
||||
cvInfoDto.setName("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(cvInfoDto.getPhone())){
|
||||
cvInfoDto.setPhone("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(cvInfoDto.getEmail())){
|
||||
cvInfoDto.setEmail("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(cvInfoDto.getPosition())){
|
||||
cvInfoDto.setPosition("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(cvInfoDto.getLocation())){
|
||||
cvInfoDto.setLocation("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(cvInfoDto.getAbout())){
|
||||
cvInfoDto.setAbout("-");
|
||||
}
|
||||
if (StrUtil.isEmpty(cvInfoDto.getCurrentWork())){
|
||||
cvInfoDto.setCurrentWork("-");
|
||||
}
|
||||
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())){
|
||||
linksDto.setContent("-");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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())){
|
||||
experienceDto.setTitle("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(experienceDto.getCompany())){
|
||||
experienceDto.setCompany("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(experienceDto.getLocation())){
|
||||
experienceDto.setLocation("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(experienceDto.getDurationStart())){
|
||||
experienceDto.setDurationStart("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(experienceDto.getDurationEnd())){
|
||||
experienceDto.setDurationEnd("-");
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(experienceDto.getDescription())){
|
||||
for(VcExperienceDescriptionDto descriptionDto :experienceDto.getDescription()){
|
||||
if(StrUtil.isEmpty(descriptionDto.getContent())){
|
||||
descriptionDto.setContent("-");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(CollectionUtil.isNotEmpty(cvInfoDto.getEducation())){
|
||||
for (VcEducationDto educationDto :cvInfoDto.getEducation()) {
|
||||
if (StrUtil.isEmpty(educationDto.getDegree())){
|
||||
educationDto.setDegree("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(educationDto.getInstitution())){
|
||||
educationDto.setInstitution("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(educationDto.getDurationStart())){
|
||||
educationDto.setDurationStart("-");
|
||||
}
|
||||
if(StrUtil.isEmpty(educationDto.getDurationEnd())){
|
||||
educationDto.setDurationEnd("-");
|
||||
}
|
||||
if(educationDto.getCertificate() != null){
|
||||
if(StrUtil.isEmpty(educationDto.getCertificate().getFileName())){
|
||||
educationDto.getCertificate().setFileName("-");
|
||||
}
|
||||
if (StrUtil.isEmpty(educationDto.getCertificate().getFileSuffix())){
|
||||
educationDto.getCertificate().setFileSuffix("-");
|
||||
}
|
||||
if (StrUtil.isEmpty(educationDto.getCertificate().getFileUrl())){
|
||||
educationDto.getCertificate().setFileUrl("-");
|
||||
}
|
||||
if (StrUtil.isEmpty(educationDto.getCertificate().getFileSizeShow())){
|
||||
educationDto.getCertificate().setFileSizeShow("-");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return cvInfoDto;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new HotakeCvInfoDto();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理简历信息
|
||||
*
|
||||
* @param hotakeCvInfo 简历信息
|
||||
* @return
|
||||
*/
|
||||
private String handleHotakeCvInfoScore(HotakeCvInfoDto cvInfoDto) {
|
||||
String resultMsg = "";
|
||||
try {
|
||||
//调用AI大模型
|
||||
List<Map<String, String>> list = new LinkedList();
|
||||
Map<String, String> mapEntity = new HashMap<>();
|
||||
mapEntity.put("role", "system");
|
||||
mapEntity.put("content", "You are a construction industry HR expert. Evaluate resumes and provide scores and recommendations for construction management positions.");
|
||||
list.add(mapEntity);
|
||||
Map<String, String> mapEntityOne = new HashMap<>();
|
||||
mapEntityOne.put("role", "user");
|
||||
mapEntityOne.put("content", "Position: Construction Labourer" +
|
||||
"\\nCandidate: " + cvInfoDto.getName() +
|
||||
"\\nResume Summary: " + JSONUtil.toJsonStr(cvInfoDto.getAbout()) +
|
||||
"\\nSkills: " + JSONUtil.toJsonStr(cvInfoDto.getSkillsTools()) +
|
||||
"\\nExperience: " + JSONUtil.toJsonStr(cvInfoDto.getExperience()) +
|
||||
"\\nEducation: " + JSONUtil.toJsonStr(cvInfoDto.getEducation()) +
|
||||
"\\nCertifications: " + JSONUtil.toJsonStr(cvInfoDto.getSkillsTools()));
|
||||
list.add(mapEntityOne);
|
||||
String promptText = JSONUtil.toJsonStr(list);
|
||||
resultMsg = chatGPTClient.handleAiChat(promptText, "CV");
|
||||
log.info("返回简历评分数据:{}", resultMsg);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return resultMsg;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ 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.SecurityUtils;
|
||||
import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo;
|
||||
import com.vetti.hotake.domain.dto.AnswerOptionsDto;
|
||||
import com.vetti.hotake.mapper.HotakeInitialScreeningQuestionsInfoMapper;
|
||||
@@ -69,7 +70,7 @@ public class HotakeInitialScreeningQuestionsInfoServiceImpl extends BaseServiceI
|
||||
@Override
|
||||
public int insertHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo)
|
||||
{
|
||||
|
||||
hotakeInitialScreeningQuestionsInfo.setRecruiterId(SecurityUtils.getUserId());
|
||||
fill(FillTypeEnum.INSERT.getCode(), hotakeInitialScreeningQuestionsInfo);
|
||||
if(CollectionUtil.isNotEmpty(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList())){
|
||||
hotakeInitialScreeningQuestionsInfo.setAnswerOptions(JSONUtil.toJsonStr(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList()));
|
||||
@@ -89,6 +90,7 @@ public class HotakeInitialScreeningQuestionsInfoServiceImpl extends BaseServiceI
|
||||
@Override
|
||||
public int updateHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo)
|
||||
{
|
||||
hotakeInitialScreeningQuestionsInfo.setRecruiterId(SecurityUtils.getUserId());
|
||||
fill(FillTypeEnum.UPDATE.getCode(), hotakeInitialScreeningQuestionsInfo);
|
||||
if(CollectionUtil.isNotEmpty(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList())){
|
||||
hotakeInitialScreeningQuestionsInfo.setAnswerOptions(JSONUtil.toJsonStr(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList()));
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
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 com.vetti.common.utils.SecurityUtils;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 候选人岗位申请信息Service业务层处理
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-12-17
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
@Service
|
||||
public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements IHotakeRolesApplyInfoService
|
||||
{
|
||||
@Autowired
|
||||
private HotakeRolesApplyInfoMapper hotakeRolesApplyInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询候选人岗位申请信息
|
||||
*
|
||||
* @param id 候选人岗位申请信息主键
|
||||
* @return 候选人岗位申请信息
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public HotakeRolesApplyInfo selectHotakeRolesApplyInfoById(Long id)
|
||||
{
|
||||
return hotakeRolesApplyInfoMapper.selectHotakeRolesApplyInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询候选人岗位申请信息列表
|
||||
*
|
||||
* @param hotakeRolesApplyInfo 候选人岗位申请信息
|
||||
* @return 候选人岗位申请信息
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public List<HotakeRolesApplyInfo> selectHotakeRolesApplyInfoList(HotakeRolesApplyInfo hotakeRolesApplyInfo)
|
||||
{
|
||||
return hotakeRolesApplyInfoMapper.selectHotakeRolesApplyInfoList(hotakeRolesApplyInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增候选人岗位申请信息
|
||||
*
|
||||
* @param hotakeRolesApplyInfo 候选人岗位申请信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public HotakeRolesApplyInfo insertHotakeRolesApplyInfo(HotakeRolesApplyInfo hotakeRolesApplyInfo)
|
||||
{
|
||||
fill(FillTypeEnum.INSERT.getCode(), hotakeRolesApplyInfo);
|
||||
hotakeRolesApplyInfo.setCandidateId(SecurityUtils.getUserId());
|
||||
int resultNum = hotakeRolesApplyInfoMapper.insertHotakeRolesApplyInfo(hotakeRolesApplyInfo);
|
||||
return hotakeRolesApplyInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改候选人岗位申请信息
|
||||
*
|
||||
* @param hotakeRolesApplyInfo 候选人岗位申请信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public HotakeRolesApplyInfo updateHotakeRolesApplyInfo(HotakeRolesApplyInfo hotakeRolesApplyInfo)
|
||||
{
|
||||
fill(FillTypeEnum.UPDATE.getCode(), hotakeRolesApplyInfo);
|
||||
hotakeRolesApplyInfo.setCandidateId(SecurityUtils.getUserId());
|
||||
int resultNum = hotakeRolesApplyInfoMapper.updateHotakeRolesApplyInfo(hotakeRolesApplyInfo);
|
||||
return hotakeRolesApplyInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除候选人岗位申请信息
|
||||
*
|
||||
* @param ids 需要删除的候选人岗位申请信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeRolesApplyInfoByIds(Long[] ids)
|
||||
{
|
||||
return hotakeRolesApplyInfoMapper.deleteHotakeRolesApplyInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除候选人岗位申请信息信息
|
||||
*
|
||||
* @param id 候选人岗位申请信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeRolesApplyInfoById(Long id)
|
||||
{
|
||||
return hotakeRolesApplyInfoMapper.deleteHotakeRolesApplyInfoById(id);
|
||||
}
|
||||
/**
|
||||
* 批量新增候选人岗位申请信息
|
||||
*
|
||||
* @param hotakeRolesApplyInfoList 候选人岗位申请信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int batchInsertHotakeRolesApplyInfo(List<HotakeRolesApplyInfo> hotakeRolesApplyInfoList){
|
||||
return hotakeRolesApplyInfoMapper.batchInsertHotakeRolesApplyInfo(hotakeRolesApplyInfoList);
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<resultMap type="HotakeInitScreQuestionsReplyRecordInfo" id="HotakeInitScreQuestionsReplyRecordInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="roleApplyId" column="role_apply_id" />
|
||||
<result property="roleId" column="role_id" />
|
||||
<result property="candidateId" column="candidate_id" />
|
||||
<result property="questionId" column="question_id" />
|
||||
@@ -19,12 +20,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHotakeInitScreQuestionsReplyRecordInfoVo">
|
||||
select id, role_id, candidate_id, question_id, answer_connect, del_flag, create_by, create_time, update_by, update_time, remark from hotake_init_scre_questions_reply_record_info
|
||||
select id, role_apply_id,role_id, candidate_id, question_id, answer_connect, del_flag, create_by, create_time, update_by, update_time, remark from hotake_init_scre_questions_reply_record_info
|
||||
</sql>
|
||||
|
||||
<select id="selectHotakeInitScreQuestionsReplyRecordInfoList" parameterType="HotakeInitScreQuestionsReplyRecordInfo" resultMap="HotakeInitScreQuestionsReplyRecordInfoResult">
|
||||
<include refid="selectHotakeInitScreQuestionsReplyRecordInfoVo"/>
|
||||
<where>
|
||||
<if test="roleApplyId != null "> and role_apply_id = #{roleApplyId}</if>
|
||||
<if test="roleId != null "> and role_id = #{roleId}</if>
|
||||
<if test="candidateId != null "> and candidate_id = #{candidateId}</if>
|
||||
<if test="questionId != null "> and question_id = #{questionId}</if>
|
||||
@@ -40,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<insert id="insertHotakeInitScreQuestionsReplyRecordInfo" parameterType="HotakeInitScreQuestionsReplyRecordInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into hotake_init_scre_questions_reply_record_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="roleApplyId != null">role_apply_id,</if>
|
||||
<if test="roleId != null">role_id,</if>
|
||||
<if test="candidateId != null">candidate_id,</if>
|
||||
<if test="questionId != null">question_id,</if>
|
||||
@@ -52,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="roleApplyId != null">#{roleApplyId},</if>
|
||||
<if test="roleId != null">#{roleId},</if>
|
||||
<if test="candidateId != null">#{candidateId},</if>
|
||||
<if test="questionId != null">#{questionId},</if>
|
||||
@@ -68,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<update id="updateHotakeInitScreQuestionsReplyRecordInfo" parameterType="HotakeInitScreQuestionsReplyRecordInfo">
|
||||
update hotake_init_scre_questions_reply_record_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="roleApplyId != null">role_apply_id = #{roleApplyId},</if>
|
||||
<if test="roleId != null">role_id = #{roleId},</if>
|
||||
<if test="candidateId != null">candidate_id = #{candidateId},</if>
|
||||
<if test="questionId != null">question_id = #{questionId},</if>
|
||||
@@ -86,6 +91,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
delete from hotake_init_scre_questions_reply_record_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteHotakeInitScreQuestionsReplyRecordInfoByRoleApplyId" parameterType="Long">
|
||||
delete from hotake_init_scre_questions_reply_record_info where role_apply_id = #{roleApplyId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHotakeInitScreQuestionsReplyRecordInfoByIds" parameterType="String">
|
||||
delete from hotake_init_scre_questions_reply_record_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.vetti.hotake.mapper.HotakeRolesApplyInfoMapper">
|
||||
|
||||
<resultMap type="HotakeRolesApplyInfo" id="HotakeRolesApplyInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="candidateId" column="candidate_id" />
|
||||
<result property="roleId" column="role_id" />
|
||||
<result property="fullName" column="full_name" />
|
||||
<result property="email" column="email" />
|
||||
<result property="phoneNumber" column="phone_number" />
|
||||
<result property="cvFile" column="cv_file" />
|
||||
<result property="cvFileSuffix" column="cv_file_suffix" />
|
||||
<result property="fileSizeShow" column="file_size_show" />
|
||||
<result property="coverLetter" column="cover_letter" />
|
||||
<result property="candidateStatus" column="candidate_status" />
|
||||
<result property="stage" column="stage" />
|
||||
<result property="lastContact" column="last_contact" />
|
||||
<result property="cvTemplateJson" column="cv_template_json" />
|
||||
<result property="cvScore" column="cv_score" />
|
||||
<result property="cvMd5" column="cv_md5" />
|
||||
<result property="experience" column="experience" />
|
||||
<result property="aiMatchScore" column="ai_match_score" />
|
||||
<result property="aiMatchScorePercentage" column="ai_match_score_percentage" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHotakeRolesApplyInfoVo">
|
||||
select id, candidate_id, role_id, full_name, email, phone_number, cv_file, cv_file_suffix,file_size_show,cover_letter, candidate_status, stage, last_contact, cv_template_json, cv_score, cv_md5, experience, ai_match_score, ai_match_score_percentage, del_flag, create_by, create_time, update_by, update_time, remark from hotake_roles_apply_info
|
||||
</sql>
|
||||
|
||||
<select id="selectHotakeRolesApplyInfoList" parameterType="HotakeRolesApplyInfo" resultMap="HotakeRolesApplyInfoResult">
|
||||
<include refid="selectHotakeRolesApplyInfoVo"/>
|
||||
<where>
|
||||
<if test="candidateId != null "> and candidate_id = #{candidateId}</if>
|
||||
<if test="roleId != null "> and role_id = #{roleId}</if>
|
||||
<if test="fullName != null and fullName != ''"> and full_name like concat('%', #{fullName}, '%')</if>
|
||||
<if test="email != null and email != ''"> and email = #{email}</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
|
||||
<if test="cvFile != null and cvFile != ''"> and cv_file = #{cvFile}</if>
|
||||
<if test="cvFileSuffix != null and cvFileSuffix != ''"> and cv_file_suffix = #{cvFileSuffix}</if>
|
||||
|
||||
<if test="coverLetter != null and coverLetter != ''"> and cover_letter = #{coverLetter}</if>
|
||||
<if test="candidateStatus != null and candidateStatus != ''"> and candidate_status = #{candidateStatus}</if>
|
||||
<if test="stage != null and stage != ''"> and stage = #{stage}</if>
|
||||
<if test="lastContact != null and lastContact != ''"> and last_contact = #{lastContact}</if>
|
||||
<if test="cvTemplateJson != null and cvTemplateJson != ''"> and cv_template_json = #{cvTemplateJson}</if>
|
||||
<if test="cvScore != null and cvScore != ''"> and cv_score = #{cvScore}</if>
|
||||
<if test="cvMd5 != null and cvMd5 != ''"> and cv_md5 = #{cvMd5}</if>
|
||||
<if test="experience != null and experience != ''"> and experience = #{experience}</if>
|
||||
<if test="aiMatchScore != null and aiMatchScore != ''"> and ai_match_score = #{aiMatchScore}</if>
|
||||
<if test="aiMatchScorePercentage != null "> and ai_match_score_percentage = #{aiMatchScorePercentage}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHotakeRolesApplyInfoById" parameterType="Long" resultMap="HotakeRolesApplyInfoResult">
|
||||
<include refid="selectHotakeRolesApplyInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHotakeRolesApplyInfo" parameterType="HotakeRolesApplyInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into hotake_roles_apply_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="candidateId != null">candidate_id,</if>
|
||||
<if test="roleId != null">role_id,</if>
|
||||
<if test="fullName != null">full_name,</if>
|
||||
<if test="email != null">email,</if>
|
||||
<if test="phoneNumber != null">phone_number,</if>
|
||||
<if test="cvFile != null">cv_file,</if>
|
||||
<if test="cvFileSuffix != null">cv_file_suffix,</if>
|
||||
<if test="fileSizeShow != null">file_size_show,</if>
|
||||
<if test="coverLetter != null">cover_letter,</if>
|
||||
<if test="candidateStatus != null">candidate_status,</if>
|
||||
<if test="stage != null">stage,</if>
|
||||
<if test="lastContact != null">last_contact,</if>
|
||||
<if test="cvTemplateJson != null">cv_template_json,</if>
|
||||
<if test="cvScore != null">cv_score,</if>
|
||||
<if test="cvMd5 != null">cv_md5,</if>
|
||||
<if test="experience != null">experience,</if>
|
||||
<if test="aiMatchScore != null">ai_match_score,</if>
|
||||
<if test="aiMatchScorePercentage != null">ai_match_score_percentage,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="candidateId != null">#{candidateId},</if>
|
||||
<if test="roleId != null">#{roleId},</if>
|
||||
<if test="fullName != null">#{fullName},</if>
|
||||
<if test="email != null">#{email},</if>
|
||||
<if test="phoneNumber != null">#{phoneNumber},</if>
|
||||
<if test="cvFile != null">#{cvFile},</if>
|
||||
<if test="cvFileSuffix != null">#{cvFileSuffix},</if>
|
||||
<if test="fileSizeShow != null">#{fileSizeShow},</if>
|
||||
<if test="coverLetter != null">#{coverLetter},</if>
|
||||
<if test="candidateStatus != null">#{candidateStatus},</if>
|
||||
<if test="stage != null">#{stage},</if>
|
||||
<if test="lastContact != null">#{lastContact},</if>
|
||||
<if test="cvTemplateJson != null">#{cvTemplateJson},</if>
|
||||
<if test="cvScore != null">#{cvScore},</if>
|
||||
<if test="cvMd5 != null">#{cvMd5},</if>
|
||||
<if test="experience != null">#{experience},</if>
|
||||
<if test="aiMatchScore != null">#{aiMatchScore},</if>
|
||||
<if test="aiMatchScorePercentage != null">#{aiMatchScorePercentage},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHotakeRolesApplyInfo" parameterType="HotakeRolesApplyInfo">
|
||||
update hotake_roles_apply_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="candidateId != null">candidate_id = #{candidateId},</if>
|
||||
<if test="roleId != null">role_id = #{roleId},</if>
|
||||
<if test="fullName != null">full_name = #{fullName},</if>
|
||||
<if test="email != null">email = #{email},</if>
|
||||
<if test="phoneNumber != null">phone_number = #{phoneNumber},</if>
|
||||
<if test="cvFile != null">cv_file = #{cvFile},</if>
|
||||
<if test="cvFileSuffix != null">cv_file_suffix = #{cvFileSuffix},</if>
|
||||
<if test="fileSizeShow != null">file_size_show = #{fileSizeShow},</if>
|
||||
<if test="coverLetter != null">cover_letter = #{coverLetter},</if>
|
||||
<if test="candidateStatus != null">candidate_status = #{candidateStatus},</if>
|
||||
<if test="stage != null">stage = #{stage},</if>
|
||||
<if test="lastContact != null">last_contact = #{lastContact},</if>
|
||||
<if test="cvTemplateJson != null">cv_template_json = #{cvTemplateJson},</if>
|
||||
<if test="cvScore != null">cv_score = #{cvScore},</if>
|
||||
<if test="cvMd5 != null">cv_md5 = #{cvMd5},</if>
|
||||
<if test="experience != null">experience = #{experience},</if>
|
||||
<if test="aiMatchScore != null">ai_match_score = #{aiMatchScore},</if>
|
||||
<if test="aiMatchScorePercentage != null">ai_match_score_percentage = #{aiMatchScorePercentage},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHotakeRolesApplyInfoById" parameterType="Long">
|
||||
delete from hotake_roles_apply_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHotakeRolesApplyInfoByIds" parameterType="String">
|
||||
delete from hotake_roles_apply_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertHotakeRolesApplyInfo">
|
||||
insert into hotake_roles_apply_info( id, candidate_id, role_id, full_name, email, phone_number, cv_file, cover_letter, candidate_status, stage, last_contact, cv_template_json, cv_score, cv_md5, experience, ai_match_score, ai_match_score_percentage, del_flag, create_by, create_time, update_by, update_time, remark) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.candidateId}, #{item.roleId}, #{item.fullName}, #{item.email}, #{item.phoneNumber}, #{item.cvFile}, #{item.coverLetter}, #{item.candidateStatus}, #{item.stage}, #{item.lastContact}, #{item.cvTemplateJson}, #{item.cvScore}, #{item.cvMd5}, #{item.experience}, #{item.aiMatchScore}, #{item.aiMatchScorePercentage}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user