Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tamp_fund
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
周鹏
tamp_fund
Commits
176a1ed9
Commit
176a1ed9
authored
Feb 04, 2021
by
张亚辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
私募
parent
908cdcf3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+16
-4
No files found.
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
176a1ed9
...
...
@@ -933,7 +933,15 @@ public class ProductServiceImpl implements ProductService, Constant {
List
<
FundCount
>
fundCounts
=
this
.
fundCountMapper
.
selectByExample
(
example2
);
if
(
CollectionUtils
.
isNotEmpty
(
fundCounts
))
{
fundCounts
.
sort
(
Comparator
.
comparing
(
FundCount:
:
getRetIncep
).
reversed
());
fundCounts
.
sort
(
Comparator
.
comparing
(
FundCount:
:
getRetIncep
,
(
s1
,
s2
)
->
{
if
(
s1
==
null
)
{
s1
=
BigDecimal
.
ZERO
;
}
if
(
s2
==
null
)
{
s2
=
BigDecimal
.
ZERO
;
}
return
s1
.
compareTo
(
s2
);
}).
reversed
());
FundCount
fundCount
=
fundCounts
.
get
(
0
);
FundInfo
info
=
mapFundInfo
.
get
(
fundCount
.
getFundId
());
...
...
@@ -943,11 +951,15 @@ public class ProductServiceImpl implements ProductService, Constant {
vo
.
setInceptionDate
(
info
.
getInceptionDate
()
==
null
?
null
:
info
.
getInceptionDate
().
getTime
());
vo
.
setFundName
(
info
.
getFundShortName
());
vo
.
setNet
(
new
Net
(
fundCount
.
getEndDate
().
getTime
(),
BigDecimalUtil
.
toString
(
fundCount
.
getCumulativeNav
(),
4
)));
vo
.
setRetIncep
(
multiply100
(
fundCount
.
getRetIncep
()));
String
retIncep
=
multiply100
(
fundCount
.
getRetIncep
());
vo
.
setRetIncep
(
retIncep
==
null
?
"0"
:
retIncep
);
vo
.
setFundInfoVOS
(
fundCounts
.
stream
().
map
(
f
->
{
FundInfoVO
vo1
=
new
FundInfoVO
();
vo1
.
setRetIncep
(
multiply100
(
f
.
getRetIncep
()));
vo1
.
setYearProfit
(
multiply100
(
f
.
getRetIncepA
()));
String
retIncepstr
=
multiply100
(
f
.
getRetIncep
());
vo1
.
setRetIncep
(
retIncepstr
==
null
?
"0"
:
retIncepstr
);
String
yearProfit
=
multiply100
(
f
.
getRetIncepA
());
vo1
.
setYearProfit
(
yearProfit
==
null
?
"0"
:
yearProfit
);
vo1
.
setFundName
(
mapFundInfo
.
get
(
f
.
getFundId
()).
getFundShortName
());
vo1
.
setFundId
(
f
.
getFundId
());
vo1
.
setRatioId
(
info
.
getPrimaryBenchmarkId
());
...
...
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