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
c8d49e6e
Commit
c8d49e6e
authored
Jan 22, 2021
by
赵杰
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/app_v3' into app_v3
parents
336d41ba
e6e8383a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
default_template_params.py
app/config/default_template_params.py
+2
-2
report_service.py
app/service/report_service.py
+15
-1
No files found.
app/config/default_template_params.py
View file @
c8d49e6e
...
...
@@ -47,7 +47,7 @@ hold_default_template = {
'cover_title1': '资产',
'cover_title2': '存续报告',
'logo': template_folder + 'logo.png',
'brand_name': '
小飞象
',
'brand_name': '
某某某
',
# 'logo_display': 'table-cell',
# 'brand_name_display': 'table-cell',
'logo_display': 'none',
...
...
@@ -97,7 +97,7 @@ diagnose_default_template = {
'cover_title1': '资产',
'cover_title2': '存续报告',
'logo': template_folder + 'logo.png',
'brand_name': '
小飞象
',
'brand_name': '
某某某
',
# 'logo_display': 'table-cell',
# 'brand_name_display': 'table-cell',
'logo_display': 'none',
app/service/report_service.py
View file @
c8d49e6e
...
...
@@ -189,11 +189,25 @@ def make_report(args):
args
[
'create_time'
]
=
datetime
.
datetime
.
now
()
args
[
'update_status'
]
=
1
args
.
pop
(
'type'
)
record_id
=
0
default_template
=
''
with
TAMP_SQL
(
tamp_diagnose_app_engine
)
as
tamp_diagnose_app
:
tamp_diagnose_session
=
tamp_diagnose_app
.
session
customer_name
=
''
type_name
=
'持仓报告'
create_date
=
str
(
datetime
.
datetime
.
now
()
.
date
())
sql
=
"select customer_name from customer_view where id = '{}'"
.
format
(
customer_id
)
res
=
tamp_diagnose_session
.
execute
(
sql
)
res
=
res
.
fetchone
()
if
res
:
customer_name
=
res
[
0
]
if
type
==
1
:
type_name
=
'持仓报告'
elif
type
==
2
:
type_name
=
'诊断报告'
elif
type
==
3
:
type_name
=
'周期报告'
args
[
'name'
]
=
customer_name
+
type_name
+
create_date
report_record
=
None
if
type
==
1
:
report_record
=
HoldReport
(
**
args
)
...
...
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