更新Company页面的UI为FUI风格
This commit is contained in:
17
app.py
17
app.py
@@ -8686,6 +8686,8 @@ def get_stock_quote_detail(stock_code):
|
||||
'eps': None,
|
||||
'market_cap': None,
|
||||
'circ_mv': None,
|
||||
'total_shares': None, # 发行总股本(亿股)
|
||||
'float_shares': None, # 流通股本(亿股)
|
||||
'turnover_rate': None,
|
||||
'week52_high': None,
|
||||
'week52_low': None,
|
||||
@@ -8746,9 +8748,22 @@ def get_stock_quote_detail(stock_code):
|
||||
result_data['industry_l1'] = row.get('industry_l1') or ''
|
||||
result_data['industry'] = row.get('sw_industry_l2') or row.get('sw_industry_l1') or ''
|
||||
|
||||
# 计算流通市值(亿元)
|
||||
# 计算股本和市值
|
||||
total_shares = float(row.get('total_shares') or 0)
|
||||
float_shares = float(row.get('float_shares') or 0)
|
||||
close_price = float(row.get('close_price') or 0)
|
||||
|
||||
# 发行总股本(亿股)
|
||||
if total_shares > 0:
|
||||
total_shares_yi = total_shares / 100000000 # 转为亿股
|
||||
result_data['total_shares'] = round(total_shares_yi, 2)
|
||||
|
||||
# 流通股本(亿股)
|
||||
if float_shares > 0:
|
||||
float_shares_yi = float_shares / 100000000 # 转为亿股
|
||||
result_data['float_shares'] = round(float_shares_yi, 2)
|
||||
|
||||
# 计算流通市值(亿元)
|
||||
if float_shares > 0 and close_price > 0:
|
||||
circ_mv = (float_shares * close_price) / 100000000 # 转为亿
|
||||
result_data['circ_mv'] = round(circ_mv, 2)
|
||||
|
||||
Reference in New Issue
Block a user