Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
F
fund_report
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭熊
fund_report
Commits
0bae380c
Commit
0bae380c
authored
Feb 25, 2021
by
赵杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
浙江白鹭
parent
4c1ceda0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
portfolio_diagnose.py
app/service/portfolio_diagnose.py
+10
-10
No files found.
app/service/portfolio_diagnose.py
View file @
0bae380c
...
@@ -411,7 +411,7 @@ def get_fund_name(fund, fund_type=1):
...
@@ -411,7 +411,7 @@ def get_fund_name(fund, fund_type=1):
data
=
cur
.
fetchall
()
data
=
cur
.
fetchall
()
df
=
pd
.
DataFrame
(
list
(
data
),
columns
=
[
'fund_short_name'
])
df
=
pd
.
DataFrame
(
list
(
data
),
columns
=
[
'fund_short_name'
])
return
df
return
df
elif
fund_type
==
1
or
fund_type
==
2
:
elif
fund_type
==
1
:
with
TAMP_SQL
(
tamp_fund_engine
)
as
tamp_fund
:
with
TAMP_SQL
(
tamp_fund_engine
)
as
tamp_fund
:
tamp_fund_session
=
tamp_fund
.
session
tamp_fund_session
=
tamp_fund
.
session
sql
=
"SELECT fund_short_name FROM fund_info WHERE id='{}'"
.
format
(
fund
)
sql
=
"SELECT fund_short_name FROM fund_info WHERE id='{}'"
.
format
(
fund
)
...
@@ -419,7 +419,8 @@ def get_fund_name(fund, fund_type=1):
...
@@ -419,7 +419,8 @@ def get_fund_name(fund, fund_type=1):
cur
=
tamp_fund_session
.
execute
(
sql
)
cur
=
tamp_fund_session
.
execute
(
sql
)
data
=
cur
.
fetchall
()
data
=
cur
.
fetchall
()
df
=
pd
.
DataFrame
(
list
(
data
),
columns
=
[
'fund_short_name'
])
df
=
pd
.
DataFrame
(
list
(
data
),
columns
=
[
'fund_short_name'
])
if
len
(
df
)
==
0
:
return
df
elif
fund_type
==
2
:
with
TAMP_SQL
(
tamp_product_engine
)
as
tamp_product
:
with
TAMP_SQL
(
tamp_product_engine
)
as
tamp_product
:
tamp_product_session
=
tamp_product
.
session
tamp_product_session
=
tamp_product
.
session
sql
=
"SELECT fund_short_name FROM fund_info WHERE id='{}'"
.
format
(
fund
)
sql
=
"SELECT fund_short_name FROM fund_info WHERE id='{}'"
.
format
(
fund
)
...
@@ -428,7 +429,6 @@ def get_fund_name(fund, fund_type=1):
...
@@ -428,7 +429,6 @@ def get_fund_name(fund, fund_type=1):
data
=
cur
.
fetchall
()
data
=
cur
.
fetchall
()
df
=
pd
.
DataFrame
(
list
(
data
),
columns
=
[
'fund_short_name'
])
df
=
pd
.
DataFrame
(
list
(
data
),
columns
=
[
'fund_short_name'
])
return
df
return
df
return
df
else
:
else
:
with
TAMP_SQL
(
tamp_fund_engine
)
as
tamp_fund
:
with
TAMP_SQL
(
tamp_fund_engine
)
as
tamp_fund
:
tamp_fund_session
=
tamp_fund
.
session
tamp_fund_session
=
tamp_fund
.
session
...
...
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