Update README.md to include comprehensive documentation for ThinkPHP 8, featuring installation instructions, new features, sponsorship details, and links to resources.

This commit is contained in:
杨志
2026-01-05 10:10:51 +08:00
parent 66242a9e21
commit e41dd33d23
49 changed files with 2439 additions and 2 deletions

123
test_match_new.php Normal file
View File

@@ -0,0 +1,123 @@
<?php
// 测试新的岗位简历匹配度计算机制
require __DIR__ . '/vendor/autoload.php';
// 岗位信息
$position = [
"id" => 1,
"base_info" => [
"岗位名称" => "人工智能与大数据侦察职位一",
"招考单位" => "市级公安机关",
"招录人数" => "10",
"岗位代码" => "45150001"
],
"position_info" => [
"岗位名称" => "人工智能与大数据侦察职位一",
"招考单位" => "市级公安机关",
"招录人数" => "10",
"岗位代码" => "45150001",
"备注" => "考生按照总成绩由高到低的顺序依次在对应的职位计划表中选择具体工作岗位。",
"招录机关" => "自治区公安厅",
"职位序号" => "1",
"职位简介" => "从事公安机关人工智能研发、大数据系统建设管理、数据信息挖掘及分析研判等专业技术工作。"
],
"position_require" => [
"学历要求" => "本科及以上",
"学位要求" => "学士及以上",
"年龄要求" => "18周岁以上、35周岁以下。",
"回避要求" => "报考人员不得报考与市公安局领导班子成员、内设机构领导班子成员(如刑侦支队支队长、副支队长等)存在规定回避情形的职位(回避情形含夫妻关系、直系血亲关系、三代以内旁系血亲关系以及近姻亲关系)。",
"专业资格条件" => "曾参加人工智能、大数据、计算机领域竞赛,获个人三等奖或团体三等奖及以上,提供官方证明文件。",
"其他资格条件" => "适合男性。符合人民警察录用条件。单侧矫正视力低于5.0不合格。",
"专业(学科)类别" => "计算机科学与技术类,电气、电子及自动化类"
]
];
// 简历信息
$resume = [
"user_id" => 527,
"birth_date" => "1989-03-01",
"gender" => "",
"ethnicity" => "汉族",
"work_experience" => "无基层工作年限",
"education" => [
[
"id" => 1,
"education_level" => "普通本科",
"degree" => "学士",
"majors_name" => "逻辑学"
],
[
"id" => 2,
"education_level" => "硕士研究生",
"degree" => "硕士",
"majors_name" => "伦理学"
]
]
];
// 加载ThinkPHP框架
$app = new think\App();
$app->initialize();
// 创建匹配服务实例
$matchService = new app\service\MatchService();
// 计算匹配度
$result = $matchService->calculateMatchScore($position, $resume);
// 输出结果
echo "========================================\n";
echo "岗位简历匹配度测试结果(新机制)\n";
echo "========================================\n\n";
echo "【硬性条件检查结果】\n";
echo "----------------------------------------\n";
if ($result['qualified']) {
echo "✓ 通过硬性条件筛选\n\n";
foreach ($result['hard_requirements']['details'] as $key => $detail) {
if (isset($detail['passed'])) {
$status = $detail['passed'] ? '✓' : '✗';
echo "{$status} {$key}: ";
if ($detail['passed']) {
echo "通过 (要求: {$detail['required']}, 实际: {$detail['actual']})\n";
} else {
echo "不通过 - {$detail['reason']}\n";
}
}
}
} else {
echo "✗ 未通过硬性条件筛选\n\n";
echo "不通过原因:\n";
foreach ($result['rejection_reasons'] as $reason) {
echo " - {$reason}\n";
}
echo "\n详细检查结果:\n";
foreach ($result['hard_requirements']['details'] as $key => $detail) {
if (isset($detail['passed'])) {
$status = $detail['passed'] ? '✓' : '✗';
echo "{$status} {$key}: ";
if ($detail['passed']) {
echo "通过 (要求: {$detail['required']}, 实际: {$detail['actual']})\n";
} else {
echo "不通过 - {$detail['reason']}\n";
}
}
}
}
echo "\n【软性条件评分结果】\n";
echo "----------------------------------------\n";
if ($result['qualified']) {
echo "总分: {$result['score']}/{$result['soft_requirements']['max_score']}\n\n";
foreach ($result['soft_requirements']['details'] as $key => $detail) {
echo "{$key}: {$detail['score']}/{$detail['max_score']}分 - {$detail['reason']}\n";
}
} else {
echo "(未通过硬性条件筛选,不进行软性条件评分)\n";
}
echo "\n========================================\n";
echo "最终结果: " . ($result['qualified'] ? "✓ 符合条件,匹配度 {$result['score']}/100分" : "✗ 不符合条件") . "\n";
echo "========================================\n";