diff --git a/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeComplianceInfoController.java b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeComplianceInfoController.java index f5e3c88..632c1cd 100644 --- a/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeComplianceInfoController.java +++ b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeComplianceInfoController.java @@ -32,22 +32,33 @@ public class HotakeComplianceInfoController extends BaseController * 查询用户合规性信息列表 */ @ApiOperation("查询用户合规性信息列表") - @GetMapping("/list") - public TableWebDataInfo list(HotakeComplianceInfo hotakeComplianceInfo) + @GetMapping("/pageList") + public TableWebDataInfo pageList(HotakeComplianceInfo hotakeComplianceInfo) { startPage(); List list = hotakeComplianceInfoService.selectHotakeComplianceInfoList(hotakeComplianceInfo); return getWebDataTable(list); } + /** + * 查询用户合规性信息列表 + */ + @ApiOperation("查询用户合规性信息列表(无分页)") + @GetMapping("/getList") + public R> list(HotakeComplianceInfo hotakeComplianceInfo) + { + List list = hotakeComplianceInfoService.selectHotakeComplianceInfoList(hotakeComplianceInfo); + return R.ok(list,""); + } + /** * 获取用户合规性信息详细信息 */ @ApiOperation("获取用户合规性信息详细信息") @GetMapping(value = "/{id}") - public R getInfo(@PathVariable("id") Long id) + public R getInfo(@PathVariable("id") Long id) { - return R.ok(hotakeComplianceInfoService.selectHotakeComplianceInfoById(id)); + return R.ok(hotakeComplianceInfoService.selectHotakeComplianceInfoById(id),""); } /** @@ -77,9 +88,9 @@ public class HotakeComplianceInfoController extends BaseController */ @ApiOperation("删除用户合规性信息") @Log(title = "用户合规性信息", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public R remove(@PathVariable Long[] ids) + @DeleteMapping("/{id}") + public R remove(@PathVariable Long id) { - return R.ok(hotakeComplianceInfoService.deleteHotakeComplianceInfoByIds(ids)); + return R.ok(hotakeComplianceInfoService.deleteHotakeComplianceInfoById(id)); } } diff --git a/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeRolesApplyOperRecordController.java b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeRolesApplyOperRecordController.java index 0bcd86d..20b27f0 100644 --- a/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeRolesApplyOperRecordController.java +++ b/vetti-admin/src/main/java/com/vetti/web/controller/hotake/HotakeRolesApplyOperRecordController.java @@ -32,20 +32,31 @@ public class HotakeRolesApplyOperRecordController extends BaseController * 查询岗位申请操作信息列表 */ @ApiOperation("查询岗位申请操作信息列表") - @GetMapping("/list") - public TableWebDataInfo list(HotakeRolesApplyOperRecord hotakeRolesApplyOperRecord) + @GetMapping("/pageList") + public TableWebDataInfo pageList(HotakeRolesApplyOperRecord hotakeRolesApplyOperRecord) { startPage(); List list = hotakeRolesApplyOperRecordService.selectHotakeRolesApplyOperRecordList(hotakeRolesApplyOperRecord); return getWebDataTable(list); } + /** + * 查询岗位申请操作信息列表 + */ + @ApiOperation("查询岗位申请操作信息列表(无分页)") + @GetMapping("/getList") + public R> list(HotakeRolesApplyOperRecord hotakeRolesApplyOperRecord) + { + List list = hotakeRolesApplyOperRecordService.selectHotakeRolesApplyOperRecordList(hotakeRolesApplyOperRecord); + return R.ok(list); + } + /** * 获取岗位申请操作信息详细信息 */ @ApiOperation("获取岗位申请操作信息详细信息") @GetMapping(value = "/{id}") - public R getInfo(@PathVariable("id") Long id) + public R getInfo(@PathVariable("id") Long id) { return R.ok(hotakeRolesApplyOperRecordService.selectHotakeRolesApplyOperRecordById(id)); } diff --git a/vetti-admin/src/main/java/com/vetti/web/controller/system/SysProfileController.java b/vetti-admin/src/main/java/com/vetti/web/controller/system/SysProfileController.java index dfe4c66..75d5455 100644 --- a/vetti-admin/src/main/java/com/vetti/web/controller/system/SysProfileController.java +++ b/vetti-admin/src/main/java/com/vetti/web/controller/system/SysProfileController.java @@ -9,8 +9,10 @@ import cn.hutool.json.JSONUtil; import com.vetti.common.core.domain.R; import com.vetti.common.enums.IsInterviewEnum; import com.vetti.common.enums.UserOperStepsEnum; +import com.vetti.hotake.domain.HotakeComplianceInfo; import com.vetti.hotake.domain.HotakeCvInfo; import com.vetti.hotake.domain.HotakeProblemBaseInfo; +import com.vetti.hotake.service.IHotakeComplianceInfoService; import com.vetti.hotake.service.IHotakeCvInfoService; import com.vetti.hotake.service.IHotakeProblemBaseInfoService; import com.vetti.web.entity.dto.SysUserDto; @@ -63,6 +65,9 @@ public class SysProfileController extends BaseController @Autowired private IHotakeProblemBaseInfoService problemBaseInfoService; + @Autowired + private IHotakeComplianceInfoService complianceInfoService; + /** * 个人信息 */ @@ -79,6 +84,11 @@ public class SysProfileController extends BaseController List cvInfoList = cvInfoService.selectHotakeCvInfoList(query); dto.setCvInfoList(cvInfoList); + HotakeComplianceInfo queryCompliance = new HotakeComplianceInfo(); + queryCompliance.setUserId(user.getUserId()); + List complianceInfoList = complianceInfoService.selectHotakeComplianceInfoList(queryCompliance); + dto.setComplianceInfoList(complianceInfoList); + //是否可以参加面试 HotakeProblemBaseInfo queryProblemBaseInfo = new HotakeProblemBaseInfo(); queryProblemBaseInfo.setUserId(user.getUserId()); diff --git a/vetti-admin/src/main/java/com/vetti/web/entity/dto/SysUserDto.java b/vetti-admin/src/main/java/com/vetti/web/entity/dto/SysUserDto.java index 204e17e..b509ad8 100644 --- a/vetti-admin/src/main/java/com/vetti/web/entity/dto/SysUserDto.java +++ b/vetti-admin/src/main/java/com/vetti/web/entity/dto/SysUserDto.java @@ -1,6 +1,7 @@ package com.vetti.web.entity.dto; import com.vetti.common.core.domain.entity.SysUser; +import com.vetti.hotake.domain.HotakeComplianceInfo; import com.vetti.hotake.domain.HotakeCvInfo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -23,4 +24,7 @@ public class SysUserDto extends SysUser { @ApiModelProperty("简历数据集合") private List cvInfoList; + + @ApiModelProperty("个人合规数据集合") + private List complianceInfoList; } diff --git a/vetti-admin/src/main/java/com/vetti/web/service/impl/ElevenLabsConvAiTokenClientServiceImpl.java b/vetti-admin/src/main/java/com/vetti/web/service/impl/ElevenLabsConvAiTokenClientServiceImpl.java index 4a45821..eef5ec3 100644 --- a/vetti-admin/src/main/java/com/vetti/web/service/impl/ElevenLabsConvAiTokenClientServiceImpl.java +++ b/vetti-admin/src/main/java/com/vetti/web/service/impl/ElevenLabsConvAiTokenClientServiceImpl.java @@ -104,6 +104,7 @@ public class ElevenLabsConvAiTokenClientServiceImpl implements IElevenLabsConvAi @Override public HotakeAiInterviewScoringDto getAiInterviewScoring(HotakeAiInterviewScoringVo scoringVo) { + log.info("请求参数为:{}",JSONUtil.toJsonStr(scoringVo)); List list = new ArrayList<>(); //获取第一条数据记录 Map mapEntity = new HashMap<>(); @@ -125,17 +126,27 @@ public class ElevenLabsConvAiTokenClientServiceImpl implements IElevenLabsConvAi ChatGPTClient gptClient = SpringUtils.getBean(ChatGPTClient.class); String resultMsg = gptClient.handleAiChat(promptJson, "PF"); log.info("返回的结果为:{}",resultMsg); - //开始解析返回结果 - Map mapResultData = JSONUtil.toBean(resultMsg,Map.class); - //获取评分 - Object scoreStr = mapResultData.get("score"); - Object assessment = mapResultData.get("assessment"); + try { + //开始解析返回结果 + Map mapResultData = JSONUtil.toBean(resultMsg,Map.class); + //获取评分 + Object scoreStr = mapResultData.get("score"); + Object assessment = mapResultData.get("assessment"); + + HotakeAiInterviewScoringDto scoringDto = new HotakeAiInterviewScoringDto(); + scoringDto.setScore(scoreStr+""); + scoringDto.setAssessment(assessment+""); + scoringDto.setContent(scoreStr +"\n"+assessment); + return scoringDto; + }catch (Exception e){ + e.printStackTrace(); + HotakeAiInterviewScoringDto scoringDto = new HotakeAiInterviewScoringDto(); + scoringDto.setScore(0+""); + scoringDto.setAssessment("Skills need improvement"); + scoringDto.setContent(0 +"\n"+"Skills need improvement"); + return scoringDto; + } - HotakeAiInterviewScoringDto scoringDto = new HotakeAiInterviewScoringDto(); - scoringDto.setScore(scoreStr+""); - scoringDto.setAssessment(assessment+""); - scoringDto.setContent(scoreStr +"\n"+assessment); - return scoringDto; } diff --git a/vetti-common/src/main/java/com/vetti/common/enums/HotakeCompliancesStatusEnum.java b/vetti-common/src/main/java/com/vetti/common/enums/HotakeCompliancesStatusEnum.java new file mode 100644 index 0000000..e81c523 --- /dev/null +++ b/vetti-common/src/main/java/com/vetti/common/enums/HotakeCompliancesStatusEnum.java @@ -0,0 +1,31 @@ +package com.vetti.common.enums; + +/** + * 个人合规性检查状态 + */ +public enum HotakeCompliancesStatusEnum { + + VERIFIED("verified", "验证"), + PENDING("pending", "待验证"), + + ; + + private final String code; + private final String info; + + HotakeCompliancesStatusEnum(String code, String info) + { + this.code = code; + this.info = info; + } + + public String getCode() + { + return code; + } + + public String getInfo() + { + return info; + } +} diff --git a/vetti-common/src/main/java/com/vetti/common/enums/StageEnum.java b/vetti-common/src/main/java/com/vetti/common/enums/StageEnum.java index 4950523..7cccc2d 100644 --- a/vetti-common/src/main/java/com/vetti/common/enums/StageEnum.java +++ b/vetti-common/src/main/java/com/vetti/common/enums/StageEnum.java @@ -10,6 +10,8 @@ public enum StageEnum { INTERVIEW("Interview", "面试"), OFFER("Offer", "邀约"), HIRED("Hired", "受雇"), + REFUSE_OFFER("refuseOffer", "拒绝邀约"), + INTERVIEW_FAIL("InterviewFail", "面试失败"), ; @@ -32,4 +34,13 @@ public enum StageEnum { return info; } + public static StageEnum getByInfo(String code) { + StageEnum[] entityEnums = values(); + for (StageEnum entityEnum : entityEnums) { + if (entityEnum.getCode().equals(code)) { + return entityEnum; + } + } + return null; + } } diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeRolesApplyInfo.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeRolesApplyInfo.java index 7759dbb..85c66df 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeRolesApplyInfo.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/HotakeRolesApplyInfo.java @@ -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 applyOperRecords; + } diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeComplianceInfoServiceImpl.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeComplianceInfoServiceImpl.java index 4585a98..ce96608 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeComplianceInfoServiceImpl.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeComplianceInfoServiceImpl.java @@ -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); } diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeInitScreQuestionsReplyRecordInfoServiceImpl.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeInitScreQuestionsReplyRecordInfoServiceImpl.java index 60de701..71ef352 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeInitScreQuestionsReplyRecordInfoServiceImpl.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeInitScreQuestionsReplyRecordInfoServiceImpl.java @@ -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 selectHotakeInitScreQuestionsReplyRecordInfoList(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo) - { + public List 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 hotakeInitScreQuestionsReplyRecordInfoList){ + public int batchInsertHotakeInitScreQuestionsReplyRecordInfo(List 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> list = new LinkedList(); - Map 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> list = new LinkedList(); + Map 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("-"); } } diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesApplyInfoServiceImpl.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesApplyInfoServiceImpl.java index e256bf3..5e2307f 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesApplyInfoServiceImpl.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesApplyInfoServiceImpl.java @@ -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 applyOperRecords = rolesApplyOperRecordService.selectHotakeRolesApplyOperRecordList(queryApplyOperRecord); + applyInfo.setApplyOperRecords(applyOperRecords); + return applyInfo; } @@ -86,6 +92,9 @@ public class HotakeRolesApplyInfoServiceImpl extends BaseServiceImpl implements // query.setRecruiterId(SecurityUtils.getUserId()); List rolesInfoList = hotakeRolesInfoMapper.selectHotakeRolesInfoList(query); + HotakeRolesApplyOperRecord queryApplyOperRecord = new HotakeRolesApplyOperRecord(); + List applyOperRecords = rolesApplyOperRecordService.selectHotakeRolesApplyOperRecordList(queryApplyOperRecord); + for(HotakeRolesApplyInfo applyInfo : applyInfoList) { if(applyInfo.getRoleId() != null){ List 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 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 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("-"); } - } } } diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesApplyOperRecordServiceImpl.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesApplyOperRecordServiceImpl.java index 4f5c670..4005963 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesApplyOperRecordServiceImpl.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeRolesApplyOperRecordServiceImpl.java @@ -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); } diff --git a/vetti-hotakes/src/main/resources/mapper/hotake/HotakeRolesApplyOperRecordMapper.xml b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeRolesApplyOperRecordMapper.xml index 41131cf..08fcf3a 100644 --- a/vetti-hotakes/src/main/resources/mapper/hotake/HotakeRolesApplyOperRecordMapper.xml +++ b/vetti-hotakes/src/main/resources/mapper/hotake/HotakeRolesApplyOperRecordMapper.xml @@ -28,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and role_apply_id = #{roleApplyId} and apply_stage = #{applyStage} + order by create_time ASC