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
fd562a28
Commit
fd562a28
authored
Mar 22, 2021
by
zp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
3e44d07d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
8 deletions
+28
-8
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+28
-8
No files found.
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
fd562a28
...
...
@@ -1684,20 +1684,27 @@ public class ProductServiceImpl implements ProductService, Constant {
ifaNavMap
=
getIfaNavMap
(
req
.
getFundId
());
}
List
<
FundNavMessage
>
resultMessage
=
new
ArrayList
<>(
req
.
getFundNavMessages
().
size
()
*
2
);
AtomicBoolean
errorStatus
=
new
AtomicBoolean
(
false
);
req
.
setFundNavMessages
(
req
.
getFundNavMessages
()
.
stream
()
.
peek
(
ls
->
{
ls
.
setConfirmStatus
(
null
);
ls
.
setMessage
(
null
);
}).
collect
(
Collectors
.
toList
()));
List
<
List
<
Object
>>
read
=
req
.
getFundNavMessages
().
stream
().
map
(
ls
->
{
List
<
Object
>
linkedList
=
new
LinkedList
<>();
if
(
StringUtils
.
isNotEmpty
(
ls
.
getPrice_date
()))
{
linkedList
.
add
(
DateTime
.
of
(
ls
.
getPrice_date
(),
"yyyy-MM-dd"
).
getTim
e
());
linkedList
.
add
(
ls
.
getPrice_dat
e
());
}
else
{
linkedList
.
add
(
""
);
}
linkedList
.
add
(
ls
.
getNav
());
linkedList
.
add
(
ls
.
getCumulative_nav
());
linkedList
.
add
(
ls
.
getId
());
linkedList
.
add
(
ls
.
getFund_id
());
return
linkedList
;
}).
collect
(
Collectors
.
toList
());
...
...
@@ -1925,7 +1932,7 @@ public class ProductServiceImpl implements ProductService, Constant {
AtomicBoolean
errorStatus
,
List
<
List
<
Object
>>
read
)
{
List
<
FundNavMessage
>
newResultMessage
=
handlerNetImportCheck
(
ifaNavMap
,
resultMessage
,
errorStatus
,
read
);
if
(
errorStatus
.
get
())
{
/*
if (errorStatus.get()) {
//只做校验不入库
// this.ifaImportedFundNavMapper.batchInsert(resultMessage.stream().map(ls -> {
// IfaImportedFundNav nav = new IfaImportedFundNav();
...
...
@@ -1933,7 +1940,7 @@ public class ProductServiceImpl implements ProductService, Constant {
// return nav;
// }).collect(Collectors.toList()));
return CommonResp.success();
}
}
*/
newResultMessage
.
sort
(
Comparator
.
comparing
(
FundNavMessage:
:
getPriceDate
).
reversed
());
//return CommonResp.error("0003", "数据错误,请您重新核对", newResultMessage);
...
...
@@ -1994,13 +2001,22 @@ public class ProductServiceImpl implements ProductService, Constant {
read
.
forEach
(
ls
->
{
boolean
errorRow
=
false
;
FundNavMessage
message
=
new
FundNavMessage
();
if
(
ls
.
size
()
>
3
)
{
if
(
ls
.
get
(
3
)
!=
null
)
{
message
.
setId
(
Long
.
parseLong
(
ls
.
get
(
3
)
+
""
));
}
if
(
ls
.
get
(
4
)
!=
null
)
{
message
.
setFund_id
(
ls
.
get
(
4
)
+
""
);
}
}
String
row1
=
null
,
row2
,
row3
;
if
(
ls
.
get
(
0
)
==
null
)
{
errorRow
=
true
;
message
.
setMessage
(
"[净值日期不能为空]"
);
}
else
{
row1
=
(
ls
.
get
(
0
)
+
""
).
trim
();
row1
=
(
ls
.
get
(
0
)
+
""
).
trim
()
.
split
(
" "
)[
0
]
;
Date
date
=
null
;
try
{
date
=
DateUtil
.
parseDate
(
row1
);
...
...
@@ -2077,14 +2093,14 @@ public class ProductServiceImpl implements ProductService, Constant {
if
(
compare02
.
compareTo
(
cumSubtract
)
<
0
)
{
message
.
setConfirmStatus
(
2
);
if
(
StringUtils
.
isNotEmpty
(
message
.
getMessage
()))
{
message
.
setMessage
(
",[累计分红再投净值]与上次对比相差超过20%"
);
message
.
setMessage
(
message
.
getMessage
()
+
",[累计分红再投净值]与上次对比相差超过20%"
);
}
else
{
message
.
setMessage
(
"[累计分红再投净值]与上次对比相差超过20%"
);
}
}
}
newResultMessage
.
add
(
message
);
}
else
{
}
else
{
newResultMessage
.
add
(
message
);
}
...
...
@@ -2113,7 +2129,11 @@ public class ProductServiceImpl implements ProductService, Constant {
if
(
StringUtils
.
isEmpty
(
message
.
getMessage
()))
{
message
.
setMessage
(
"[相同日期存在重复数据]"
);
}
else
{
message
.
setMessage
(
message
.
getMessage
()
+
",[累计分红再投净值为空或格式错误]"
);
if
(
StringUtils
.
isEmpty
(
message
.
getMessage
()))
{
message
.
setMessage
(
"[累计分红再投净值为空或格式错误]"
);
}
else
{
message
.
setMessage
(
message
.
getMessage
()
+
",[累计分红再投净值为空或格式错误]"
);
}
}
}
});
...
...
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