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
cb58c907
Commit
cb58c907
authored
Apr 24, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
7c43e470
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
125 additions
and
3 deletions
+125
-3
yd-csf-service/src/main/java/com/yd/csf/service/dto/PolicyFollowQueryRequest.java
+22
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/QueryPolicyBrokerDto.java
+5
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyBrokerService.java
+1
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyBrokerServiceImpl.java
+2
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
+65
-3
yd-csf-service/src/main/java/com/yd/csf/service/vo/PolicyFollowVO.java
+21
-0
yd-csf-service/src/main/java/com/yd/csf/service/vo/ReceivableReportVO.java
+7
-0
yd-csf-service/src/main/resources/mappers/CommissionExpectedMapper.xml
+2
-0
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/dto/PolicyFollowQueryRequest.java
View file @
cb58c907
...
...
@@ -85,5 +85,26 @@ public class PolicyFollowQueryRequest extends PageDto implements Serializable {
@Schema
(
description
=
"缴费年期"
)
private
Integer
issueNumber
;
/**
* 保單持有人
*/
private
String
policyHolder
;
/**
* 受保人
*/
private
String
insured
;
/**
* 签单人
*/
private
String
signer
;
/**
* 转介人名称
*/
private
String
brokerName
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yd-csf-service/src/main/java/com/yd/csf/service/dto/QueryPolicyBrokerDto.java
View file @
cb58c907
...
...
@@ -27,4 +27,9 @@ public class QueryPolicyBrokerDto {
* 转介人业务ID(客户端用户表唯一业务ID)
*/
private
String
brokerBizId
;
/**
* 转介人名称
*/
private
String
brokerName
;
}
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyBrokerService.java
View file @
cb58c907
...
...
@@ -20,4 +20,5 @@ public interface PolicyBrokerService extends IService<PolicyBroker> {
void
removeByPolicyBizId
(
String
policyBizId
);
List
<
String
>
selectRelatedBrokerBizIds
(
String
clientUserId
);
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyBrokerServiceImpl.java
View file @
cb58c907
...
...
@@ -7,6 +7,7 @@ import com.yd.csf.service.model.Policy;
import
com.yd.csf.service.model.PolicyBroker
;
import
com.yd.csf.service.service.PolicyBrokerService
;
import
com.yd.csf.service.dao.PolicyBrokerMapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -29,6 +30,7 @@ public class PolicyBrokerServiceImpl extends ServiceImpl<PolicyBrokerMapper, Pol
@Override
public
List
<
PolicyBroker
>
queryList
(
QueryPolicyBrokerDto
dto
)
{
List
<
PolicyBroker
>
list
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
PolicyBroker
>()
.
like
(
StringUtils
.
isNotBlank
(
dto
.
getBrokerName
()),
PolicyBroker:
:
getBrokerName
,
dto
.
getBrokerName
())
.
in
(!
CollectionUtils
.
isEmpty
(
dto
.
getPolicyNoList
()),
PolicyBroker:
:
getPolicyNo
,
dto
.
getPolicyNoList
())
);
return
list
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
View file @
cb58c907
...
...
@@ -125,6 +125,21 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
queryWrapper
.
ge
(
ObjectUtils
.
isNotEmpty
(
signDateStart
),
"sign_date"
,
signDateStart
);
queryWrapper
.
le
(
ObjectUtils
.
isNotEmpty
(
signDateEnd
),
"sign_date"
,
signDateEnd
);
queryWrapper
.
eq
(
ObjectUtils
.
isNotEmpty
(
latestPaymentDate
),
"latest_payment_date"
,
latestPaymentDate
);
//保單持有人(投保人)
queryWrapper
.
like
(
StringUtils
.
isNotEmpty
(
policyFollowQueryRequest
.
getPolicyHolder
()),
"policy_holder"
,
policyFollowQueryRequest
.
getPolicyHolder
());
//受保人
queryWrapper
.
like
(
StringUtils
.
isNotEmpty
(
policyFollowQueryRequest
.
getInsured
()),
"insured"
,
policyFollowQueryRequest
.
getInsured
());
//签单人
queryWrapper
.
like
(
StringUtils
.
isNotEmpty
(
policyFollowQueryRequest
.
getSigner
()),
"signer"
,
policyFollowQueryRequest
.
getSigner
());
//转介人(保单转介人表)
List
<
PolicyBroker
>
policyBrokerList
=
policyBrokerService
.
queryList
(
QueryPolicyBrokerDto
.
builder
().
brokerName
(
policyFollowQueryRequest
.
getBrokerName
()).
build
());
if
(!
CollectionUtils
.
isEmpty
(
policyBrokerList
))
{
//新单跟进唯一业务ID
List
<
String
>
policyBizIdList
=
policyBrokerList
.
stream
().
map
(
PolicyBroker:
:
getPolicyBizId
).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
policyBizIdList
))
{
queryWrapper
.
in
(
"policy_biz_id"
,
policyBizIdList
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
insuranceCompanyBizIdList
))
{
queryWrapper
.
in
(
"insurance_company_biz_id"
,
insuranceCompanyBizIdList
);
...
...
@@ -142,14 +157,61 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
@Override
public
Page
<
PolicyFollowVO
>
getPolicyFollowVOPage
(
Page
<
PolicyFollow
>
policyFollowPage
)
{
List
<
PolicyFollow
>
policyFollowList
=
policyFollowPage
.
getRecords
();
Page
<
PolicyFollowVO
>
policyFollowVOPage
=
new
Page
<>(
policyFollowPage
.
getCurrent
(),
policyFollowPage
.
getSize
(),
policyFollowPage
.
getTotal
());
Page
<
PolicyFollowVO
>
policyFollowVOPage
=
new
Page
<>(
policyFollowPage
.
getCurrent
(),
policyFollowPage
.
getSize
(),
policyFollowPage
.
getTotal
());
if
(
CollUtil
.
isEmpty
(
policyFollowList
))
{
return
policyFollowVOPage
;
}
// 对象列表 => 封装对象列表
List
<
PolicyFollowVO
>
policyFollowVOList
=
policyFollowList
.
stream
().
map
(
PolicyFollowVO:
:
objToVo
).
collect
(
Collectors
.
toList
());
List
<
PolicyFollowVO
>
voList
=
policyFollowList
.
stream
()
.
map
(
PolicyFollowVO:
:
objToVo
)
.
collect
(
Collectors
.
toList
());
// 批量填充 brokerName
fillBrokerNames
(
voList
);
return
policyFollowVOPage
.
setRecords
(
policyFollowVOList
);
policyFollowVOPage
.
setRecords
(
voList
);
return
policyFollowVOPage
;
}
/**
* 批量设置每个保单的第一个转介人名称
*/
private
void
fillBrokerNames
(
List
<
PolicyFollowVO
>
voList
)
{
// 1. 提取所有 policyBizId
List
<
String
>
bizIds
=
voList
.
stream
()
.
map
(
PolicyFollowVO:
:
getPolicyBizId
)
.
filter
(
StringUtils:
:
isNotBlank
)
.
distinct
()
.
collect
(
Collectors
.
toList
());
if
(
CollUtil
.
isEmpty
(
bizIds
))
{
return
;
}
// 2. 批量查询转介人(每个 policyBizId 对应的所有记录,按 id 排序)
List
<
PolicyBroker
>
allBrokers
=
policyBrokerService
.
lambdaQuery
()
.
in
(
PolicyBroker:
:
getPolicyBizId
,
bizIds
)
.
eq
(
PolicyBroker:
:
getIsDeleted
,
0
)
.
orderByAsc
(
PolicyBroker:
:
getId
)
// 保证“第一个”的确定性
.
list
();
// 3. 按 policyBizId 分组,并取每组第一条
Map
<
String
,
String
>
brokerNameMap
=
allBrokers
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
PolicyBroker:
:
getPolicyBizId
,
LinkedHashMap:
:
new
,
// 保持插入顺序
Collectors
.
collectingAndThen
(
Collectors
.
toList
(),
list
->
list
.
get
(
0
).
getBrokerName
()
// 取第一条的 brokerName
)
));
// 4. 设置 brokerName
voList
.
forEach
(
vo
->
{
String
name
=
brokerNameMap
.
get
(
vo
.
getPolicyBizId
());
vo
.
setBrokerName
(
name
);
});
}
@Override
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/PolicyFollowVO.java
View file @
cb58c907
...
...
@@ -9,6 +9,7 @@ import lombok.Data;
import
org.springframework.beans.BeanUtils
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.*
;
/**
...
...
@@ -153,6 +154,26 @@ public class PolicyFollowVO implements Serializable {
private
String
mailingItem
;
/**
* 转介人名称(取保单转介人表第一个)
*/
private
String
brokerName
;
/**
* 每期保费
*/
private
BigDecimal
eachIssuePremium
;
/**
* 签单人
*/
private
String
signer
;
/**
* 冷静期结束日期
*/
private
Date
coolingOffEndDate
;
/**
* 对象转封装类
*
* @param policyFollow
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/ReceivableReportVO.java
View file @
cb58c907
package
com
.
yd
.
csf
.
service
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -138,4 +139,10 @@ public class ReceivableReportVO {
*/
@Schema
(
description
=
"保单币种"
)
private
String
policyCurrency
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
private
String
remark
;
}
yd-csf-service/src/main/resources/mappers/CommissionExpectedMapper.xml
View file @
cb58c907
...
...
@@ -71,6 +71,7 @@
select
null as receivableNo,
ce.policy_no as policyNo,
ce.remark,
MAX(ce.reconciliation_company) as reconciliationCompany,
MAX(ce.reconciliation_company_biz_id) as reconciliationCompanyBizId,
ce.commission_period as commissionPeriod,
...
...
@@ -112,6 +113,7 @@
select
ce.receivable_no as receivableNo,
ce.policy_no as policyNo,
ce.remark,
ce.reconciliation_company as reconciliationCompany,
ce.reconciliation_company_biz_id as reconciliationCompanyBizId,
ce.commission_period as commissionPeriod,
...
...
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