Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-product
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-product
Commits
48abef2d
Commit
48abef2d
authored
Mar 25, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
5fab4ff7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
7 deletions
+25
-7
yd-product-service/src/main/resources/mappers/AnnouncementCommissionRatioMapper.xml
+25
-7
No files found.
yd-product-service/src/main/resources/mappers/AnnouncementCommissionRatioMapper.xml
View file @
48abef2d
...
@@ -126,6 +126,22 @@
...
@@ -126,6 +126,22 @@
FROM announcement_commission_ratio acr
FROM announcement_commission_ratio acr
INNER JOIN species_attrs sa ON acr.announcement_species_biz_id = sa.announcement_species_biz_id
INNER JOIN species_attrs sa ON acr.announcement_species_biz_id = sa.announcement_species_biz_id
INNER JOIN valid_species as1 ON acr.announcement_species_biz_id = as1.announcement_species_biz_id
INNER JOIN valid_species as1 ON acr.announcement_species_biz_id = as1.announcement_species_biz_id
-- 派生表:将保单保费转换为港币(若币种非HKD则通过跨库汇率表转换)
CROSS JOIN (
SELECT
CASE
WHEN #{request.policyCurrency} = 'HKD' THEN #{request.eachIssuePremium}
ELSE #{request.eachIssuePremium} * (
SELECT exchange_rate
FROM yd_base.exchange_rate
WHERE base_currency = #{request.policyCurrency}
AND target_currency = 'HKD'
AND is_active = 1
AND is_deleted = 0
LIMIT 1
)
END AS converted_premium
) cp
WHERE acr.is_deleted = 0
WHERE acr.is_deleted = 0
AND acr.status = 1
AND acr.status = 1
<if
test=
"request.effectiveDate != null"
>
<if
test=
"request.effectiveDate != null"
>
...
@@ -180,25 +196,27 @@
...
@@ -180,25 +196,27 @@
)
)
)
)
<!-- 期缴保费(区间值)匹配:左开右闭 -->
<!-- 期缴保费(区间值)匹配:左开右闭
,使用转换后的港币保费
-->
AND (
AND (
sa.premium_val IS NULL
sa.premium_val IS NULL
OR (
OR (
cp.converted_premium IS NOT NULL
AND (
LOCATE('-', sa.premium_val) = 0
LOCATE('-', sa.premium_val) = 0
AND sa.premium_val = #{request.eachIssuePremium}
AND CAST(sa.premium_val AS DECIMAL(20,2)) = cp.converted_premium
)
OR
OR (
LOCATE('-', sa.premium_val) > 0
LOCATE('-', sa.premium_val) > 0
AND (
AND (
(
(
SUBSTRING_INDEX(sa.premium_val, '-', -1) != ''
SUBSTRING_INDEX(sa.premium_val, '-', -1) != ''
AND CAST(SUBSTRING_INDEX(sa.premium_val, '-', 1) AS DECIMAL(20,2))
<
#{request.eachIssuePremium}
AND CAST(SUBSTRING_INDEX(sa.premium_val, '-', 1) AS DECIMAL(20,2))
<
cp.converted_premium
AND CAST(SUBSTRING_INDEX(sa.premium_val, '-', -1) AS DECIMAL(20,2)) >=
#{request.eachIssuePremium}
AND CAST(SUBSTRING_INDEX(sa.premium_val, '-', -1) AS DECIMAL(20,2)) >=
cp.converted_premium
)
)
OR
OR
(
(
SUBSTRING_INDEX(sa.premium_val, '-', -1) = ''
SUBSTRING_INDEX(sa.premium_val, '-', -1) = ''
AND CAST(SUBSTRING_INDEX(sa.premium_val, '-', 1) AS DECIMAL(20,2))
<
#{request.eachIssuePremium}
AND CAST(SUBSTRING_INDEX(sa.premium_val, '-', 1) AS DECIMAL(20,2))
<
cp.converted_premium
)
)
)
)
)
)
)
...
...
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