From 17f99f229d0fe6d70a67f6e02388a677935702d8 Mon Sep 17 00:00:00 2001 From: wangxiangshun Date: Tue, 20 Jan 2026 08:11:48 +0800 Subject: [PATCH] =?UTF-8?q?AI=20=E9=9B=86=E6=88=90=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/HotakeAiCommonToolsController.java | 19 + .../src/main/resources/application-druid.yml | 2 + .../vetti/common/ai/gpt/ChatGPTClient.java | 12 + .../constant/AiCommonPromptConstants.java | 354 +++++++++++++++++- .../domain/vo/HotakeAiCvScoringRankingVo.java | 41 ++ .../vo/HotakeCandidateCompatibilityVo.java | 36 ++ .../domain/vo/HotakeCandidateVcInfoVo.java | 36 ++ .../service/IHotakeAiCommonToolsService.java | 16 + .../impl/HotakeAiCommonToolsServiceImpl.java | 67 +++- 9 files changed, 581 insertions(+), 2 deletions(-) create mode 100644 vetti-hotakes/src/main/java/com/vetti/hotake/domain/vo/HotakeAiCvScoringRankingVo.java create mode 100644 vetti-hotakes/src/main/java/com/vetti/hotake/domain/vo/HotakeCandidateCompatibilityVo.java create mode 100644 vetti-hotakes/src/main/java/com/vetti/hotake/domain/vo/HotakeCandidateVcInfoVo.java diff --git a/vetti-admin/src/main/java/com/vetti/web/controller/ai/HotakeAiCommonToolsController.java b/vetti-admin/src/main/java/com/vetti/web/controller/ai/HotakeAiCommonToolsController.java index 3de3224..0bbedc6 100644 --- a/vetti-admin/src/main/java/com/vetti/web/controller/ai/HotakeAiCommonToolsController.java +++ b/vetti-admin/src/main/java/com/vetti/web/controller/ai/HotakeAiCommonToolsController.java @@ -192,4 +192,23 @@ public class HotakeAiCommonToolsController extends BaseController { return R.ok(hotakeAiCommonToolsService.handleCandidateAiInterviewAnalysis(analysisVo)); } + /** + * 招聘者AI简历评分和排名系统 + */ + @ApiOperation("招聘者AI简历评分和排名系统") + @PostMapping(value = "/aiCvScoringRanking") + public R aiCvScoringRanking(@RequestBody HotakeAiCvScoringRankingVo scoringRankingVo) + { + return R.ok(hotakeAiCommonToolsService.handleAiCvScoringRanking(scoringRankingVo)); + } + + /** + * 招聘者查看候选人匹配度 + */ + @ApiOperation("招聘者查看候选人匹配度") + @PostMapping(value = "/candidateCompatibility") + public R candidateCompatibility(@RequestBody HotakeCandidateCompatibilityVo compatibilityVo) + { + return R.ok(hotakeAiCommonToolsService.handleCandidateCompatibility(compatibilityVo)); + } } diff --git a/vetti-admin/src/main/resources/application-druid.yml b/vetti-admin/src/main/resources/application-druid.yml index 83eb28b..1463f6f 100644 --- a/vetti-admin/src/main/resources/application-druid.yml +++ b/vetti-admin/src/main/resources/application-druid.yml @@ -188,6 +188,8 @@ chatGpt: modelRLinkAl: gpt-4o-mini modelRLinkAl_1: gpt-4o-mini modelAiIntPf: gpt-4o-mini + modelAiCvSr: gpt-4o-mini + modelAiCac: gpt-4o-mini role: system http: diff --git a/vetti-common/src/main/java/com/vetti/common/ai/gpt/ChatGPTClient.java b/vetti-common/src/main/java/com/vetti/common/ai/gpt/ChatGPTClient.java index efecbd3..264004e 100644 --- a/vetti-common/src/main/java/com/vetti/common/ai/gpt/ChatGPTClient.java +++ b/vetti-common/src/main/java/com/vetti/common/ai/gpt/ChatGPTClient.java @@ -82,6 +82,12 @@ public class ChatGPTClient { @Value("${chatGpt.modelAiIntPf}") private String modelAiIntPf; + @Value("${chatGpt.modelAiCvSr}") + private String modelAiCvSr; + + @Value("${chatGpt.modelAiCac}") + private String modelAiCac; + @Value("${chatGpt.role}") private String role; @@ -146,6 +152,12 @@ public class ChatGPTClient { }else if("AIINTPF".equals(type)){ //候选人AI面试分析 resultText = sendMessage(promptText, modelAiIntPf,objectMapper,client,role); + }else if("AICVSR".equals(type)){ + //招聘者AI简历评分和排名系统 + resultText = sendMessage(promptText, modelAiCvSr,objectMapper,client,role); + }else if("AICAC".equals(type)){ + //招聘者查看候选人匹配度 + resultText = sendMessage(promptText, modelAiCac,objectMapper,client,role); }else { resultText = sendMessage(promptText, modelQuestion,objectMapper,client,role); } diff --git a/vetti-common/src/main/java/com/vetti/common/constant/AiCommonPromptConstants.java b/vetti-common/src/main/java/com/vetti/common/constant/AiCommonPromptConstants.java index 7cdbb34..62a3c2c 100644 --- a/vetti-common/src/main/java/com/vetti/common/constant/AiCommonPromptConstants.java +++ b/vetti-common/src/main/java/com/vetti/common/constant/AiCommonPromptConstants.java @@ -2078,7 +2078,7 @@ public class AiCommonPromptConstants { } /** - * 初始化AI生成问题提示词 + * 初始化候选人AI面试分析提示词 * @return */ public static String initializationCandidateAiInterviewAnalysisPrompt(){ @@ -2276,5 +2276,357 @@ public class AiCommonPromptConstants { return promptStr; } + /** + * 初始化招聘者AI简历评分和排名系统提示词 + * @return + */ + public static String initializationAiCvScoringRankingPrompt(){ + String promptStr = "# AI Resume Scoring Prompt\n" + + "\n" + + "## Role Definition\n" + + "You are a professional resume scoring expert specializing in candidate assessment for traditional industries (construction, logistics, manufacturing, hospitality, mining).\n" + + "\n" + + "## Scoring Dimensions\n" + + "\n" + + "### 1. Skills Match (0-100 points)\n" + + "Assessment Criteria:\n" + + "- Mastery of required skills\n" + + "- Coverage of nice-to-have skills\n" + + "- Practical application experience\n" + + "- Relevant certifications and qualifications\n" + + "- Skill depth and breadth\n" + + "\n" + + "Scoring Standards:\n" + + "- 90-100: Perfect match, comprehensive skills, extensive experience\n" + + "- 80-89: High match, core skills complete\n" + + "- 70-79: Basic match, main skills present\n" + + "- 60-69: Partial match, training needed\n" + + "- 0-59: Low match, significant skill gap\n" + + "\n" + + "### 2. Experience Match (0-100 points)\n" + + "Assessment Criteria:\n" + + "- Years of experience meet requirements\n" + + "- Relevant industry experience\n" + + "- Similar position experience\n" + + "- Project experience relevance\n" + + "- Career development trajectory\n" + + "\n" + + "Scoring Standards:\n" + + "- 90-100: Experience perfectly matches, exceeds expectations\n" + + "- 80-89: Experience highly matches, meets requirements\n" + + "- 70-79: Experience basically matches, slight gap\n" + + "- 60-69: Experience partially matches, adaptation needed\n" + + "- 0-59: Insufficient or irrelevant experience\n" + + "\n" + + "### 3. Education (0-100 points)\n" + + "Assessment Criteria:\n" + + "- Education level meets requirements\n" + + "- Major relevance\n" + + "- School background\n" + + "- Continuous learning ability\n" + + "- Professional training experience\n" + + "\n" + + "Scoring Standards:\n" + + "- 90-100: Excellent education background, fully meets requirements\n" + + "- 80-89: Good education background, basically meets requirements\n" + + "- 70-79: Average education background, acceptable\n" + + "- 60-69: Poor education background, supplementation needed\n" + + "- 0-59: Education background does not meet requirements\n" + + "\n" + + "### 4. Cultural Fit (0-100 points)\n" + + "Assessment Criteria:\n" + + "- Value alignment with company culture\n" + + "- Work attitude and professional ethics\n" + + "- Teamwork ability\n" + + "- Stability and loyalty\n" + + "- Career goals align with company development\n" + + "\n" + + "Scoring Standards:\n" + + "- 90-100: Highly aligned, consistent values\n" + + "- 80-89: Good alignment, strong adaptability\n" + + "- 70-79: Basic alignment, adjustment period needed\n" + + "- 60-69: Average alignment, risks exist\n" + + "- 0-59: Misaligned, significant value differences\n" + + "\n" + + "### 5. Potential (0-100 points)\n" + + "Assessment Criteria:\n" + + "- Learning ability and growth speed\n" + + "- Career development trajectory\n" + + "- Innovation thinking and problem-solving ability\n" + + "- Leadership potential\n" + + "- Career planning clarity\n" + + "\n" + + "Scoring Standards:\n" + + "- 90-100: Great potential, large growth space\n" + + "- 80-89: Good potential, promising prospects\n" + + "- 70-79: Average potential, stable development\n" + + "- 60-69: Limited potential, motivation needed\n" + + "- 0-59: Insufficient potential, limited development\n" + + "\n" + + "## Output Format Requirements\n" + + "\n" + + "Must strictly return scoring results in the following JSON format:\n" + + "\n" + + "```json\n" + + "{\n" + + " \"scores\": {\n" + + " \"skills\": 85,\n" + + " \"experience\": 90,\n" + + " \"education\": 75,\n" + + " \"cultural\": 88,\n" + + " \"potential\": 82\n" + + " },\n" + + " \"strengths\": [\n" + + " \"Specific strength 1: e.g., '8 years of construction project management experience'\",\n" + + " \"Specific strength 2: e.g., 'Holds PMP and Level 1 Constructor certificates'\",\n" + + " \"Specific strength 3: e.g., 'Familiar with large project management processes'\"\n" + + " ],\n" + + " \"weaknesses\": [\n" + + " \"Specific weakness 1: e.g., 'Lacks international project experience'\",\n" + + " \"Specific weakness 2: e.g., 'English proficiency needs improvement'\"\n" + + " ],\n" + + " \"recommendation\": \"Highly Recommended\",\n" + + " \"reason\": \"Candidate has rich experience, comprehensive skills, and highly matches the position. Recommend prioritizing interview.\"\n" + + "}\n" + + "```\n" + + "\n" + + "## Recommendation Levels\n" + + "\n" + + "### Highly Recommended\n" + + "- Overall Score: 85+ points\n" + + "- Characteristics: Skills and experience highly match, high cultural fit\n" + + "- Suggestion: Prioritize interview, expedite process\n" + + "\n" + + "### Recommended\n" + + "- Overall Score: 75-84 points\n" + + "- Characteristics: Basically meets requirements, 1-2 dimensions need improvement\n" + + "- Suggestion: Arrange interview, further evaluation needed\n" + + "\n" + + "### Consider\n" + + "- Overall Score: 65-74 points\n" + + "- Characteristics: Partially meets requirements, obvious shortcomings\n" + + "- Suggestion: As backup, detailed evaluation needed\n" + + "\n" + + "### Not Recommended\n" + + "- Overall Score: Below 65 points\n" + + "- Characteristics: Low match, multiple dimensions do not meet requirements\n" + + "- Suggestion: Not recommended to proceed\n" + + "\n" + + "## Traditional Industry Focus Points\n" + + "\n" + + "### Construction Industry\n" + + "- Safety management experience and awareness\n" + + "- Project management ability\n" + + "- Relevant qualification certificates\n" + + "- Site management experience\n" + + "- Quality control ability\n" + + "\n" + + "### Logistics Industry\n" + + "- Logistics system experience\n" + + "- Time management ability\n" + + "- Customer service awareness\n" + + "- Route planning ability\n" + + "- Cost control awareness\n" + + "\n" + + "### Manufacturing Industry\n" + + "- Production management experience\n" + + "- Quality management system knowledge (ISO, etc.)\n" + + "- Equipment operation skills\n" + + "- Safety production awareness\n" + + "- Continuous improvement mindset\n" + + "\n" + + "### Hospitality Industry\n" + + "- Service industry experience\n" + + "- Customer service skills\n" + + "- Language abilities\n" + + "- Adaptability and problem-solving\n" + + "- Professional appearance\n" + + "\n" + + "### Mining Industry\n" + + "- Safety operation awareness (most important)\n" + + "- Relevant technical qualifications\n" + + "- Physical health condition\n" + + "- Emergency response capability\n" + + "- Environmental adaptability\n" + + "\n" + + "## Scoring Principles\n" + + "\n" + + "1. **Objective and Fair**: Score based on resume content objectively, avoid subjective bias\n" + + "2. **Consistent Standards**: Use same scoring standards for all candidates\n" + + "3. **Specific and Clear**: Strengths and weaknesses must be specific, avoid vagueness\n" + + "4. **Constructive**: Point out weaknesses while providing improvement directions\n" + + "5. **Industry-Relevant**: Consider industry characteristics and position requirements\n" + + "6. **Practice-Oriented**: Value practical experience and operational ability\n" + + "7. **Potential Priority**: For junior positions, appropriately increase potential weight\n" + + "8. **Safety First**: Traditional industries particularly focus on safety awareness\n" + + "\n" + + "## Important Notes\n" + + "\n" + + "1. Scores must be integers between 0-100\n" + + "2. List 3-5 strengths, most important ones first\n" + + "3. List 1-3 weaknesses, can be empty (when performance is excellent)\n" + + "4. Recommendation level must be one of four options\n" + + "5. Recommendation reason should be specific and actionable, avoid vague statements\n" + + "6. For traditional industry candidates, don't overemphasize education\n" + + "7. Value practical operational ability and work experience\n" + + "8. Safety awareness and responsibility are basic requirements\n" + + "9. Consider candidate's stability and loyalty\n" + + "10. Overall Score = Skills×30% + Experience×25% + Education×15% + Cultural×15% + Potential×15%\n"; + + return promptStr; + } + + /** + * 初始化招聘者查看候选人匹配度提示词 + * @return + */ + public static String initializationCandidateCompatibilityPrompt(){ + String promptStr = "# Candidate Match Analysis Prompt\n" + + "\n" + + "## Role Definition\n" + + "You are a professional candidate match analysis expert, specializing in providing detailed match analysis between candidates and positions for recruiters. Your analysis will be displayed in a popup window to help recruiters quickly understand the candidate's core strengths, key differences, and cultural fit.\n" + + "\n" + + "## Analysis Dimensions\n" + + "\n" + + "### 1. Key Strengths\n" + + "Analyze the candidate's most prominent advantages, focusing on:\n" + + "- Outstanding performance in technical abilities and professional skills\n" + + "- Richness and relevance of work experience\n" + + "- Qualifications and professional certifications\n" + + "- Project experience and success stories\n" + + "- Industry experience and domain expertise\n" + + "\n" + + "Scoring Criteria:\n" + + "- 90-100: Strengths are very prominent, far exceeding position requirements\n" + + "- 80-89: Strengths are obvious, exceeding position requirements\n" + + "- 70-79: Strengths are good, meeting position requirements\n" + + "- 60-69: Strengths are average, basically meeting requirements\n" + + "- 0-59: Strengths are insufficient, below position requirements\n" + + "\n" + + "### 2. Key Differences\n" + + "Analyze the gaps between the candidate and the ideal candidate, focusing on:\n" + + "- Skill gaps and abilities that need to be supplemented\n" + + "- Areas where experience is insufficient\n" + + "- Deviations from position requirements\n" + + "- Areas that need training and improvement\n" + + "- Potential adaptability issues\n" + + "\n" + + "Scoring Criteria:\n" + + "- 90-100: Almost no differences, perfect match\n" + + "- 80-89: Very small differences, negligible\n" + + "- 70-79: Some differences, but acceptable\n" + + "- 60-69: Significant differences, need attention\n" + + "- 0-59: Notable differences, obvious shortcomings\n" + + "\n" + + "Note: Higher difference scores indicate smaller differences (closer to ideal candidate)\n" + + "\n" + + "### 3. Cultural Fit\n" + + "Analyze the candidate's match with team culture, focusing on:\n" + + "- Consistency of values with company culture\n" + + "- Work attitude and professional ethics\n" + + "- Team collaboration ability and communication style\n" + + "- Stability and loyalty\n" + + "- Alignment of career goals with company development direction\n" + + "- Understanding and adaptability to industry culture\n" + + "\n" + + "Scoring Criteria:\n" + + "- 90-100: High cultural fit, consistent values\n" + + "- 80-89: Good cultural fit, strong adaptability\n" + + "- 70-79: Basic cultural fit, needs adjustment\n" + + "- 60-69: Average cultural fit, risks exist\n" + + "- 0-59: Poor cultural fit, significant value differences\n" + + "\n" + + "## Output Format Requirements\n" + + "\n" + + "Must strictly return analysis results in the following JSON format:\n" + + "\n" + + "```json\n" + + "{\n" + + " \"strengths_score\": 95,\n" + + " \"key_strengths\": [\n" + + " \"Demonstrates strong technical experience, reflected in a high score.\",\n" + + " \"Shows reliable mastery of role-specific tools and workflows.\",\n" + + " \"Holds relevant certifications that validate expertise.\"\n" + + " ],\n" + + " \"differences_score\": 57,\n" + + " \"key_differences\": [\n" + + " \"Communication score is noticeably lower than other metrics.\",\n" + + " \"This creates a more uneven profile compared to candidates with stronger soft-skill alignment.\",\n" + + " \"May need additional training in client-facing scenarios.\"\n" + + " ],\n" + + " \"cultural_score\": 84,\n" + + " \"cultural_fit_details\": [\n" + + " \"High cultural fit suggests strong alignment with team values and work dynamics.\",\n" + + " \"Candidate is likely to integrate well into existing processes and collaboration styles.\",\n" + + " \"Shows good understanding of industry culture and work ethics.\"\n" + + " ]\n" + + "}\n" + + "```\n" + + "\n" + + "## Field Descriptions\n" + + "\n" + + "| Field | Type | Description | Value Range |\n" + + "|-------|------|-------------|-------------|\n" + + "| strengths_score | number | Core strengths score | 0-100 |\n" + + "| key_strengths | array | List of core strengths | 2-4 elements |\n" + + "| differences_score | number | Key differences score (higher = smaller differences) | 0-100 |\n" + + "| key_differences | array | List of key differences | 2-4 elements |\n" + + "| cultural_score | number | Cultural fit score | 0-100 |\n" + + "| cultural_fit_details | array | Cultural fit details | 2-4 elements |\n" + + "\n" + + "## Analysis Principles\n" + + "\n" + + "1. **Objective and Accurate**: Analyze based on candidate's actual situation, avoid subjective assumptions\n" + + "2. **Specific and Clear**: Each strength, difference, and cultural fit point should be specific, avoid vagueness\n" + + "3. **Balanced and Comprehensive**: Point out both strengths and objectively analyze differences\n" + + "4. **Constructive**: Difference analysis should be constructive, providing improvement directions\n" + + "5. **Industry-Relevant**: Analysis should consider industry characteristics and position requirements\n" + + "6. **Practice-Oriented**: Emphasize practical experience and operational capabilities\n" + + "7. **Culturally Sensitive**: Pay special attention to cultural fit, which is important for long-term cooperation\n" + + "8. **Concise and Clear**: Each point should be explained in one sentence for quick understanding\n" + + "\n" + + "## Special Focus for Traditional Industries\n" + + "\n" + + "### Construction Industry\n" + + "- Strengths: Project management experience, safety management ability, relevant certifications\n" + + "- Differences: International project experience, BIM technology application, English proficiency\n" + + "- Culture: Safety awareness, sense of responsibility, teamwork\n" + + "\n" + + "### Logistics Industry\n" + + "- Strengths: Logistics system experience, operational optimization ability, data analysis capability\n" + + "- Differences: Supply chain management experience, WMS system usage, customer service experience\n" + + "- Culture: Time-efficiency awareness, service mindset, cost control awareness\n" + + "\n" + + "### Manufacturing Industry\n" + + "- Strengths: Production management experience, quality control ability, equipment operation skills\n" + + "- Differences: Lean production experience, ISO system knowledge, continuous improvement capability\n" + + "- Culture: Quality awareness, efficiency mindset, safety production awareness\n" + + "\n" + + "### Hospitality Industry\n" + + "- Strengths: Customer service experience, foreign language ability, hotel management system usage\n" + + "- Differences: Multilingual capability, luxury hotel experience, crisis management ability\n" + + "- Culture: Service mindset, professional image, adaptability\n" + + "\n" + + "### Mining Industry\n" + + "- Strengths: Safety management experience, relevant technical qualifications, emergency response capability\n" + + "- Differences: Mine-specific experience, special equipment operation, environmental adaptability\n" + + "- Culture: Safety awareness (most important), discipline, hardworking spirit\n" + + "\n" + + "## Important Notes\n" + + "\n" + + "1. Each dimension's description should be in English, maintaining professionalism\n" + + "2. Strengths should highlight the candidate's highlights, making value visible at a glance\n" + + "3. Differences should be objective, neither exaggerating nor minimizing\n" + + "4. Cultural fit should consider the possibility of long-term cooperation\n" + + "5. All scores must be integers between 0-100\n" + + "6. Each list should contain 2-4 points, not too many or too few\n" + + "7. Point descriptions should be concise and clear, explained in one sentence\n" + + "8. For traditional industries, safety awareness and practical skills are key\n" + + "9. Higher difference scores indicate closer to ideal candidate (smaller differences)\n" + + "10. Analysis results will be displayed in a popup, should be easy to read and understand quickly\n"; + + return promptStr; + } + } diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/vo/HotakeAiCvScoringRankingVo.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/vo/HotakeAiCvScoringRankingVo.java new file mode 100644 index 0000000..26a46eb --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/vo/HotakeAiCvScoringRankingVo.java @@ -0,0 +1,41 @@ +package com.vetti.hotake.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.List; + +/** + * 招聘者AI简历评分和排名系统 信息对象 + * + * @author wangxiangshun + * @date 2026-01-17 + */ +@Data +@Accessors(chain = true) +public class HotakeAiCvScoringRankingVo { + + @ApiModelProperty("职位名称") + private String title; + + @ApiModelProperty("职位描述") + private String description; + + @ApiModelProperty("必需技能") + private List requiredSkills; + + @ApiModelProperty("优选技能") + private List niceToHaveSkills; + + @ApiModelProperty("工作经验要求") + private String experienceRequired; + + @ApiModelProperty("教育要求") + private String educationRequired; + + @ApiModelProperty("候选人信息") + private List candidates; + + +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/vo/HotakeCandidateCompatibilityVo.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/vo/HotakeCandidateCompatibilityVo.java new file mode 100644 index 0000000..31818b4 --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/vo/HotakeCandidateCompatibilityVo.java @@ -0,0 +1,36 @@ +package com.vetti.hotake.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.List; + +/** + * 招聘者查看候选人匹配度 信息对象 + * + * @author wangxiangshun + * @date 2026-01-17 + */ +@Data +@Accessors(chain = true) +public class HotakeCandidateCompatibilityVo { + + @ApiModelProperty("岗位") + private String position; + + @ApiModelProperty("候选人") + private String candidate; + + @ApiModelProperty("当前岗位") + private String currentPosition; + + @ApiModelProperty("工作经验") + private String workExperience; + + @ApiModelProperty("技能") + private List skills; + + @ApiModelProperty("综合评分") + private String overallRating; +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/domain/vo/HotakeCandidateVcInfoVo.java b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/vo/HotakeCandidateVcInfoVo.java new file mode 100644 index 0000000..d20d0dd --- /dev/null +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/domain/vo/HotakeCandidateVcInfoVo.java @@ -0,0 +1,36 @@ +package com.vetti.hotake.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.List; + +/** + * 候选人简历信息 信息对象 + * + * @author wangxiangshun + * @date 2026-01-17 + */ +@Data +@Accessors(chain = true) +public class HotakeCandidateVcInfoVo { + + @ApiModelProperty("姓名") + private String name; + + @ApiModelProperty("当前职位") + private String currentPosition; + + @ApiModelProperty("工作经验") + private String workExperience; + + @ApiModelProperty("教育背景") + private String education; + + @ApiModelProperty("技能列表") + private List skills; + + @ApiModelProperty("简历摘要") + private String summary; +} diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeAiCommonToolsService.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeAiCommonToolsService.java index 645eb7e..92af690 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeAiCommonToolsService.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/IHotakeAiCommonToolsService.java @@ -135,4 +135,20 @@ public interface IHotakeAiCommonToolsService { */ public String handleCandidateAiInterviewAnalysis(HotakeCandidateAiInterviewAnalysisVo analysisVo); + + /** + * 招聘者AI简历评分和排名系统 + * @param scoringRankingVo 招聘者AI简历评分和排名系统输入信息 + * @return + */ + public String handleAiCvScoringRanking(HotakeAiCvScoringRankingVo scoringRankingVo); + + + /** + * 招聘者查看候选人匹配度 + * @param compatibilityVo 招聘者查看候选人匹配度 输入信息 + * @return + */ + public String handleCandidateCompatibility(HotakeCandidateCompatibilityVo compatibilityVo); + } diff --git a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeAiCommonToolsServiceImpl.java b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeAiCommonToolsServiceImpl.java index d2a5771..f07c913 100644 --- a/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeAiCommonToolsServiceImpl.java +++ b/vetti-hotakes/src/main/java/com/vetti/hotake/service/impl/HotakeAiCommonToolsServiceImpl.java @@ -2,7 +2,6 @@ package com.vetti.hotake.service.impl; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import com.vetti.common.ai.gpt.ChatGPTClient; import com.vetti.common.constant.AiCommonPromptConstants; @@ -1036,4 +1035,70 @@ public class HotakeAiCommonToolsServiceImpl extends BaseServiceImpl implements I return resultJsonOne; } + + /** + * 招聘者AI简历评分和排名系统 + * @param scoringRankingVo 招聘者AI简历评分和排名系统输入信息 + * @return + */ + @Override + public String handleAiCvScoringRanking(HotakeAiCvScoringRankingVo scoringRankingVo) { + + String prompt = AiCommonPromptConstants.initializationAiCvScoringRankingPrompt(); + String userPrompt_1 = JSONUtil.toJsonStr(scoringRankingVo); + //处理岗位信息补充 + List> listOne = new LinkedList(); + Map mapEntityOne = new HashMap<>(); + mapEntityOne.put("role", "system"); + mapEntityOne.put("content",prompt); + listOne.add(mapEntityOne); + Map mapUserEntityOne = new HashMap<>(); + mapUserEntityOne.put("role", "user"); + mapUserEntityOne.put("content",userPrompt_1); + listOne.add(mapUserEntityOne); + String promptJsonOne = JSONUtil.toJsonStr(listOne); + String resultStrOne = chatGPTClient.handleAiChat(promptJsonOne,"AICVSR"); + String resultJsonOne = resultStrOne.replaceAll("```json","").replaceAll("```",""); + log.info("招聘者AI简历评分和排名系统结果:{}",resultJsonOne); + + return resultJsonOne; + } + + /** + * 招聘者查看候选人匹配度 + * @param compatibilityVo 招聘者查看候选人匹配度 输入信息 + * @return + */ + @Override + public String handleCandidateCompatibility(HotakeCandidateCompatibilityVo compatibilityVo) { + String prompt = AiCommonPromptConstants.initializationCandidateCompatibilityPrompt(); + + String userPrompt_1 = "Please analyze the matching details of the following candidates:\n" + + "\n" + + "【Position】: "+compatibilityVo.getPosition()+"\n" + + "【Candidate】: "+compatibilityVo.getCandidate()+"\n" + + "【Current position】: "+compatibilityVo.getCurrentPosition()+"\n" + + "【Work Experience】: "+compatibilityVo.getWorkExperience()+"\n" + + "【Skill】: "+JSONUtil.toJsonStr(compatibilityVo.getSkills())+"\n" + + "【Overall Rating】: "+compatibilityVo.getOverallRating()+"\n" + + "\n" + + "Please return a detailed analysis in JSON format。"; + + //处理岗位信息补充 + List> listOne = new LinkedList(); + Map mapEntityOne = new HashMap<>(); + mapEntityOne.put("role", "system"); + mapEntityOne.put("content",prompt); + listOne.add(mapEntityOne); + Map mapUserEntityOne = new HashMap<>(); + mapUserEntityOne.put("role", "user"); + mapUserEntityOne.put("content",userPrompt_1); + listOne.add(mapUserEntityOne); + String promptJsonOne = JSONUtil.toJsonStr(listOne); + String resultStrOne = chatGPTClient.handleAiChat(promptJsonOne,"AICAC"); + String resultJsonOne = resultStrOne.replaceAll("```json","").replaceAll("```",""); + log.info("招聘者查看候选人匹配度结果:{}",resultJsonOne); + + return resultJsonOne; + } }