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
90c649e0
Commit
90c649e0
authored
May 25, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应付明细16
parent
a3a9364c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
31 deletions
+25
-31
yd-csf-feign/src/main/java/com/yd/csf/feign/response/expectedfortune/ApiExpectedFortunePageResponse.java
+1
-10
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/ExpectedFortuneServiceImpl.java
+2
-1
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
+22
-20
No files found.
yd-csf-feign/src/main/java/com/yd/csf/feign/response/expectedfortune/ApiExpectedFortunePageResponse.java
View file @
90c649e0
...
@@ -86,7 +86,7 @@ public class ApiExpectedFortunePageResponse {
...
@@ -86,7 +86,7 @@ public class ApiExpectedFortunePageResponse {
private
BigDecimal
exchangeRate
;
private
BigDecimal
exchangeRate
;
@Schema
(
description
=
"保单币种->HKD汇率"
)
@Schema
(
description
=
"保单币种->HKD汇率"
)
private
BigDecimal
defaultExchange
Rate
;
private
BigDecimal
originalToHkd
Rate
;
@Schema
(
description
=
"HKD->发放币种汇率"
)
@Schema
(
description
=
"HKD->发放币种汇率"
)
private
BigDecimal
hkdToPayoutRate
;
private
BigDecimal
hkdToPayoutRate
;
...
@@ -139,18 +139,9 @@ public class ApiExpectedFortunePageResponse {
...
@@ -139,18 +139,9 @@ public class ApiExpectedFortunePageResponse {
@Schema
(
description
=
"剩余发放折合港币金额"
)
@Schema
(
description
=
"剩余发放折合港币金额"
)
private
BigDecimal
unpaidRuleAmounthHkd
;
private
BigDecimal
unpaidRuleAmounthHkd
;
@Schema
(
description
=
"原币→港币汇率"
)
private
BigDecimal
originalToHkdRate
;
@Schema
(
description
=
"发放币种金额"
)
@Schema
(
description
=
"发放币种金额"
)
private
BigDecimal
payoutAmount
;
private
BigDecimal
payoutAmount
;
@Schema
(
description
=
"期交保费"
)
@Schema
(
description
=
"期交保费"
)
private
BigDecimal
premium
;
private
BigDecimal
premium
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/ExpectedFortuneServiceImpl.java
View file @
90c649e0
...
@@ -156,10 +156,11 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
...
@@ -156,10 +156,11 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
// 查找对应的实际发佣
// 查找对应的实际发佣
List
<
ApiExpectedFortunePageResponse
>
matchedList
=
actualMap
.
get
(
expected
.
getExpectedFortuneBizId
());
List
<
ApiExpectedFortunePageResponse
>
matchedList
=
actualMap
.
get
(
expected
.
getExpectedFortuneBizId
());
if
(
CollUtil
.
isNotEmpty
(
matchedList
))
{
if
(
CollUtil
.
isNotEmpty
(
matchedList
))
{
// 设置实际出账记录的字段:
待出账金额(估)、已出账比例、未出账比例、已出账金额
// 设置实际出账记录的字段:
持有比例、保费、关联人员
matchedList
.
forEach
(
actual
->
{
matchedList
.
forEach
(
actual
->
{
actual
.
setBrokerRatio
(
expected
.
getBrokerRatio
());
actual
.
setBrokerRatio
(
expected
.
getBrokerRatio
());
actual
.
setPremium
(
expected
.
getPremium
());
actual
.
setPremium
(
expected
.
getPremium
());
actual
.
setAmountSourceName
(
expected
.
getAmountSourceName
());
});
});
sortedList
.
addAll
(
matchedList
);
sortedList
.
addAll
(
matchedList
);
...
...
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
View file @
90c649e0
...
@@ -387,31 +387,33 @@
...
@@ -387,31 +387,33 @@
</select>
</select>
<select
id=
"queryListStatistics"
resultType=
"com.yd.csf.service.vo.ExpectedFortuneStatisticsVO"
>
<select
id=
"queryListStatistics"
resultType=
"com.yd.csf.service.vo.ExpectedFortuneStatisticsVO"
>
SELECT
WITH filtered_data AS (
COALESCE(SUM(hkd_amount), 0) AS totalExpectedAmount,
SELECT *
COALESCE(SUM(paid_amount), 0) AS totalPaidAmount,
FROM expected_fortune
COALESCE(SUM(unpaid_amount), 0) AS totalUnpaidAmount,
WHERE is_deleted = 0
COALESCE(SUM(totalPremiumAmount), 0) AS totalPremiumAmount,
AND is_part IN (0, 1)
COUNT(DISTINCT policy_no) AS totalPolicyCount
FROM (
SELECT
ef.hkd_amount,
ef.paid_amount,
ef.unpaid_amount,
ef.policy_no,
(SELECT p.total_payment_premium * ef.default_exchange_rate
FROM policy p
WHERE p.policy_no = ef.policy_no
) AS totalPremiumAmount
FROM expected_fortune ef
WHERE ef.is_deleted = 0
AND ef.is_part IN (0, 1)
<if
test=
"ew != null"
>
<if
test=
"ew != null"
>
<if
test=
"ew.sqlSegment != null and ew.sqlSegment != ''"
>
<if
test=
"ew.sqlSegment != null and ew.sqlSegment != ''"
>
AND ${ew.sqlSegment}
AND ${ew.sqlSegment}
</if>
</if>
</if>
</if>
) AS statistics
),
policy_premium AS (
SELECT
policy_no,
MIN(p.total_payment_premium * default_exchange_rate) AS premium_amount
FROM filtered_data
INNER JOIN policy p USING(policy_no)
GROUP BY policy_no
)
SELECT
COALESCE(SUM(fd.hkd_amount), 0) AS totalExpectedAmount,
COALESCE(SUM(fd.paid_amount), 0) AS totalPaidAmount,
COALESCE(SUM(fd.unpaid_amount), 0) AS totalUnpaidAmount,
COALESCE(SUM(pp.premium_amount), 0) AS totalPremiumAmount,
COUNT(DISTINCT fd.policy_no) AS totalPolicyCount
FROM filtered_data fd
LEFT JOIN policy_premium pp USING(policy_no)
</select>
</select>
<select
id=
"queryListNewCount"
resultType=
"java.lang.Long"
>
<select
id=
"queryListNewCount"
resultType=
"java.lang.Long"
>
...
...
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