Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-csf
Commits
b267c276
Commit
b267c276
authored
Apr 17, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增应付8
parent
ef9e2e1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
13 deletions
+23
-13
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+23
-13
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
b267c276
...
...
@@ -683,9 +683,18 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
.
map
(
FortuneAddRequest:
:
getPolicyNo
)
.
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toSet
());
// 查询保单号
Map
<
String
,
Policy
>
policyMap
=
new
HashMap
<>();
// 查询预计出账
Map
<
String
,
ExpectedFortune
>
expectedFortuneMap
=
new
HashMap
<>();
// 查询入账记录
Map
<
String
,
Commission
>
commissionByPolicyPeriod
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
policyNoSet
))
{
// 查询保单号
List
<
Policy
>
policyList
=
policyService
.
lambdaQuery
().
in
(
Policy:
:
getPolicyNo
,
policyNoSet
).
list
();
policyMap
=
policyList
.
stream
().
collect
(
Collectors
.
toMap
(
Policy:
:
getPolicyNo
,
Function
.
identity
(),
(
oldValue
,
newValue
)
->
newValue
));
// 查询预计出账
expectedFortuneMap
=
expectedFortuneService
.
lambdaQuery
()
.
in
(
ExpectedFortune:
:
getPolicyNo
,
policyNoSet
)
.
list
()
...
...
@@ -695,20 +704,18 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
Function
.
identity
(),
(
oldValue
,
newValue
)
->
newValue
)
);
// 查询入账记录
List
<
Commission
>
commissionList
=
commissionService
.
lambdaQuery
().
in
(
Commission:
:
getPolicyNo
,
policyNoSet
)
.
list
();
if
(
CollectionUtils
.
isNotEmpty
(
commissionList
))
{
commissionByPolicyPeriod
=
commissionList
.
stream
()
.
collect
(
Collectors
.
toMap
(
commission
->
commissionService
.
buildPolicyPeriodKey
(
commission
.
getPolicyNo
(),
commission
.
getCommissionPeriod
()),
Function
.
identity
(),
(
oldValue
,
newValue
)
->
newValue
// 遇到重复时使用新值
));
}
}
// 查询入账记录
List
<
Commission
>
commissionList
=
commissionService
.
lambdaQuery
().
in
(
Commission:
:
getPolicyNo
,
policyNoSet
)
.
list
();
Map
<
String
,
Commission
>
commissionByPolicyPeriod
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
commissionList
))
{
commissionByPolicyPeriod
=
commissionList
.
stream
()
.
collect
(
Collectors
.
toMap
(
commission
->
commissionService
.
buildPolicyPeriodKey
(
commission
.
getPolicyNo
(),
commission
.
getCommissionPeriod
()),
Function
.
identity
(),
(
oldValue
,
newValue
)
->
newValue
// 遇到重复时使用新值
));
}
List
<
Fortune
>
fortuneList
=
new
ArrayList
<>();
List
<
ExpectedFortune
>
expectedFortuneUpdateList
=
new
ArrayList
<>();
...
...
@@ -724,6 +731,9 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
fortune
.
setCurrentPaymentHkdAmount
(
fortune
.
getHkdAmount
());
if
(
"R"
.
equals
(
fortuneAddRequest
.
getFortuneBizType
()))
{
if
(
policyMap
.
get
(
fortuneAddRequest
.
getPolicyNo
())
==
null
)
{
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
fortuneAddRequest
.
getPolicyNo
()
+
" 保单号不存在"
);
}
ExpectedFortune
expectedFortune
=
expectedFortuneMap
.
get
(
fortuneAddRequest
.
getPolicyNo
()
+
"_"
+
fortuneAddRequest
.
getFortunePeriod
()
+
"_"
+
fortuneAddRequest
.
getFortuneType
());
if
(
expectedFortune
==
null
)
{
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
fortuneAddRequest
.
getFortuneName
()
+
" 预计出账不存在"
);
...
...
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