From d86cef9f79fde7cb68de3d63bd96ef371ed0bf68 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Wed, 10 Dec 2025 16:29:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=82=A1=E6=9D=83?= =?UTF-8?q?=E7=BB=93=E6=9E=84=20Mock=20=E6=95=B0=E6=8D=AE=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - actualControl 改为数组格式(支持多个实控人) - concentration 改为数组格式(按季度分组,含 stat_item) - topShareholders 添加 shareholder_rank、end_date、share_nature 字段 - topCirculationShareholders 添加 shareholder_rank、end_date 字段 - 字段名与 ShareholderPanel 组件期望格式统一 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/mocks/data/company.js | 152 +++++++++++++++++++++----------------- 1 file changed, 83 insertions(+), 69 deletions(-) diff --git a/src/mocks/data/company.js b/src/mocks/data/company.js index 5215a568..8aa396ef 100644 --- a/src/mocks/data/company.js +++ b/src/mocks/data/company.js @@ -42,27 +42,33 @@ export const PINGAN_BANK_DATA = { employees: 42099, }, - // 实际控制人信息 - actualControl: { - controller_name: '中国平安保险(集团)股份有限公司', - controller_type: '企业', - shareholding_ratio: 52.38, - control_chain: '中国平安保险(集团)股份有限公司 -> 平安银行股份有限公司', - is_listed: true, - change_date: '2023-12-31', - remark: '中国平安通过直接和间接方式控股平安银行', - }, + // 实际控制人信息(数组格式) + actualControl: [ + { + actual_controller_name: '中国平安保险(集团)股份有限公司', + controller_name: '中国平安保险(集团)股份有限公司', + control_type: '企业法人', + controller_type: '企业', + holding_ratio: 52.38, + holding_shares: 10168542300, + end_date: '2024-09-30', + control_chain: '中国平安保险(集团)股份有限公司 -> 平安银行股份有限公司', + is_listed: true, + remark: '中国平安通过直接和间接方式控股平安银行', + } + ], - // 股权集中度 - concentration: { - top1_ratio: 52.38, - top3_ratio: 58.42, - top5_ratio: 60.15, - top10_ratio: 63.28, - update_date: '2024-09-30', - concentration_level: '高度集中', - herfindahl_index: 0.2845, - }, + // 股权集中度(数组格式,按统计项分组) + concentration: [ + { stat_item: '前1大股东', holding_ratio: 52.38, ratio_change: 0.00, end_date: '2024-09-30' }, + { stat_item: '前3大股东', holding_ratio: 58.42, ratio_change: 0.15, end_date: '2024-09-30' }, + { stat_item: '前5大股东', holding_ratio: 60.15, ratio_change: 0.22, end_date: '2024-09-30' }, + { stat_item: '前10大股东', holding_ratio: 63.28, ratio_change: 0.35, end_date: '2024-09-30' }, + { stat_item: '前1大股东', holding_ratio: 52.38, ratio_change: -0.12, end_date: '2024-06-30' }, + { stat_item: '前3大股东', holding_ratio: 58.27, ratio_change: -0.08, end_date: '2024-06-30' }, + { stat_item: '前5大股东', holding_ratio: 59.93, ratio_change: -0.15, end_date: '2024-06-30' }, + { stat_item: '前10大股东', holding_ratio: 62.93, ratio_change: -0.22, end_date: '2024-06-30' }, + ], // 高管信息 management: [ @@ -128,32 +134,32 @@ export const PINGAN_BANK_DATA = { } ], - // 十大流通股东 + // 十大流通股东(字段名与组件期望格式匹配) topCirculationShareholders: [ - { shareholder_name: '中国平安保险(集团)股份有限公司', shares: 10168542300, ratio: 52.38, change: 0, shareholder_type: '企业' }, - { shareholder_name: '香港中央结算有限公司', shares: 542138600, ratio: 2.79, change: 12450000, shareholder_type: '境外法人' }, - { shareholder_name: '深圳市投资控股有限公司', shares: 382456100, ratio: 1.97, change: 0, shareholder_type: '国有企业' }, - { shareholder_name: '中国证券金融股份有限公司', shares: 298654200, ratio: 1.54, change: -5000000, shareholder_type: '证金公司' }, - { shareholder_name: '中央汇金资产管理有限责任公司', shares: 267842100, ratio: 1.38, change: 0, shareholder_type: '中央汇金' }, - { shareholder_name: '全国社保基金一零三组合', shares: 156234500, ratio: 0.80, change: 23400000, shareholder_type: '社保基金' }, - { shareholder_name: '全国社保基金一零一组合', shares: 142356700, ratio: 0.73, change: 15600000, shareholder_type: '社保基金' }, - { shareholder_name: '中国人寿保险股份有限公司', shares: 128945600, ratio: 0.66, change: 0, shareholder_type: '保险公司' }, - { shareholder_name: 'GIC PRIVATE LIMITED', shares: 98765400, ratio: 0.51, change: -8900000, shareholder_type: '境外法人' }, - { shareholder_name: '挪威中央银行', shares: 87654300, ratio: 0.45, change: 5600000, shareholder_type: '境外法人' } + { shareholder_rank: 1, shareholder_name: '中国平安保险(集团)股份有限公司', holding_shares: 10168542300, circulation_share_ratio: 52.38, shareholder_type: '法人', end_date: '2024-09-30' }, + { shareholder_rank: 2, shareholder_name: '香港中央结算有限公司', holding_shares: 542138600, circulation_share_ratio: 2.79, shareholder_type: 'QFII', end_date: '2024-09-30' }, + { shareholder_rank: 3, shareholder_name: '深圳市投资控股有限公司', holding_shares: 382456100, circulation_share_ratio: 1.97, shareholder_type: '法人', end_date: '2024-09-30' }, + { shareholder_rank: 4, shareholder_name: '中国证券金融股份有限公司', holding_shares: 298654200, circulation_share_ratio: 1.54, shareholder_type: '券商', end_date: '2024-09-30' }, + { shareholder_rank: 5, shareholder_name: '中央汇金资产管理有限责任公司', holding_shares: 267842100, circulation_share_ratio: 1.38, shareholder_type: '法人', end_date: '2024-09-30' }, + { shareholder_rank: 6, shareholder_name: '全国社保基金一零三组合', holding_shares: 156234500, circulation_share_ratio: 0.80, shareholder_type: '社保', end_date: '2024-09-30' }, + { shareholder_rank: 7, shareholder_name: '全国社保基金一零一组合', holding_shares: 142356700, circulation_share_ratio: 0.73, shareholder_type: '社保', end_date: '2024-09-30' }, + { shareholder_rank: 8, shareholder_name: '中国人寿保险股份有限公司', holding_shares: 128945600, circulation_share_ratio: 0.66, shareholder_type: '保险', end_date: '2024-09-30' }, + { shareholder_rank: 9, shareholder_name: 'GIC PRIVATE LIMITED', holding_shares: 98765400, circulation_share_ratio: 0.51, shareholder_type: 'QFII', end_date: '2024-09-30' }, + { shareholder_rank: 10, shareholder_name: '挪威中央银行', holding_shares: 87654300, circulation_share_ratio: 0.45, shareholder_type: 'QFII', end_date: '2024-09-30' } ], - // 十大股东 + // 十大股东(字段名与组件期望格式匹配) topShareholders: [ - { shareholder_name: '中国平安保险(集团)股份有限公司', shares: 10168542300, ratio: 52.38, change: 0, shareholder_type: '企业', is_restricted: false }, - { shareholder_name: '香港中央结算有限公司', shares: 542138600, ratio: 2.79, change: 12450000, shareholder_type: '境外法人', is_restricted: false }, - { shareholder_name: '深圳市投资控股有限公司', shares: 382456100, ratio: 1.97, change: 0, shareholder_type: '国有企业', is_restricted: false }, - { shareholder_name: '中国证券金融股份有限公司', shares: 298654200, ratio: 1.54, change: -5000000, shareholder_type: '证金公司', is_restricted: false }, - { shareholder_name: '中央汇金资产管理有限责任公司', shares: 267842100, ratio: 1.38, change: 0, shareholder_type: '中央汇金', is_restricted: false }, - { shareholder_name: '全国社保基金一零三组合', shares: 156234500, ratio: 0.80, change: 23400000, shareholder_type: '社保基金', is_restricted: false }, - { shareholder_name: '全国社保基金一零一组合', shares: 142356700, ratio: 0.73, change: 15600000, shareholder_type: '社保基金', is_restricted: false }, - { shareholder_name: '中国人寿保险股份有限公司', shares: 128945600, ratio: 0.66, change: 0, shareholder_type: '保险公司', is_restricted: false }, - { shareholder_name: 'GIC PRIVATE LIMITED', shares: 98765400, ratio: 0.51, change: -8900000, shareholder_type: '境外法人', is_restricted: false }, - { shareholder_name: '挪威中央银行', shares: 87654300, ratio: 0.45, change: 5600000, shareholder_type: '境外法人', is_restricted: false } + { shareholder_rank: 1, shareholder_name: '中国平安保险(集团)股份有限公司', holding_shares: 10168542300, total_share_ratio: 52.38, shareholder_type: '法人', share_nature: '流通A股', end_date: '2024-09-30' }, + { shareholder_rank: 2, shareholder_name: '香港中央结算有限公司', holding_shares: 542138600, total_share_ratio: 2.79, shareholder_type: 'QFII', share_nature: '流通A股', end_date: '2024-09-30' }, + { shareholder_rank: 3, shareholder_name: '深圳市投资控股有限公司', holding_shares: 382456100, total_share_ratio: 1.97, shareholder_type: '法人', share_nature: '流通A股', end_date: '2024-09-30' }, + { shareholder_rank: 4, shareholder_name: '中国证券金融股份有限公司', holding_shares: 298654200, total_share_ratio: 1.54, shareholder_type: '券商', share_nature: '流通A股', end_date: '2024-09-30' }, + { shareholder_rank: 5, shareholder_name: '中央汇金资产管理有限责任公司', holding_shares: 267842100, total_share_ratio: 1.38, shareholder_type: '法人', share_nature: '流通A股', end_date: '2024-09-30' }, + { shareholder_rank: 6, shareholder_name: '全国社保基金一零三组合', holding_shares: 156234500, total_share_ratio: 0.80, shareholder_type: '社保', share_nature: '流通A股', end_date: '2024-09-30' }, + { shareholder_rank: 7, shareholder_name: '全国社保基金一零一组合', holding_shares: 142356700, total_share_ratio: 0.73, shareholder_type: '社保', share_nature: '流通A股', end_date: '2024-09-30' }, + { shareholder_rank: 8, shareholder_name: '中国人寿保险股份有限公司', holding_shares: 128945600, total_share_ratio: 0.66, shareholder_type: '保险', share_nature: '流通A股', end_date: '2024-09-30' }, + { shareholder_rank: 9, shareholder_name: 'GIC PRIVATE LIMITED', holding_shares: 98765400, total_share_ratio: 0.51, shareholder_type: 'QFII', share_nature: '流通A股', end_date: '2024-09-30' }, + { shareholder_rank: 10, shareholder_name: '挪威中央银行', holding_shares: 87654300, total_share_ratio: 0.45, shareholder_type: 'QFII', share_nature: '流通A股', end_date: '2024-09-30' } ], // 分支机构 @@ -998,23 +1004,29 @@ export const generateCompanyData = (stockCode, stockName = '示例公司') => { business_scope: '电子产品、通信设备、计算机软硬件的研发、生产、销售;技术咨询、技术服务;货物进出口、技术进出口。', employees: employeeCount, }, - actualControl: { - controller_name: '某控股集团有限公司', - controller_type: '企业', - shareholding_ratio: 35.5, - control_chain: `某控股集团有限公司 -> ${stockName}股份有限公司`, - is_listed: false, - change_date: '2023-12-31', - }, - concentration: { - top1_ratio: 35.5, - top3_ratio: 52.3, - top5_ratio: 61.8, - top10_ratio: 72.5, - update_date: '2024-09-30', - concentration_level: '适度集中', - herfindahl_index: 0.1856, - }, + actualControl: [ + { + actual_controller_name: '某控股集团有限公司', + controller_name: '某控股集团有限公司', + control_type: '企业法人', + controller_type: '企业', + holding_ratio: 35.5, + holding_shares: 1560000000, + end_date: '2024-09-30', + control_chain: `某控股集团有限公司 -> ${stockName}股份有限公司`, + is_listed: false, + } + ], + concentration: [ + { stat_item: '前1大股东', holding_ratio: 35.5, ratio_change: 0.12, end_date: '2024-09-30' }, + { stat_item: '前3大股东', holding_ratio: 52.3, ratio_change: 0.25, end_date: '2024-09-30' }, + { stat_item: '前5大股东', holding_ratio: 61.8, ratio_change: 0.18, end_date: '2024-09-30' }, + { stat_item: '前10大股东', holding_ratio: 72.5, ratio_change: 0.32, end_date: '2024-09-30' }, + { stat_item: '前1大股东', holding_ratio: 35.38, ratio_change: -0.08, end_date: '2024-06-30' }, + { stat_item: '前3大股东', holding_ratio: 52.05, ratio_change: -0.15, end_date: '2024-06-30' }, + { stat_item: '前5大股东', holding_ratio: 61.62, ratio_change: -0.10, end_date: '2024-06-30' }, + { stat_item: '前10大股东', holding_ratio: 72.18, ratio_change: -0.20, end_date: '2024-06-30' }, + ], management: [ { name: '张三', position: '董事长', gender: '男', age: 55, education: '硕士', annual_compensation: 320.5, status: 'active' }, { name: '李四', position: '总经理', gender: '男', age: 50, education: '硕士', annual_compensation: 280.3, status: 'active' }, @@ -1023,19 +1035,21 @@ export const generateCompanyData = (stockCode, stockName = '示例公司') => { { name: '钱七', position: '技术总监', gender: '男', age: 42, education: '博士', annual_compensation: 250.8, status: 'active' }, ], topCirculationShareholders: Array(10).fill(null).map((_, i) => ({ - shareholder_name: `股东${i + 1}`, - shares: Math.floor(Math.random() * 100000000), - ratio: parseFloat(((10 - i) * 0.8 + Math.random() * 2).toFixed(2)), - change: Math.floor(Math.random() * 10000000) - 5000000, - shareholder_type: i < 3 ? '企业' : (i < 6 ? '个人' : '机构') + shareholder_rank: i + 1, + shareholder_name: `流通股东${i + 1}`, + holding_shares: Math.floor(Math.random() * 100000000) + 10000000, + circulation_share_ratio: parseFloat(((10 - i) * 0.8 + Math.random() * 2).toFixed(2)), + shareholder_type: i < 3 ? '法人' : (i < 5 ? '基金' : (i < 7 ? '社保' : 'QFII')), + end_date: '2024-09-30' })), topShareholders: Array(10).fill(null).map((_, i) => ({ + shareholder_rank: i + 1, shareholder_name: `股东${i + 1}`, - shares: Math.floor(Math.random() * 100000000), - ratio: parseFloat(((10 - i) * 0.8 + Math.random() * 2).toFixed(2)), - change: Math.floor(Math.random() * 10000000) - 5000000, - shareholder_type: i < 3 ? '企业' : (i < 6 ? '个人' : '机构'), - is_restricted: i < 2 + holding_shares: Math.floor(Math.random() * 100000000) + 10000000, + total_share_ratio: parseFloat(((10 - i) * 0.8 + Math.random() * 2).toFixed(2)), + shareholder_type: i < 3 ? '法人' : (i < 5 ? '基金' : (i < 7 ? '社保' : 'QFII')), + share_nature: i < 2 ? '限售股' : '流通A股', + end_date: '2024-09-30' })), branches: [ { name: '北京分公司', address: '北京市朝阳区某路123号', phone: '010-12345678', type: '分公司', establish_date: '2012-05-01' },