Commit d7064c59 authored by pengxiong's avatar pengxiong

样式2

parent fd490bcd
......@@ -4,6 +4,8 @@
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.7" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="tamp_course_order" />
<orderEntry type="module" module-name="tamp_app_scan" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
......
......@@ -3,6 +3,8 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/fund_report.iml" filepath="$PROJECT_DIR$/.idea/fund_report.iml" />
<module fileurl="file://$PROJECT_DIR$/../tamp_app_scan/.idea/tamp_app_scan.iml" filepath="$PROJECT_DIR$/../tamp_app_scan/.idea/tamp_app_scan.iml" />
<module fileurl="file://$PROJECT_DIR$/../tamp_course_order/.idea/tamp_course_order.iml" filepath="$PROJECT_DIR$/../tamp_course_order/.idea/tamp_course_order.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/../tamp_app_scan" vcs="Git" />
</component>
</project>
\ No newline at end of file
......@@ -285,7 +285,7 @@ class UserCustomerDataAdaptor:
confirm_date_nav_data = p_nav_df[p_nav_df.index == confirm_share_date][cur_fund_id].tail(1)
confirm_date_cnav_data = p_cnav_df[p_cnav_df.index == confirm_share_date][cur_fund_id].tail(1)
diff_nav = Decimal(row["nav"]) - Decimal(confirm_date_nav_data.values[0])
cur_cnav = confirm_date_cnav_data.values[0] + diff_nav
cur_cnav = Decimal(confirm_date_cnav_data.values[0]) + Decimal(diff_nav)
cnav_df.loc[confirm_share_date, cur_fund_id] = cur_cnav
cnav_df = cnav_df.dropna(axis=0, how="all").fillna(method='ffill')
......
......@@ -144,6 +144,9 @@ def draw_contribution_chart(xlabels, product_list, cumulative):
# 画折线图
ax2.plot(loc, cumulative['data'], color='#B40A15', marker='', linewidth=3, label=cumulative['name'])
# 添加数字标签
for a, b in zip(range(len(xlabels)), cumulative['data']):
ax2.text(a + 0.2, b + 0.1, '%.2f' % b + '%', ha='center', va='bottom', fontsize=fontsize, color='#B40A15')
ax2.legend(loc='upper left', fontsize=fontsize)
imgdata = BytesIO()
......
......@@ -39,6 +39,8 @@ class DataIntegrate:
self.contribution_deco()
# 个基点评
self.single_fund_comment()
# 旧收益比较
self.get_old_compare_pic()
# 旧相关性
self.get_old_correlation()
# 新相关性
......@@ -47,8 +49,6 @@ class DataIntegrate:
self.propose_fund()
# 目标与业绩
self.objectives_performance(self.group_result)
# 旧收益比较
self.get_old_compare_pic()
# 新收益比较
self.get_transfer_suggestions()
# 渲染模版
......@@ -199,9 +199,9 @@ class DataIntegrate:
# 个基点评
'box5': 'block',
# 优化组合建议
'box6': 'block',
'box6': None,
# 新增基金
'box7': 'block',
'box7': None,
# 结尾
'box8': 'block',
'cover_back': template_folder + '/v2/img/cover-back.png',
......
This diff is collapsed.
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