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
71396163
Commit
71396163
authored
Dec 07, 2020
by
赵杰
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
b69be66f
3bfa1177
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41198 additions
and
4 deletions
+41198
-4
monthReportV2.html
app/templates/v2/monthReportV2.html
+23
-0
draw.py
app/utils/draw.py
+2
-2
jinjia2html.py
app/utils/jinjia2html.py
+18
-0
timed_task.py
app/utils/timed_task.py
+1
-2
tamp_course_order.log
logs/tamp_course_order.log
+41154
-0
No files found.
app/templates/v2/monthReportV2.html
View file @
71396163
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
/* 封面 */
/* 封面 */
.box0
{
.box0
{
display
:
{{
box0
}
}
;
position
:
relative
;
position
:
relative
;
padding
:
234px
0
184px
0
;
padding
:
234px
0
184px
0
;
}
}
...
@@ -150,6 +151,7 @@
...
@@ -150,6 +151,7 @@
/* 目录 */
/* 目录 */
.box1
{
.box1
{
display
:
{{
box1
}
}
;
position
:
relative
;
position
:
relative
;
padding
:
150px
0
200px
36px
;
padding
:
150px
0
200px
36px
;
}
}
...
@@ -242,6 +244,9 @@
...
@@ -242,6 +244,9 @@
}
}
/* 投资总览 */
/* 投资总览 */
.box2
{
display
:
{{
box2
}
}
;
}
.box2
.box2_content
{
.box2
.box2_content
{
padding
:
47px
34px
61px
34px
;
padding
:
47px
34px
61px
34px
;
page-break-after
:
always
;
page-break-after
:
always
;
...
@@ -421,6 +426,9 @@
...
@@ -421,6 +426,9 @@
}
}
/* 目标与业绩 */
/* 目标与业绩 */
.box3
{
display
:
{{
box3
}
}
;
}
.box3
.box3_content
{
.box3
.box3_content
{
padding
:
47px
34px
61px
34px
;
padding
:
47px
34px
61px
34px
;
page-break-after
:
always
;
page-break-after
:
always
;
...
@@ -608,12 +616,18 @@
...
@@ -608,12 +616,18 @@
}
}
/* 业绩的明细 */
/* 业绩的明细 */
.box4
{
display
:
{{
box4
}
}
;
}
.box4
.box4_content
{
.box4
.box4_content
{
padding
:
47px
34px
61px
34px
;
padding
:
47px
34px
61px
34px
;
page-break-after
:
always
;
page-break-after
:
always
;
}
}
/* 个基点评 */
/* 个基点评 */
.box5
{
display
:
{{
box5
}
}
;
}
.box5
.box5_content
{
.box5
.box5_content
{
padding
:
47px
34px
61px
34px
;
padding
:
47px
34px
61px
34px
;
page-break-after
:
always
;
page-break-after
:
always
;
...
@@ -794,18 +808,27 @@
...
@@ -794,18 +808,27 @@
}
}
/* 优化组合建议 */
/* 优化组合建议 */
.box6
{
display
:
{{
box6
}
}
;
}
.box6
.box6_content
{
.box6
.box6_content
{
padding
:
47px
34px
61px
34px
;
padding
:
47px
34px
61px
34px
;
page-break-after
:
always
;
page-break-after
:
always
;
}
}
/* 新增基金 */
/* 新增基金 */
.box7
{
display
:
{{
box7
}
}
;
}
.box7
.box7_content
{
.box7
.box7_content
{
padding
:
47px
34px
61px
34px
;
padding
:
47px
34px
61px
34px
;
page-break-after
:
always
;
page-break-after
:
always
;
}
}
/* 结尾 */
/* 结尾 */
.box8
{
display
:
{{
box8
}
}
;
}
.box8
.box8_content
{
.box8
.box8_content
{
padding
:
60px
0
60px
0
;
padding
:
60px
0
60px
0
;
}
}
...
...
app/utils/draw.py
View file @
71396163
...
@@ -74,9 +74,9 @@ def draw_month_return_chart(xlabels, product_list, cumulative):
...
@@ -74,9 +74,9 @@ def draw_month_return_chart(xlabels, product_list, cumulative):
ax
=
ax1
.
bar
(
loc
,
product_list
[
i
][
'data'
],
width
,
bottom
=
bottom
,
alpha
=
0.8
)
ax
=
ax1
.
bar
(
loc
,
product_list
[
i
][
'data'
],
width
,
bottom
=
bottom
,
alpha
=
0.8
)
for
a
,
b
in
zip
(
range
(
len
(
xlabels
)),
product_list
[
0
][
'data'
]):
for
a
,
b
in
zip
(
range
(
len
(
xlabels
)),
product_list
[
0
][
'data'
]):
if
b
>
0
:
if
b
>
0
:
ax1
.
text
(
a
,
b
+
0.
2
,
'
%.0
f万'
%
b
,
ha
=
'center'
,
va
=
'bottom'
,
fontsize
=
fontsize
)
ax1
.
text
(
a
,
b
+
0.
1
,
'
%.2
f万'
%
b
,
ha
=
'center'
,
va
=
'bottom'
,
fontsize
=
fontsize
)
elif
b
<
0
:
elif
b
<
0
:
ax1
.
text
(
a
,
b
-
0.
5
,
'
%.0
f万'
%
b
,
ha
=
'center'
,
va
=
'top'
,
fontsize
=
fontsize
)
ax1
.
text
(
a
,
b
-
0.
1
,
'
%.2
f万'
%
b
,
ha
=
'center'
,
va
=
'top'
,
fontsize
=
fontsize
)
prod_legend
.
append
(
ax
[
0
])
prod_legend
.
append
(
ax
[
0
])
ax1
.
legend
(
prod_legend
,
[
prod
[
'name'
]
for
prod
in
product_list
],
loc
=
'upper left'
,
fontsize
=
fontsize
)
ax1
.
legend
(
prod_legend
,
[
prod
[
'name'
]
for
prod
in
product_list
],
loc
=
'upper left'
,
fontsize
=
fontsize
)
...
...
app/utils/jinjia2html.py
View file @
71396163
...
@@ -172,6 +172,24 @@ class DataIntegrate:
...
@@ -172,6 +172,24 @@ class DataIntegrate:
def
render_data
(
self
):
def
render_data
(
self
):
# 全部数据
# 全部数据
data
=
{
data
=
{
# 封面 值为None不不显示,为block显示
'box0'
:
'block'
,
# 目录
'box1'
:
'block'
,
# 投资总览
'box2'
:
'block'
,
# 目标与业绩
'box3'
:
'block'
,
# 业绩的明细
'box4'
:
'block'
,
# 个基点评
'box5'
:
'block'
,
# 优化组合建议
'box6'
:
'block'
,
# 新增基金
'box7'
:
'block'
,
# 结尾
'box8'
:
'block'
,
'cover_back'
:
template_folder
+
'/v2/img/cover-back.png'
,
'cover_back'
:
template_folder
+
'/v2/img/cover-back.png'
,
'logo'
:
template_folder
+
'/v2/img/logo.png'
,
'logo'
:
template_folder
+
'/v2/img/logo.png'
,
'scene'
:
template_folder
+
'/v2/img/scene/png'
,
'scene'
:
template_folder
+
'/v2/img/scene/png'
,
...
...
app/utils/timed_task.py
View file @
71396163
...
@@ -51,8 +51,7 @@ with TAMP_SQL(tamp_user_engine) as tamp_user, TAMP_SQL(tamp_order_engine) as tam
...
@@ -51,8 +51,7 @@ with TAMP_SQL(tamp_user_engine) as tamp_user, TAMP_SQL(tamp_order_engine) as tam
tamp_order_session
=
tamp_order
.
session
tamp_order_session
=
tamp_order
.
session
# for ifauser in ifausers:
# for ifauser in ifausers:
for
ifauser
in
ifausers
[:
5
]:
for
ifauser
in
ifausers
[
1000
:
2000
]:
# 获取某个 ifa 的所有 customer
# 获取某个 ifa 的所有 customer
customers
=
tamp_order_session
.
query
(
Ifa_Customer
)
.
\
customers
=
tamp_order_session
.
query
(
Ifa_Customer
)
.
\
filter_by
(
ifa_id
=
ifauser
.
id
)
.
all
()
filter_by
(
ifa_id
=
ifauser
.
id
)
.
all
()
...
...
logs/tamp_course_order.log
View file @
71396163
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