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
5f3eb33e
Commit
5f3eb33e
authored
Dec 07, 2020
by
pengxiong@wealthgrow.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样式修改
parent
3bfa1177
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8953 additions
and
18 deletions
+8953
-18
monthReportV2.html
app/templates/v2/monthReportV2.html
+4
-3
draw.py
app/utils/draw.py
+6
-6
radar_chart.py
app/utils/radar_chart.py
+9
-8
timed_task.py
app/utils/timed_task.py
+1
-1
tamp_course_order.log
logs/tamp_course_order.log
+8933
-0
No files found.
app/templates/v2/monthReportV2.html
View file @
5f3eb33e
...
...
@@ -1279,7 +1279,7 @@
</div>
<table
border=
"1"
>
<tr>
<th>
现有配置资金
</th>
<th>
现有配置资金
(万元)
</th>
<th>
现有年化收益情况(%)
</th>
<th>
现有最大回撤(%)
</th>
</tr>
...
...
@@ -1291,7 +1291,7 @@
</table>
<table
border=
"1"
style=
"margin: 0;"
>
<tr>
<th>
计划配置资金
</th>
<th>
计划配置资金
(万元)
</th>
<th>
目标年化收益情况(%)
</th>
<th>
目标最大回撤(%)
</th>
</tr>
...
...
@@ -1575,7 +1575,8 @@
<tr>
<th
rowspan=
"2"
>
基金简称
</th>
<th
rowspan=
"2"
>
申购净值
</th>
<th
colspan=
"9"
>
最新净值(2020.11.05)
</th>
<th
colspan=
"2"
>
最新净值({{latest_worth_day}})
</th>
<th
colspan=
"7"
>
收益率(%)
</th>
<th
rowspan=
"2"
>
分红
</th>
</tr>
<tr>
...
...
app/utils/draw.py
View file @
5f3eb33e
...
...
@@ -40,14 +40,14 @@ def draw_month_return_chart(xlabels, product_list, cumulative):
max_x_count
=
max
([
x
[
'data'
]
.
size
for
x
in
product_list
])
loc
=
np
.
arange
(
max_x_count
)
# the x locations for the groups
width
=
0.35
# the width of the bars: can also be len(x) sequence
color_list
=
[
'#
222A77
'
,
'#6C71AA'
,
'#E1BC95'
,
'#F9DBB8'
]
color_list
=
[
'#
B0B0B0
'
,
'#6C71AA'
,
'#E1BC95'
,
'#F9DBB8'
]
# 坐标轴
ax1
.
tick_params
(
labelsize
=
fontsize
)
ax2
.
tick_params
(
labelsize
=
fontsize
)
# 坐标轴颜色
ax2
.
tick_params
(
axis
=
'y'
,
colors
=
'#
C6A774
'
)
ax2
.
tick_params
(
axis
=
'y'
,
colors
=
'#
D40000
'
)
ax1
.
set_xticks
(
loc
)
ax1
.
set_xticklabels
(
xlabels
)
# ax1.yaxis.set_major_formatter(FuncFormatter(to_percent))
...
...
@@ -81,10 +81,10 @@ def draw_month_return_chart(xlabels, product_list, cumulative):
ax1
.
legend
(
prod_legend
,
[
prod
[
'name'
]
for
prod
in
product_list
],
loc
=
'upper left'
,
fontsize
=
fontsize
)
# 画折线图
ax2
.
plot
(
loc
,
cumulative
[
'data'
],
color
=
'#
C6A774'
,
marker
=
'
'
,
linewidth
=
3
,
label
=
cumulative
[
'name'
])
ax2
.
plot
(
loc
,
cumulative
[
'data'
],
color
=
'#
D40000'
,
marker
=
'.
'
,
linewidth
=
3
,
label
=
cumulative
[
'name'
])
# 添加数字标签
for
a
,
b
in
zip
(
range
(
len
(
xlabels
)),
cumulative
[
'data'
]):
ax2
.
text
(
a
,
b
+
0.1
,
'
%.2
f'
%
b
+
'
%
'
,
ha
=
'center'
,
va
=
'bottom'
,
fontsize
=
fontsize
)
ax2
.
text
(
a
+
0.2
,
b
+
0.1
,
'
%.2
f'
%
b
+
'
%
'
,
ha
=
'center'
,
va
=
'bottom'
,
fontsize
=
fontsize
,
color
=
'#D40000'
)
ax2
.
legend
(
loc
=
'upper center'
,
fontsize
=
fontsize
)
# plt.show()
...
...
@@ -110,7 +110,7 @@ def draw_contribution_chart(xlabels, product_list, cumulative):
max_x_count
=
max
([
x
[
'data'
]
.
size
for
x
in
product_list
])
loc
=
np
.
arange
(
max_x_count
)
# the x locations for the groups
width
=
0.35
# the width of the bars: can also be len(x) sequence
color_list
=
[
'#
222A77'
,
'#6C71AA'
,
'#E1BC95'
,
'#F9DBB8
'
]
color_list
=
[
'#
333333'
,
'#928C8C'
,
'#F9A3A3'
,
'#FFDBDB
'
]
# 坐标轴
ax1
.
tick_params
(
labelsize
=
fontsize
)
...
...
@@ -142,7 +142,7 @@ def draw_contribution_chart(xlabels, product_list, cumulative):
ax1
.
legend
(
prod_legend
,
[
prod
[
'name'
]
for
prod
in
product_list
],
bbox_to_anchor
=
(
0.9
,
-
0.1
),
ncol
=
4
,
fontsize
=
fontsize
)
# 画折线图
ax2
.
plot
(
loc
,
cumulative
[
'data'
],
color
=
'#
C6A774
'
,
marker
=
''
,
linewidth
=
3
,
label
=
cumulative
[
'name'
])
ax2
.
plot
(
loc
,
cumulative
[
'data'
],
color
=
'#
B40A15
'
,
marker
=
''
,
linewidth
=
3
,
label
=
cumulative
[
'name'
])
ax2
.
legend
(
loc
=
'upper left'
,
fontsize
=
fontsize
)
imgdata
=
BytesIO
()
...
...
app/utils/radar_chart.py
View file @
5f3eb33e
...
...
@@ -41,18 +41,19 @@ def gen_radar_chart(radar_chart_data):
# ],
splitarea_opt
=
opts
.
SplitAreaOpts
(
is_show
=
True
,
areastyle_opts
=
opts
.
AreaStyleOpts
(
opacity
=
1
,
color
=
[
'rgba(198, 167, 116, 0.5)'
,
'rgba(198, 167, 116, 0.4)'
,
'rgba(198, 167, 116, 0.3)'
,
'rgba(198, 167, 116, 0.2)'
,
'rgba(198, 167, 116, 0.1)'
,
'rgba(194, 194, 194, 0.5)'
,
'rgba(232, 232, 232, 1)'
,
'rgba(242, 242, 242, 1)'
,
'rgba(247, 247, 247, 0.92)'
,
'rgba(247, 247, 247, 0.5)'
,
])
),
textstyle_opts
=
opts
.
TextStyleOpts
(
color
=
"#000"
,
font_size
=
1
6
),
textstyle_opts
=
opts
.
TextStyleOpts
(
color
=
"#000"
,
font_size
=
1
4
),
)
.
add
(
series_name
=
"预算分配(Allocated Budget)"
,
data
=
v1
,
linestyle_opts
=
opts
.
LineStyleOpts
(
width
=
2
,
color
=
"#
C6A774
"
),
linestyle_opts
=
opts
.
LineStyleOpts
(
width
=
2
,
color
=
"#
999999
"
),
tooltip_opts
=
None
)
.
set_series_opts
(
label_opts
=
opts
.
LabelOpts
(
is_show
=
False
))
.
set_global_opts
(
title_opts
=
opts
.
TitleOpts
(
...
...
@@ -62,7 +63,7 @@ def gen_radar_chart(radar_chart_data):
'lineHeight'
:
20
,
'fontWeight'
:
'normal'
},
subtitle_textstyle_opts
=
{
'color'
:
'#
222A77
'
,
subtitle_textstyle_opts
=
{
'color'
:
'#
983612'
if
radar_chart_data
[
'data'
][
5
][
'data'
]
>
60
else
'#22999F
'
,
'fontSize'
:
20
,
'lineHeight'
:
23
,
'fontWeight'
:
'bolder'
,
...
...
app/utils/timed_task.py
View file @
5f3eb33e
...
...
@@ -51,7 +51,7 @@ with TAMP_SQL(tamp_user_engine) as tamp_user, TAMP_SQL(tamp_order_engine) as tam
tamp_order_session
=
tamp_order
.
session
# for ifauser in ifausers:
for
ifauser
in
ifausers
[
100
0
:
2
000
]:
for
ifauser
in
ifausers
[
100
:
1
000
]:
# 获取某个 ifa 的所有 customer
customers
=
tamp_order_session
.
query
(
Ifa_Customer
)
.
\
filter_by
(
ifa_id
=
ifauser
.
id
)
.
all
()
...
...
logs/tamp_course_order.log
View file @
5f3eb33e
This diff is collapsed.
Click to expand it.
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