v1.0.50: 碎片处理6项修改 - 1)硬数据板块改名为「硬数据碎片新增与处理」;2)硬数据彻底移除「状态」字段(查看弹窗/数据表status列/列表接口全部删除,已转换以converted_id非空标识,preliminary旧页同步清理);3)硬数据操作列「继续补全」改「手动补全」+新增「AI补全」占位;4)软数据操作列「补全」改「手动补全」+新增「AI补全」占位;5)硬数据「废弃」改为从preliminary_data彻底硬删除;6)人员性别枚举收敛为男/女/未知(迁移归并其他/保密)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* 硬碎片列表接口 GET /api/fragment/hard_list.php
|
||||
* 参数:page / limit / source_type / status / source_channel / keyword
|
||||
* 参数:page / limit / source_type / source_channel / keyword
|
||||
* 返回:{ list, total, page, limit },每行含完整度 score、缺失层级、内容摘要
|
||||
* 说明:v1.0.50 起移除 status 字段(查看弹窗/数据表均不再展示状态),列表仅返回未转换(converted_id IS NULL)记录
|
||||
*/
|
||||
require_once __DIR__ . '/../common/db.php';
|
||||
require_once __DIR__ . '/../common/response.php';
|
||||
@@ -13,18 +14,16 @@ checkPermission('preliminary');
|
||||
|
||||
[$page, $limit] = pageParams();
|
||||
$keyword = trim($_REQUEST['keyword'] ?? '');
|
||||
$status = trim($_REQUEST['status'] ?? '');
|
||||
$sourceType = trim($_REQUEST['source_type'] ?? '');
|
||||
$sourceChannel = trim($_REQUEST['source_channel'] ?? '');
|
||||
|
||||
$where = ["is_active = 1", "status NOT IN ('已转换','已废弃')"];
|
||||
$where = ["is_active = 1", "converted_id IS NULL"];
|
||||
$params = [];
|
||||
if ($keyword !== '') {
|
||||
$where[] = '(company_name LIKE ? OR person_name LIKE ? OR contact_phone LIKE ? OR contact_email LIKE ? OR description LIKE ?)';
|
||||
$like = "%$keyword%";
|
||||
array_push($params, $like, $like, $like, $like, $like);
|
||||
}
|
||||
if ($status !== '') { $where[] = 'status = ?'; $params[] = $status; }
|
||||
if ($sourceType !== '') { $where[] = 'source_type = ?'; $params[] = $sourceType; }
|
||||
if ($sourceChannel !== '') { $where[] = 'source_channel = ?'; $params[] = $sourceChannel; }
|
||||
$whereSql = implode(' AND ', $where);
|
||||
@@ -39,7 +38,7 @@ $offset = ($page - 1) * $limit;
|
||||
$stmt = $pdo->prepare(
|
||||
"SELECT id, source_type, company_name, industry, registration_number, business_role, country, address,
|
||||
person_name, contact_phone, contact_email, work_location, id_number, platform, account_id, profile_url,
|
||||
status, source_channel, recorded_by,
|
||||
source_channel, recorded_by,
|
||||
follow_person, converted_type, converted_id, created_at, updated_at
|
||||
FROM preliminary_data
|
||||
WHERE $whereSql
|
||||
|
||||
Reference in New Issue
Block a user