Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
c287fd34
Commit
c287fd34
authored
Feb 18, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
50d93013
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
17 deletions
+22
-17
rpt_result/GetFIinfoFromJson.py
+22
-17
No files found.
rpt_result/GetFIinfoFromJson.py
View file @
c287fd34
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/2/1
1
19:43
# @Time : 2020/2/1
8
19:43
# @Author : fanhui
# @File : GetFIinfoFromJson.py
# @Software: PyCharm
...
...
@@ -29,7 +29,7 @@ def GetFIinfoFromJson(GetAllinfo):
FIinfo
=
GetAllinfo
.
get
(
"fi"
,
None
)
#如果key不存在,会返回None,因此需进行判断
Fi_dict
=
{}
if
FIinfo
:
Total_trade_income
=
FIinfo
[
0
]
.
get
(
"Total_trade_income"
,
None
)
Total_trade_income
=
FIinfo
.
get
(
"Total_trade_income"
,
None
)
Bq_time
=
''
Sq_time
=
''
if
Total_trade_income
:
...
...
@@ -40,21 +40,25 @@ def GetFIinfoFromJson(GetAllinfo):
keys_list
.
append
(
t_k
)
Bq_time
=
keys_list
[
0
]
Sq_time
=
keys_list
[
1
]
Total_profit
=
eval
(
FIinfo
[
1
]
.
get
(
"Total_profit"
))
Net_profit
=
eval
(
FIinfo
[
2
]
.
get
(
"Net_profit"
))
Total_Liabilities
=
eval
(
FIinfo
[
3
]
.
get
(
"Total_Liabilities"
))
Owner_rights
=
eval
(
FIinfo
[
4
]
.
get
(
"Owner_rights"
))
Total_sales
=
eval
(
FIinfo
[
5
]
.
get
(
"Total_sales"
))
Total_assets
=
eval
(
FIinfo
[
6
]
.
get
(
"Total_assets"
))
Total_liabilities_and_Owner_rights
=
eval
(
FIinfo
[
7
]
.
get
(
"Total_liabilities_and_Owner_rights"
))
sales_expense
=
eval
(
FIinfo
[
8
]
.
get
(
"sales_expense"
))
Net_interest_rate
=
eval
(
FIinfo
[
9
]
.
get
(
"Net_interest_rate"
))
Equity_ratio
=
eval
(
FIinfo
[
10
]
.
get
(
"Equity_ratio"
))
Gearing_ratio
=
eval
(
FIinfo
[
11
]
.
get
(
"Gearing_ratio"
))
sales_growth_rate
=
eval
(
FIinfo
[
12
]
.
get
(
"sales_growth_rate"
))
Net_profit_growth_rate
=
eval
(
FIinfo
[
13
]
.
get
(
"Net_profit_growth_rate"
))
print
(
type
(
FIinfo
[
14
]
.
get
(
"total_assets_growth_rate"
)),
FIinfo
[
14
]
.
get
(
"total_assets_growth_rate"
))
total_assets_growth_rate
=
eval
(
FIinfo
[
14
]
.
get
(
"total_assets_growth_rate"
))
Equity_ratio
=
eval
(
FIinfo
.
get
(
"Equity_ratio"
))
Gearing_ratio
=
eval
(
FIinfo
.
get
(
"Gearing_ratio"
))
total_assets_growth_rate
=
eval
(
FIinfo
.
get
(
"total_assets_growth_rate"
))
print
(
type
(
FIinfo
.
get
(
"total_assets_growth_rate"
)),
FIinfo
.
get
(
"total_assets_growth_rate"
))
Net_profit
=
eval
(
FIinfo
.
get
(
"Net_profit"
))
Net_profit_growth_rate
=
eval
(
FIinfo
.
get
(
"Net_profit_growth_rate"
))
Owner_rights
=
eval
(
FIinfo
.
get
(
"Owner_rights"
))
sales_expense
=
eval
(
FIinfo
.
get
(
"sales_expense"
))
sales_growth_rate
=
eval
(
FIinfo
.
get
(
"sales_growth_rate"
))
Total_assets
=
eval
(
FIinfo
.
get
(
"Total_assets"
))
Total_Liabilities
=
eval
(
FIinfo
.
get
(
"Total_Liabilities"
))
Total_liabilities_and_Owner_rights
=
eval
(
FIinfo
.
get
(
"Total_liabilities_and_Owner_rights"
))
print
(
FIinfo
,
"++++"
,
type
(
FIinfo
.
get
(
"Total_profit"
)))
Total_profit
=
eval
(
FIinfo
.
get
(
"Total_profit"
))
Total_sales
=
eval
(
FIinfo
.
get
(
"Total_sales"
))
Net_interest_rate
=
eval
(
FIinfo
.
get
(
"Net_interest_rate"
))
#没有对应的指标
Fi_dict
[
"Bq_time"
]
=
Bq_time
Fi_dict
[
"Sq_time"
]
=
Sq_time
Fi_dict
[
"Bq_Total_trade_income"
]
=
Total_trade_income
[
Bq_time
]
...
...
@@ -95,3 +99,4 @@ def GetFIinfoFromJson(GetAllinfo):
Fi_dict
[
"Bq_total_assets_growth_rate"
]
=
total_assets_growth_rate
[
Bq_time
]
Fi_dict
[
"Sq_total_assets_growth_rate"
]
=
total_assets_growth_rate
[
Sq_time
]
return
Else_info
,
Fi_dict
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment