Commit d7064c59 authored by pengxiong's avatar pengxiong

样式2

parent fd490bcd
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
<content url="file://$MODULE_DIR$" /> <content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.7" jdkType="Python SDK" /> <orderEntry type="jdk" jdkName="Python 3.7" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="tamp_course_order" />
<orderEntry type="module" module-name="tamp_app_scan" />
</component> </component>
<component name="TestRunnerService"> <component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" /> <option name="PROJECT_TEST_RUNNER" value="Unittests" />
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/.idea/fund_report.iml" filepath="$PROJECT_DIR$/.idea/fund_report.iml" /> <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> </modules>
</component> </component>
</project> </project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" /> <mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/../tamp_app_scan" vcs="Git" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -285,7 +285,7 @@ class UserCustomerDataAdaptor: ...@@ -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_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) 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]) 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.loc[confirm_share_date, cur_fund_id] = cur_cnav
cnav_df = cnav_df.dropna(axis=0, how="all").fillna(method='ffill') cnav_df = cnav_df.dropna(axis=0, how="all").fillna(method='ffill')
......
...@@ -144,6 +144,9 @@ def draw_contribution_chart(xlabels, product_list, cumulative): ...@@ -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']) 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) ax2.legend(loc='upper left', fontsize=fontsize)
imgdata = BytesIO() imgdata = BytesIO()
......
...@@ -39,6 +39,8 @@ class DataIntegrate: ...@@ -39,6 +39,8 @@ class DataIntegrate:
self.contribution_deco() self.contribution_deco()
# 个基点评 # 个基点评
self.single_fund_comment() self.single_fund_comment()
# 旧收益比较
self.get_old_compare_pic()
# 旧相关性 # 旧相关性
self.get_old_correlation() self.get_old_correlation()
# 新相关性 # 新相关性
...@@ -47,8 +49,6 @@ class DataIntegrate: ...@@ -47,8 +49,6 @@ class DataIntegrate:
self.propose_fund() self.propose_fund()
# 目标与业绩 # 目标与业绩
self.objectives_performance(self.group_result) self.objectives_performance(self.group_result)
# 旧收益比较
self.get_old_compare_pic()
# 新收益比较 # 新收益比较
self.get_transfer_suggestions() self.get_transfer_suggestions()
# 渲染模版 # 渲染模版
...@@ -199,9 +199,9 @@ class DataIntegrate: ...@@ -199,9 +199,9 @@ class DataIntegrate:
# 个基点评 # 个基点评
'box5': 'block', 'box5': 'block',
# 优化组合建议 # 优化组合建议
'box6': 'block', 'box6': None,
# 新增基金 # 新增基金
'box7': 'block', 'box7': None,
# 结尾 # 结尾
'box8': 'block', 'box8': 'block',
'cover_back': template_folder + '/v2/img/cover-back.png', '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