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
c7589b3f
Commit
c7589b3f
authored
Feb 05, 2021
by
wang zhengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改生成持仓报告bug
parent
e63acc59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
report.py
app/controller/report.py
+2
-2
report_service.py
app/service/report_service.py
+3
-4
No files found.
app/controller/report.py
View file @
c7589b3f
...
...
@@ -181,7 +181,7 @@ class AppReportHandlers(Resource):
def
get
(
self
):
"""."""
self
.
parser
.
add_argument
(
'customer_id'
,
type
=
str
,
required
=
True
,
help
=
'customer_id不能为空'
)
self
.
parser
.
add_argument
(
'
time'
,
type
=
str
,
required
=
True
,
help
=
'
time不能为空'
)
self
.
parser
.
add_argument
(
'
custom_time'
,
type
=
str
,
required
=
True
,
help
=
'custom_
time不能为空'
)
args
=
self
.
parser
.
parse_args
()
args
[
'ifa_id'
]
=
g
.
ifa_id
# 默认模版制作持仓报告
...
...
@@ -197,7 +197,7 @@ class AppReportHandlers(Resource):
}
else
:
resp
=
{
"code"
:
0
,
"code"
:
8888
,
"data"
:
''
,
"lang"
:
"zh_CN"
,
"msg"
:
"失败"
...
...
app/service/report_service.py
View file @
c7589b3f
...
...
@@ -18,6 +18,7 @@ from app.api.engine import TAMP_SQL, tamp_diagnose_app_engine, template_folder,
from
app.model.tamp_diagnose_app
import
HoldReport
,
HoldDiagnoseReport
,
PeriodicReport
,
Customer
,
ReportView
,
FundReportManange
from
app.utils.jinjia2html_v2
import
DataIntegrate
from
app.celery
import
save_pdf
from
app.utils.format_transfer
import
npEncoder
def
get_report_list
(
args
):
...
...
@@ -299,8 +300,7 @@ def make_app_report(args):
args
[
'file'
]
=
pdf_name
args
[
'create_time'
]
=
datetime
.
datetime
.
now
()
args
[
'update_status'
]
=
2
custom_time
=
args
[
'time'
]
args
[
'custom_time'
]
=
custom_time
custom_time
=
args
[
'custom_time'
]
data
=
{}
record_id
=
0
...
...
@@ -353,7 +353,6 @@ def make_app_report(args):
report_record
=
HoldReport
(
**
args
)
tamp_diagnose_session
.
add
(
report_record
)
tamp_diagnose_session
.
flush
()
# record_id = report_record.id
return
report_record
.
get_file
()
return
report_record
.
id
return
False
\ No newline at end of file
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