'preliminary']); require_once __DIR__ . '/hard_common.php'; $id = (int)($_REQUEST['id'] ?? 0); if ($id <= 0) { Response::error('参数错误', 400); } $pdo = DB::getInstance()->getPdo(); $stmt = $pdo->prepare("SELECT * FROM preliminary_data WHERE id = ?"); $stmt->execute([$id]); $row = $stmt->fetch(); if (!$row) { Response::error('碎片不存在'); } $calc = hardCompleteness($row); $row['completeness'] = $calc['score']; $row['missing'] = $calc['missing']; $row['summary'] = hardSummary($row); $row['source_type_label'] = ['company' => '企业', 'person' => '人员', 'product' => '产品', 'need' => '需求', 'mixed' => '混合'][$row['source_type']] ?? $row['source_type']; Response::success($row);