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
6865f642
Commit
6865f642
authored
Mar 22, 2021
by
zp
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of 47.100.44.39:zhoupeng/tamp_fund
parents
98f6e80d
5d59808a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+8
-4
No files found.
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
6865f642
...
...
@@ -1436,7 +1436,7 @@ public class ProductServiceImpl implements ProductService, Constant {
PageMethod
.
startPage
(
1
,
1
);
IfaImportedFundNavExample
navExample
=
new
IfaImportedFundNavExample
();
navExample
.
createCriteria
().
andFundIdEqualTo
(
id
).
andDeleteTagEqualTo
(
BizEnums
.
DeleteTag
.
tag_init
);
navExample
.
setOrderByClause
(
"price_date"
);
navExample
.
setOrderByClause
(
"price_date
desc
"
);
List
<
IfaImportedFundNav
>
navList
=
ifaImportedFundNavMapper
.
selectByExample
(
navExample
);
if
(
CollectionUtils
.
isNotEmpty
(
navList
))
{
detailResp
.
setNet
(
Net
.
builder
().
netDate
(
navList
.
get
(
0
).
getPriceDate
().
getTime
())
...
...
@@ -1490,9 +1490,13 @@ public class ProductServiceImpl implements ProductService, Constant {
if
(
i
<
fundNavs
.
size
()
-
1
)
{
IfaImportedFundNav
pre
=
fundNavs
.
get
(
i
+
1
);
if
(
pre
.
getNav
().
compareTo
(
BigDecimal
.
ZERO
)
==
1
)
{
BigDecimal
dailyIncrease
=
f
.
getNav
().
subtract
(
pre
.
getNav
()).
divide
(
pre
.
getNav
(),
4
,
BigDecimal
.
ROUND_HALF_UP
);
vo
.
setDailyIncrease
(
BigDecimalUtil
.
multiply100
(
dailyIncrease
));
if
(
pre
.
getCumulativeNav
()
!=
null
&&
f
.
getCumulativeNav
()
!=
null
)
{
if
(
pre
.
getCumulativeNav
().
compareTo
(
BigDecimal
.
ZERO
)
==
1
)
{
BigDecimal
dailyIncrease
=
f
.
getCumulativeNav
().
subtract
(
pre
.
getCumulativeNav
()).
divide
(
pre
.
getCumulativeNav
(),
4
,
BigDecimal
.
ROUND_HALF_UP
);
vo
.
setDailyIncrease
(
BigDecimalUtil
.
multiply100
(
dailyIncrease
));
}
}
else
{
vo
.
setDailyIncrease
(
"--"
);
}
}
}
...
...
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