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
55e1f09d
Commit
55e1f09d
authored
Feb 28, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新单跟进新增字段,保单类型、邮寄物品,预计来佣和预计发佣日期计算逻辑修改
parent
605d0992
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
95 additions
and
60 deletions
+95
-60
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiCustomerController.java
+3
-1
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyFollowController.java
+0
-36
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
+24
-8
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
+3
-3
yd-csf-service/src/main/java/com/yd/csf/service/dto/MailingInfoSaveRequest.java
+3
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/PolicyFollowDto.java
+3
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/QueryPolicyAndBrokerDto.java
+5
-0
yd-csf-service/src/main/java/com/yd/csf/service/model/PolicyFollow.java
+11
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
+12
-8
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
+3
-3
yd-csf-service/src/main/java/com/yd/csf/service/vo/PolicyFollowDetailVO.java
+12
-0
yd-csf-service/src/main/java/com/yd/csf/service/vo/PolicyFollowVO.java
+12
-0
yd-csf-service/src/main/resources/mappers/PolicyMapper.xml
+4
-1
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiCustomerController.java
View file @
55e1f09d
...
...
@@ -235,7 +235,9 @@ public class ApiCustomerController {
Page
<
Customer
>
customerPage
=
customerService
.
page
(
new
Page
<>(
current
,
size
),
customerService
.
getQueryWrapper
(
customerQueryRequest
));
// 获取封装类
return
Result
.
success
(
customerService
.
getCustomerVOPage
(
customerPage
));
Page
<
CustomerVO
>
customerVOPage
=
customerService
.
getCustomerVOPage
(
customerPage
);
return
Result
.
success
(
customerVOPage
);
}
}
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyFollowController.java
View file @
55e1f09d
...
...
@@ -78,8 +78,6 @@ public class ApiPolicyFollowController {
@Resource
private
CustomerService
customerService
;
@Resource
private
ReconciliationCompanyService
reconciliationCompanyService
;
@Resource
private
PolicyFollowRecordService
policyFollowRecordService
;
@Resource
private
PolicyFollowFileService
policyFollowFileService
;
...
...
@@ -168,40 +166,6 @@ public class ApiPolicyFollowController {
return
Result
.
success
(
true
);
}
private
List
<
ReconciliationCompany
>
saveReconciliationCompany
(
Set
<
String
>
reconciliationCompanyNames
)
{
List
<
ReconciliationCompany
>
reconciliationCompanyList
=
new
ArrayList
<>();
// 查询已存在的对账公司
List
<
ReconciliationCompany
>
existingCompanies
=
reconciliationCompanyService
.
lambdaQuery
()
.
in
(
ReconciliationCompany:
:
getCompanyName
,
reconciliationCompanyNames
)
.
list
();
Set
<
String
>
existingCompanyNames
=
existingCompanies
.
stream
()
.
map
(
ReconciliationCompany:
:
getCompanyName
)
.
collect
(
Collectors
.
toSet
());
// 过滤掉已存在的公司名称
Set
<
String
>
newCompanyNames
=
reconciliationCompanyNames
.
stream
()
.
filter
(
name
->
!
existingCompanyNames
.
contains
(
name
))
.
collect
(
Collectors
.
toSet
());
// 只保存新的对账公司
for
(
String
reconciliationCompanyName
:
newCompanyNames
)
{
ReconciliationCompany
reconciliationCompany
=
new
ReconciliationCompany
();
reconciliationCompany
.
setReconciliationCompanyBizId
(
RandomStringGenerator
.
generateBizId16
(
"reconciliation_company"
));
reconciliationCompany
.
setCompanyName
(
reconciliationCompanyName
);
reconciliationCompanyList
.
add
(
reconciliationCompany
);
}
if
(!
reconciliationCompanyList
.
isEmpty
())
{
reconciliationCompanyService
.
saveBatch
(
reconciliationCompanyList
);
}
// 返回所有对账公司(包括已存在的和新建的)
List
<
ReconciliationCompany
>
allCompanies
=
new
ArrayList
<>(
existingCompanies
);
allCompanies
.
addAll
(
reconciliationCompanyList
);
return
allCompanies
;
}
private
String
validatePolicyNo
(
List
<
PolicyExcelDTO
>
dtoList
)
{
String
validateMsg
=
""
;
// 校验保单号是否为空
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
View file @
55e1f09d
...
...
@@ -610,6 +610,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
ApiInsurantInfoDto
apiInsurantInfoDto
=
null
;
List
<
ApiBeneficiaryInfoDto
>
apiBeneficiaryInfoDtoList
=
null
;
ApiSecondHolderInfoDto
apiSecondHolderInfoDto
=
null
;
List
<
ApiAppointmentFileDto
>
apiAppointmentFileDtoList
=
null
;
String
policyTransfer
=
null
;
if
(!
Objects
.
isNull
(
response
)
&&
!
Objects
.
isNull
(
response
.
getApiProductPlanInfoDto
())
...
...
@@ -627,6 +628,8 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
apiBeneficiaryInfoDtoList
=
response
.
getApiBeneficiaryInfoFzDto
().
getApiBeneficiaryInfoDtoList
();
// 第二持有人
apiSecondHolderInfoDto
=
response
.
getApiSecondHolderInfoDto
();
// 预约附件信息列表
apiAppointmentFileDtoList
=
response
.
getApiAppointmentFileDtoList
();
}
if
(!
Objects
.
isNull
(
response
)
&&
!
Objects
.
isNull
(
response
.
getApiInsurantInfoDto
()))
{
...
...
@@ -763,20 +766,33 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
// // 同步保存保单(产品计划)
// savePolicy(productPlan, apiPolicyholderInfoDto, apiInsurantInfoDto, apiProductPlanMainInfoDto, policyBizId, policyTransfer);
// // 同步保存保单投保人
// savePolicyPolicyholder(apiPolicyholderInfoDto, policyBizId);
// // 同步保存保单受保人
// savePolicyInsurant(apiInsurantInfoDto, policyBizId);
// // 同步保存保单受益人
// savePolicyBeneficiary(apiBeneficiaryInfoDtoList, policyBizId);
// // 同步保存保单第二持有人
// savePolicySecondHolder(apiSecondHolderInfoDto, policyBizId);
// 同步保存保单投保人
savePolicyPolicyholder
(
apiPolicyholderInfoDto
,
policyBizId
);
// 同步保存保单受保人
savePolicyInsurant
(
apiInsurantInfoDto
,
policyBizId
);
// 同步保存保单受益人
savePolicyBeneficiary
(
apiBeneficiaryInfoDtoList
,
policyBizId
);
// 同步保存保单第二持有人
savePolicySecondHolder
(
apiSecondHolderInfoDto
,
policyBizId
);
// 同步保存预约附件
savePolicyAppointmentAttachment
(
apiAppointmentFileDtoList
,
policyBizId
);
// // 同步问卷信息
// savePolicyQuestionnaire(appointment.getAppointmentBizId(), policyBizId);
return
Result
.
success
();
}
private
void
savePolicyAppointmentAttachment
(
List
<
ApiAppointmentFileDto
>
apiAppointmentFileDtoList
,
String
policyBizId
)
{
if
(
ObjectUtils
.
isNotEmpty
(
apiAppointmentFileDtoList
))
{
apiAppointmentFileDtoList
.
forEach
(
apiAppointmentFileDto
->
{
// apiAppointmentFileDto.setPolicyBizId(policyBizId);
});
// policyAppointmentFileService.saveOrUpdateBatch(apiAppointmentFileDtoList);
}
}
private
void
savePolicyBroker
(
String
fnaBizId
,
String
policyBizId
)
{
log
.
info
(
"同步保存保单转介人, fnaBizId: {}, policyBizId: {}"
,
fnaBizId
,
policyBizId
);
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
View file @
55e1f09d
...
...
@@ -497,8 +497,8 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
return
Result
.
success
();
}
private
static
LocalDate
calculateExpectedPayoutDate
(
LocalDate
effective
Date
,
Integer
issueNumber
)
{
return
effectiveDate
.
plusMonths
(
3
).
plusYears
(
issueNumber
-
1
);
private
static
LocalDate
calculateExpectedPayoutDate
(
LocalDate
coolingOffEnd
Date
,
Integer
issueNumber
)
{
return
coolingOffEndDate
.
plusMonths
(
2
).
plusYears
(
issueNumber
-
1
);
}
/**
...
...
@@ -550,7 +550,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
//发佣类型 TODO
// .fortuneType()
//发佣日期
.
payoutDate
(
calculateExpectedPayoutDate
(
brokerDto
.
get
Effective
Date
(),
dto
.
getIssueNumber
()))
.
payoutDate
(
calculateExpectedPayoutDate
(
brokerDto
.
get
CoolingOffEnd
Date
(),
dto
.
getIssueNumber
()))
//保单号
.
policyNo
(
brokerDto
.
getPolicyNo
())
//佣金发放状态 0=待出账 1=可出账 2=已出账
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/MailingInfoSaveRequest.java
View file @
55e1f09d
...
...
@@ -31,4 +31,7 @@ public class MailingInfoSaveRequest implements Serializable {
@Schema
(
description
=
"客户签收日期"
,
format
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
customerSignDate
;
@Schema
(
description
=
"邮寄物品"
)
private
String
mailingItem
;
}
yd-csf-service/src/main/java/com/yd/csf/service/dto/PolicyFollowDto.java
View file @
55e1f09d
...
...
@@ -233,4 +233,7 @@ public class PolicyFollowDto implements Serializable {
@Schema
(
description
=
"转介人列表"
)
private
List
<
PolicyBrokerDto
>
brokerList
;
@Schema
(
description
=
"保单类型: 1-电子, 2-纸质"
)
private
String
policyType
;
}
yd-csf-service/src/main/java/com/yd/csf/service/dto/QueryPolicyAndBrokerDto.java
View file @
55e1f09d
...
...
@@ -50,6 +50,11 @@ public class QueryPolicyAndBrokerDto {
private
LocalDate
effectiveDate
;
/**
* 冷静期到期日
*/
private
LocalDate
coolingOffEndDate
;
/**
* 期交保费
*/
private
BigDecimal
paymentPremium
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/PolicyFollow.java
View file @
55e1f09d
...
...
@@ -346,6 +346,11 @@ public class PolicyFollow implements Serializable {
private
String
deliveryNo
;
/**
* 邮寄物品
*/
private
String
mailingItem
;
/**
* 保单征费
*/
private
String
policyLevy
;
...
...
@@ -405,6 +410,11 @@ public class PolicyFollow implements Serializable {
*/
private
Date
updateTime
;
/**
* 保单类型: 1-电子, 2-纸质
*/
private
String
policyType
;
@TableField
(
exist
=
false
)
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
View file @
55e1f09d
...
...
@@ -485,6 +485,10 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
if
(
effectiveDate
==
null
)
{
throw
new
BusinessException
(
"保单生效日期不能为空"
);
}
Date
coolingOffEndDate
=
policy
.
getCoolingOffEndDate
();
if
(
coolingOffEndDate
==
null
)
{
throw
new
BusinessException
(
"保单冷静期到期日不能为空"
);
}
String
paymentTerm
=
Convert
.
toStr
(
policy
.
getPaymentTerm
());
if
(
paymentTerm
==
null
)
{
throw
new
BusinessException
(
"保单供款年期不能为空"
);
...
...
@@ -532,7 +536,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
commissionExpected
.
setCommissionRatio
(
item
.
getCommissionRate
());
commissionExpected
.
setAmount
(
null
);
commissionExpected
.
setCurrency
(
item
.
getCurrency
());
commissionExpected
.
setCommissionDate
(
calculateCommissionDate
(
item
.
getEndPeriod
(),
effective
Date
));
commissionExpected
.
setCommissionDate
(
calculateCommissionDate
(
item
.
getEndPeriod
(),
coolingOffEnd
Date
));
commissionExpected
.
setStatus
(
CommissionExpectedStatusEnum
.
PENDING
.
getItemValue
());
commissionExpected
.
setStatusDesc
(
null
);
commissionExpected
.
setDefaultExchangeRate
(
queryExchangeRateByFeign
(
policy
.
getCurrency
(),
item
.
getCurrency
()));
...
...
@@ -636,20 +640,20 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
}
/**
* 根据保单
生效日期和佣金期数计算预计来佣日期,首期为保单生效日次
月,后续期数为首期的次年
* 根据保单
冷静期到期日和佣金期数计算预计来佣日期,首期为冷静期到期日的2个
月,后续期数为首期的次年
* @param endPeriod 佣金期数
* @param
effectiveDate 保单生效日期
* @param
coolingOffEndDate 保单冷静期到期日
* @return 预计来佣日期
*/
private
Date
calculateCommissionDate
(
String
endPeriod
,
Date
effective
Date
)
{
if
(
effective
Date
==
null
||
StringUtils
.
isBlank
(
endPeriod
))
{
private
Date
calculateCommissionDate
(
String
endPeriod
,
Date
coolingOffEnd
Date
)
{
if
(
coolingOffEnd
Date
==
null
||
StringUtils
.
isBlank
(
endPeriod
))
{
return
null
;
}
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
effective
Date
);
// 首期:保单
生效日次
月
cal
.
add
(
Calendar
.
MONTH
,
1
);
cal
.
setTime
(
coolingOffEnd
Date
);
// 首期:保单
冷静期到期日的2个
月
cal
.
add
(
Calendar
.
MONTH
,
2
);
Integer
period
=
Convert
.
toInt
(
endPeriod
);
if
(
period
==
null
||
period
<=
0
)
{
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
View file @
55e1f09d
...
...
@@ -760,17 +760,17 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
String
loginUserId
=
currentLoginUser
.
getId
().
toString
();
// 更新邮寄信息相关字段
boolean
result
=
this
.
lambdaUpdate
()
return
this
.
lambdaUpdate
()
.
eq
(
PolicyFollow:
:
getPolicyBizId
,
policyBizId
)
.
set
(
mailingInfoSaveRequest
.
getMailingMethod
()
!=
null
,
PolicyFollow:
:
getMailingMethod
,
mailingInfoSaveRequest
.
getMailingMethod
())
.
set
(
mailingInfoSaveRequest
.
getDeliveryNo
()
!=
null
,
PolicyFollow:
:
getDeliveryNo
,
mailingInfoSaveRequest
.
getDeliveryNo
())
.
set
(
mailingInfoSaveRequest
.
getBrokerSignDate
()
!=
null
,
PolicyFollow:
:
getBrokerSignDate
,
mailingInfoSaveRequest
.
getBrokerSignDate
())
.
set
(
mailingInfoSaveRequest
.
getCustomerSignDate
()
!=
null
,
PolicyFollow:
:
getCustomerSignDate
,
mailingInfoSaveRequest
.
getCustomerSignDate
())
.
set
(
mailingInfoSaveRequest
.
getMailingItem
()
!=
null
,
PolicyFollow:
:
getMailingItem
,
mailingInfoSaveRequest
.
getMailingItem
())
.
set
(
PolicyFollow:
:
getUpdaterId
,
loginUserId
)
.
set
(
PolicyFollow:
:
getUpdateTime
,
new
Date
())
.
update
();
return
result
;
}
@Override
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/PolicyFollowDetailVO.java
View file @
55e1f09d
...
...
@@ -414,6 +414,12 @@ public class PolicyFollowDetailVO implements Serializable {
private
String
deliveryNo
;
/**
* 邮寄物品
*/
@Schema
(
description
=
"邮寄物品"
)
private
String
mailingItem
;
/**
* 保单征费
*/
@Schema
(
description
=
"保单征费"
)
...
...
@@ -501,6 +507,12 @@ public class PolicyFollowDetailVO implements Serializable {
@Schema
(
description
=
"更新时间"
)
private
Date
updateTime
;
/**
* 保单类型: 1-电子, 2-纸质
*/
@Schema
(
description
=
"保单类型: 1-电子, 2-纸质"
)
private
String
policyType
;
@TableField
(
exist
=
false
)
private
static
final
long
serialVersionUID
=
1L
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/PolicyFollowVO.java
View file @
55e1f09d
...
...
@@ -135,6 +135,18 @@ public class PolicyFollowVO implements Serializable {
private
String
insuranceCompanyBizId
;
/**
* 保单类型: 1-电子, 2-纸质
*/
@Schema
(
description
=
"保单类型: 1-电子, 2-纸质"
)
private
String
policyType
;
/**
* 邮寄物品
*/
@Schema
(
description
=
"邮寄物品"
)
private
String
mailingItem
;
/**
* 对象转封装类
*
* @param policyFollow
...
...
yd-csf-service/src/main/resources/mappers/PolicyMapper.xml
View file @
55e1f09d
...
...
@@ -65,7 +65,10 @@
<select
id=
"queryPolicyBrokerList"
resultType=
"com.yd.csf.service.dto.QueryPolicyAndBrokerDto"
>
select p.*,pb.*,p.product_launch_biz_id as planBizId
select p.*,
pb.*,
p.product_launch_biz_id as planBizId,
p.cooling_off_end_date as coolingOffEndDate
from policy p
left join policy_broker pb on pb.policy_no = p.policy_no and pb.is_deleted = 0
<where>
...
...
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