Commit 81242e12 authored by pengxiong's avatar pengxiong

报告名称

parent 8e4973b7
...@@ -194,6 +194,21 @@ def make_report(args): ...@@ -194,6 +194,21 @@ def make_report(args):
default_template = '' default_template = ''
with TAMP_SQL(tamp_diagnose_app_engine) as tamp_diagnose_app: with TAMP_SQL(tamp_diagnose_app_engine) as tamp_diagnose_app:
tamp_diagnose_session = tamp_diagnose_app.session 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 report_record = None
if type == 1: if type == 1:
report_record = HoldReport(**args) report_record = HoldReport(**args)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment