Commit cd54a856 authored by 赵杰's avatar 赵杰

最新月报生成

parent 104dabc4
......@@ -36,7 +36,7 @@ class UserCustomerDataAdaptor:
p_end_date = pd.to_datetime(end_date).date()
p_end_date = datetime.date(year=p_end_date.year, month=p_end_date.month, day=1) - datetime.timedelta(days=1)
self.end_date = pd.to_datetime(str(p_end_date))
self.end_date = pd.to_datetime("2020-12-04")
self.end_date = pd.to_datetime("2020-12-11")
p_start_date = datetime.date(year=p_end_date.year, month=p_end_date.month, day=1)
self.month_start_date = p_start_date
self.month_start_date = pd.to_datetime("2020-11-01")
......
......@@ -32,9 +32,6 @@ class DataIntegrate:
# 分组合拼接结果数据
self.get_group_result()
# # 组合数据
# self.group_result = self.d["default"]
# self.get_portfolio_diagnose(self.group_result["fund_id_list"])
# 投资总览
self.get_summarize()
# 月度回报
......@@ -72,11 +69,11 @@ class DataIntegrate:
# 旧相关性
self.get_old_correlation(portfolio_diagnose, cur_group_portfolio_result)
# # 新增基金
self.propose_fund(portfolio_diagnose, cur_group_portfolio_result)
# self.propose_fund(portfolio_diagnose, cur_group_portfolio_result)
# # 新收益比较
self.get_transfer_suggestions(portfolio_diagnose, group_name, cur_group_portfolio_result)
# self.get_transfer_suggestions(portfolio_diagnose, group_name, cur_group_portfolio_result)
# # 新相关性
self.get_new_correlation(portfolio_diagnose, cur_group_portfolio_result)
# self.get_new_correlation(portfolio_diagnose, cur_group_portfolio_result)
self.all_folio_result[group_name] = cur_group_portfolio_result
......@@ -238,9 +235,9 @@ class DataIntegrate:
# 个基点评
'box5': 'block',
# 优化组合建议
'box6': 'block',
'box6': None,
# 新增基金
'box7': 'block',
'box7': None,
# 结尾
'box8': 'block',
'cover_back': template_folder + '/v2/img/cover-back.png',
......@@ -325,7 +322,6 @@ class DataIntegrate:
html_to_pdf(monthReport_html, pdf_folder + self.pdf_name)
if __name__ == '__main__':
start = time.time()
DataIntegrate(ifa_id='USER_INFO15914346866762', customer_id='202009281545001')
......
......@@ -67,6 +67,8 @@ def call_month_report(ifauser_id, ifauser_name, customer_id, customer_name):
except Exception as e:
logging.error("IFAID{}: IFAName{}, 客户ID{}, 客户Name: {}的基金月报生成异常,错误追踪:{}".format(ifauser_id, ifauser_name, customer_id, customer_name, traceback.format_exc()))
print("IFA: {}, 客户: {}的基金月报生成异常,错误追踪:{}".format(ifauser_name, customer_name, traceback.format_exc()))
finally:
return None
if __name__ == '__main__':
data = []
......
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