v1.0.30: companies 表删除 name_en(英文名称)字段及全部关联 - 迁移SQL+helpers白名单+add/import/export/list+person关联查询(companies/company_options/products)+completeness核心层与标签+company.js搜索/筛选/列表/详情

This commit is contained in:
nanguaboss
2026-08-09 21:46:43 +08:00
parent e2ae1f967e
commit 13e7b2180e
13 changed files with 34 additions and 26 deletions
+3 -3
View File
@@ -29,7 +29,7 @@ if (!$idList) {
$pdo = DB::getInstance()->getPdo();
$in = implode(',', array_fill(0, count($idList), '?'));
$stmt = $pdo->prepare(
"SELECT id, name_zh, name_en, business_role, country, registration_number,
"SELECT id, name_zh, business_role, country, registration_number,
address, legal_representative, industry, industry_subdivision, website,
registered_capital, established_date, latest_employee_count, latest_annual_revenue,
is_listed, stock_code, source_channel, source_detail, created_at
@@ -44,10 +44,10 @@ header('Content-Type: text/csv; charset=utf-8');
header('Content-Disposition: attachment; filename="companies_' . date('Ymd_His') . '.csv"');
echo "\xEF\xBB\xBF"; // UTF-8 BOM,便于 Excel 直接打开
$out = fopen('php://output', 'w');
fputcsv($out, ['ID', '公司名称', '英文名称', '业务角色', '国家/地区', '注册号', '地址', '法人', '行业', '行业细分', '官网', '注册资本', '成立日期', '员工数', '年营收', '是否上市', '股票代码', '来源渠道', '来源详情', '创建时间']);
fputcsv($out, ['ID', '公司名称', '业务角色', '国家/地区', '注册号', '地址', '法人', '行业', '行业细分', '官网', '注册资本', '成立日期', '员工数', '年营收', '是否上市', '股票代码', '来源渠道', '来源详情', '创建时间']);
foreach ($list as $r) {
fputcsv($out, [
$r['id'], $r['name_zh'], $r['name_en'], $r['business_role'],
$r['id'], $r['name_zh'], $r['business_role'],
$r['country'], $r['registration_number'], $r['address'], $r['legal_representative'],
$r['industry'], $r['industry_subdivision'], $r['website'], $r['registered_capital'],
$r['established_date'], $r['latest_employee_count'], $r['latest_annual_revenue'],