优化问题修改

This commit is contained in:
2026-02-04 22:50:00 +08:00
parent 7e77f64cc1
commit 4277ff1869
2 changed files with 53 additions and 48 deletions

View File

@@ -1427,28 +1427,30 @@ public class HotakeAiCommonToolsServiceImpl extends BaseServiceImpl implements I
String resultJsonOne = resultStrOne.replaceAll("```json", "").replaceAll("```", "");
log.info("候选人面试综合评估:{}", resultJsonOne);
Map dataMap = JSONUtil.toBean(resultJsonOne, Map.class);
Map scoreBreakdownMap = (Map) dataMap.get("score_breakdown");
if (scoreBreakdownMap != null) {
Map assessmentMap = (Map) scoreBreakdownMap.get("assessment");
if (assessmentMap != null) {
dto.setAssessmentScore(assessmentMap.get("score").toString());
dto.setAssessmentLevel(assessmentMap.get("score").toString());
List<String> details = (List<String>) assessmentMap.get("details");
dto.setAssessmentDetails(details);
}
Map ratingMap = (Map) scoreBreakdownMap.get("rating");
if (ratingMap != null) {
dto.setRatingScore(ratingMap.get("score").toString());
dto.setRatingLevel(ratingMap.get("score").toString());
List<String> details = (List<String>) ratingMap.get("details");
dto.setRatingDetails(details);
}
Map questionsMap = (Map) scoreBreakdownMap.get("questions");
if (questionsMap != null) {
dto.setQuestionsScore(questionsMap.get("score").toString());
dto.setQuestionsLevel(questionsMap.get("score").toString());
List<String> details = (List<String>) questionsMap.get("details");
dto.setQuestionsDetails(details);
if(dataMap != null){
Map scoreBreakdownMap = (Map) dataMap.get("score_breakdown");
if (scoreBreakdownMap != null) {
Map assessmentMap = (Map) scoreBreakdownMap.get("assessment");
if (assessmentMap != null) {
dto.setAssessmentScore(assessmentMap.get("score").toString());
dto.setAssessmentLevel(assessmentMap.get("score").toString());
List<String> details = (List<String>) assessmentMap.get("details");
dto.setAssessmentDetails(details);
}
Map ratingMap = (Map) scoreBreakdownMap.get("rating");
if (ratingMap != null) {
dto.setRatingScore(ratingMap.get("score").toString());
dto.setRatingLevel(ratingMap.get("score").toString());
List<String> details = (List<String>) ratingMap.get("details");
dto.setRatingDetails(details);
}
Map questionsMap = (Map) scoreBreakdownMap.get("questions");
if (questionsMap != null) {
dto.setQuestionsScore(questionsMap.get("score").toString());
dto.setQuestionsLevel(questionsMap.get("score").toString());
List<String> details = (List<String>) questionsMap.get("details");
dto.setQuestionsDetails(details);
}
}
}

View File

@@ -277,34 +277,37 @@ public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServi
// HotakeCandidateCompatibilityDto compatibilityDto = aiCommonToolsService.handleCandidateCompatibility(compatibilityVo);
// applyInfo.setCandidateCompatibilityJson(JSONUtil.toJsonStr(compatibilityDto));
// applyInfo.setCandidateCompatibilityScore(compatibilityDto.getOverallScore());
try{
//候选人面试综合评估
HotakeCandidateInterviewEvaluationVo evaluationVo = new HotakeCandidateInterviewEvaluationVo();
//候选人面试综合评估
HotakeCandidateInterviewEvaluationVo evaluationVo = new HotakeCandidateInterviewEvaluationVo();
evaluationVo.setTitle(rolesInf.getRoleName());
evaluationVo.setDescription(rolesInf.getAboutRole());
evaluationVo.setRequiredSkills(rolesInf.getRequiredSkillsJson());
evaluationVo.setPreferredSkills(rolesInf.getNiceToHaveSkillsJson());
evaluationVo.setExperienceRequired(rolesInf.getJobExperience());
HotakeCvInfoDto cvInfoDto = JSONUtil.toBean(applyInfo.getCvTemplateJson(), HotakeCvInfoDto.class);
evaluationVo.setName(cvInfoDto.getName());
evaluationVo.setCurrentPosition(cvInfoDto.getPosition());
evaluationVo.setEmail(cvInfoDto.getEmail());
evaluationVo.setWorkExperience(JSONUtil.toJsonStr(cvInfoDto.getExperience()));
evaluationVo.setSkills(JSONUtil.toJsonStr(cvInfoDto.getSkillsTools()));
evaluationVo.setEducation(JSONUtil.toJsonStr(cvInfoDto.getEducation()));
evaluationVo.setCertifications("");
evaluationVo.setInterviewData("");
evaluationVo.setQuestions("");
evaluationVo.setAnswers("");
evaluationVo.setTechnical("");
evaluationVo.setCommunication("");
evaluationVo.setSafetyAwareness("");
evaluationVo.setProblemSolving("");
evaluationVo.setTitle(rolesInf.getRoleName());
evaluationVo.setDescription(rolesInf.getAboutRole());
evaluationVo.setRequiredSkills(rolesInf.getRequiredSkillsJson());
evaluationVo.setPreferredSkills(rolesInf.getNiceToHaveSkillsJson());
evaluationVo.setExperienceRequired(rolesInf.getJobExperience());
HotakeCvInfoDto cvInfoDto = JSONUtil.toBean(applyInfo.getCvTemplateJson(), HotakeCvInfoDto.class);
evaluationVo.setName(cvInfoDto.getName());
evaluationVo.setCurrentPosition(cvInfoDto.getPosition());
evaluationVo.setEmail(cvInfoDto.getEmail());
evaluationVo.setWorkExperience(JSONUtil.toJsonStr(cvInfoDto.getExperience()));
evaluationVo.setSkills(JSONUtil.toJsonStr(cvInfoDto.getSkillsTools()));
evaluationVo.setEducation(JSONUtil.toJsonStr(cvInfoDto.getEducation()));
evaluationVo.setCertifications("");
evaluationVo.setInterviewData("");
evaluationVo.setQuestions("");
evaluationVo.setAnswers("");
evaluationVo.setTechnical("");
evaluationVo.setCommunication("");
evaluationVo.setSafetyAwareness("");
evaluationVo.setProblemSolving("");
HotakeCandidateInterviewEvaluationDto evaluationDto = aiCommonToolsService.getCandidateInterviewEvaluation(evaluationVo);
applyInfo.setEvaluationJson(JSONUtil.toJsonStr(evaluationDto));
applyInfo.setEvaluationScore(new BigDecimal(evaluationDto.getOverallScore()));
HotakeCandidateInterviewEvaluationDto evaluationDto = aiCommonToolsService.getCandidateInterviewEvaluation(evaluationVo);
applyInfo.setEvaluationJson(JSONUtil.toJsonStr(evaluationDto));
applyInfo.setEvaluationScore(new BigDecimal(evaluationDto.getOverallScore()));
}catch (Exception e){
e.printStackTrace();
}
applyInfo.setRecruiterId(rolesInf.getRecruiterId());
applyInfo.setStage(StageEnum.APPLIED.getCode());