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
d752e083
Commit
d752e083
authored
Feb 07, 2021
by
赵杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加字段
parent
28edb4b4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
folio_comment_service.py
app/service/folio_comment_service.py
+9
-0
No files found.
app/service/folio_comment_service.py
View file @
d752e083
...
...
@@ -20,8 +20,15 @@ def recalculation_fund_comment(args):
suggest_fund_list
=
[]
suggest_amount_list
=
[]
all_sug_amount_dict
=
{}
newprcode_dict
=
{}
for
key
,
value_list
in
suggest_result
.
items
():
if
len
(
value_list
)
<=
0
:
continue
for
value
in
value_list
:
if
len
(
value
)
==
0
:
continue
if
value
.
get
(
"newprcode"
):
newprcode_dict
[
value
[
"fund_id"
]]
=
value
[
"newprcode"
]
all_sug_amount_dict
[
value
[
"fund_id"
]]
=
value
[
"after_optimization"
]
value
[
"after_optimization"
]
=
round
(
float
(
value
[
"after_optimization"
]),
2
)
if
value
[
"after_optimization"
]
<=
0
:
...
...
@@ -52,6 +59,8 @@ def recalculation_fund_comment(args):
for
key_
,
value_
in
new_suggestions_result
.
items
():
for
new_sug
in
value_
:
new_sug
[
"after_optimization"
]
=
all_sug_amount_dict
.
get
(
new_sug
[
"fund_id"
],
0
)
if
newprcode_dict
.
get
(
new_sug
[
"fund_id"
]):
new_sug
[
"newprcode"
]
=
newprcode_dict
.
get
(
new_sug
[
"fund_id"
])
new_suggestions_result_asset
[
"after"
]
=
sum_amount
dict_result
[
"suggestions_result"
]
=
new_suggestions_result
...
...
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