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
1a7d10f8
Commit
1a7d10f8
authored
Mar 10, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出账检核总保费
parent
83222b93
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+22
-0
yd-csf-service/src/main/resources/mappers/FortuneMapper.xml
+1
-2
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
1a7d10f8
...
...
@@ -641,6 +641,28 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
if
(
fortuneStatistics
.
getAvailableOutAmount
()
==
null
)
{
fortuneStatistics
.
setAvailableOutAmount
(
BigDecimal
.
ZERO
);
}
// 计算总保费
if
(
CollectionUtils
.
isNotEmpty
(
fortuneIdList
))
{
List
<
Fortune
>
fortuneList
=
this
.
listByIds
(
fortuneIdList
);
Map
<
String
,
BigDecimal
>
exchangeRateMap
=
new
HashMap
<>();
for
(
Fortune
fortune
:
fortuneList
)
{
exchangeRateMap
.
put
(
fortune
.
getPolicyNo
(),
fortune
.
getExchangeRate
());
}
Set
<
String
>
policyNoSet
=
fortuneList
.
stream
().
map
(
Fortune:
:
getPolicyNo
).
collect
(
Collectors
.
toSet
());
// 查询总保费
List
<
Policy
>
policyList
=
policyService
.
lambdaQuery
().
in
(
Policy:
:
getPolicyNo
,
policyNoSet
).
list
();
BigDecimal
totalPremium
=
BigDecimal
.
ZERO
;
if
(
CollectionUtils
.
isNotEmpty
(
policyList
))
{
for
(
Policy
policy
:
policyList
)
{
BigDecimal
exchangeRate
=
exchangeRateMap
.
getOrDefault
(
policy
.
getPolicyNo
(),
BigDecimal
.
ONE
);
totalPremium
=
totalPremium
.
add
(
policy
.
getTotalPaymentPremium
().
multiply
(
exchangeRate
));
}
fortuneStatistics
.
setTotalPremium
(
totalPremium
);
}
}
return
fortuneStatistics
;
}
...
...
yd-csf-service/src/main/resources/mappers/FortuneMapper.xml
View file @
1a7d10f8
...
...
@@ -71,8 +71,7 @@
),0) AS pendingOutAmount,
SUM(CASE WHEN f.status in ('6','1') THEN f.current_payment_hkd_amount ELSE 0 END) AS availableOutAmount,
COUNT(DISTINCT f.policy_no) AS totalPolicyCount,
MAX(ce.expected_amount) AS totalInAmount,
MAX(ce.premium) AS totalPremium
MAX(ce.expected_amount) AS totalInAmount
FROM fortune f
LEFT JOIN commission_expected ce ON f.commission_expected_biz_id = ce.commission_expected_biz_id
WHERE 1 = 1
...
...
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