// src/mocks/data/financial.js // 财务数据相关的 Mock 数据 // 生成财务数据 export const generateFinancialData = (stockCode) => { const periods = ['2024-09-30', '2024-06-30', '2024-03-31', '2023-12-31']; return { stockCode, // 股票基本信息 stockInfo: { code: stockCode, name: stockCode === '000001' ? '平安银行' : '示例公司', industry: stockCode === '000001' ? '银行' : '制造业', list_date: '1991-04-03', market: 'SZ' }, // 资产负债表 balanceSheet: periods.map((period, i) => ({ period, total_assets: 5024560 - i * 50000, // 百万元 total_liabilities: 4698880 - i * 48000, shareholders_equity: 325680 - i * 2000, current_assets: 2512300 - i * 25000, non_current_assets: 2512260 - i * 25000, current_liabilities: 3456780 - i * 35000, non_current_liabilities: 1242100 - i * 13000 })), // 利润表 incomeStatement: periods.map((period, i) => ({ period, revenue: 162350 - i * 4000, // 百万元 operating_cost: 45620 - i * 1200, gross_profit: 116730 - i * 2800, operating_profit: 68450 - i * 1500, net_profit: 52860 - i * 1200, eps: 2.72 - i * 0.06 })), // 现金流量表 cashflow: periods.map((period, i) => ({ period, operating_cashflow: 125600 - i * 3000, // 百万元 investing_cashflow: -45300 - i * 1000, financing_cashflow: -38200 + i * 500, net_cashflow: 42100 - i * 1500, cash_ending: 456780 - i * 10000 })), // 财务指标 financialMetrics: periods.map((period, i) => ({ period, roe: 16.23 - i * 0.3, // % roa: 1.05 - i * 0.02, gross_margin: 71.92 - i * 0.5, net_margin: 32.56 - i * 0.3, current_ratio: 0.73 + i * 0.01, quick_ratio: 0.71 + i * 0.01, debt_ratio: 93.52 + i * 0.05, asset_turnover: 0.41 - i * 0.01, inventory_turnover: 0, // 银行无库存 receivable_turnover: 0 // 银行特殊 })), // 主营业务 mainBusiness: { by_product: [ { name: '对公业务', revenue: 68540, ratio: 42.2, yoy_growth: 6.8 }, { name: '零售业务', revenue: 81320, ratio: 50.1, yoy_growth: 11.2 }, { name: '金融市场业务', revenue: 12490, ratio: 7.7, yoy_growth: 3.5 } ], by_region: [ { name: '华南地区', revenue: 56800, ratio: 35.0, yoy_growth: 9.2 }, { name: '华东地区', revenue: 48705, ratio: 30.0, yoy_growth: 8.5 }, { name: '华北地区', revenue: 32470, ratio: 20.0, yoy_growth: 7.8 }, { name: '其他地区', revenue: 24375, ratio: 15.0, yoy_growth: 6.5 } ] }, // 业绩预告 forecast: { period: '2024', forecast_net_profit_min: 580000, // 百万元 forecast_net_profit_max: 620000, yoy_growth_min: 10.0, // % yoy_growth_max: 17.0, forecast_type: '预增', reason: '受益于零售业务快速增长及资产质量改善,预计全年业绩保持稳定增长', publish_date: '2024-10-15' }, // 行业排名 industryRank: { industry: '银行', total_companies: 42, rankings: [ { metric: '总资产', rank: 8, value: 5024560, percentile: 19 }, { metric: '营业收入', rank: 9, value: 162350, percentile: 21 }, { metric: '净利润', rank: 8, value: 52860, percentile: 19 }, { metric: 'ROE', rank: 12, value: 16.23, percentile: 29 }, { metric: '不良贷款率', rank: 18, value: 1.02, percentile: 43 } ] }, // 期间对比 periodComparison: { periods: ['Q3-2024', 'Q2-2024', 'Q1-2024', 'Q4-2023'], metrics: [ { name: '营业收入', unit: '百万元', values: [41500, 40800, 40200, 40850], yoy: [8.2, 7.8, 8.5, 9.2] }, { name: '净利润', unit: '百万元', values: [13420, 13180, 13050, 13210], yoy: [12.5, 11.2, 10.8, 12.3] }, { name: 'ROE', unit: '%', values: [16.23, 15.98, 15.75, 16.02], yoy: [1.2, 0.8, 0.5, 1.0] }, { name: 'EPS', unit: '元', values: [0.69, 0.68, 0.67, 0.68], yoy: [12.3, 11.5, 10.5, 12.0] } ] } }; };