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
c7e53c8e
Commit
c7e53c8e
authored
Jan 14, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新单跟进v2
parent
f087e6d8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
279 additions
and
68 deletions
+279
-68
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyFollowController.java
+5
-26
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyFollowService.java
+6
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
+35
-1
yd-csf-service/src/main/java/com/yd/csf/service/vo/PolicyFollowDetailVO.java
+233
-41
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyFollowController.java
View file @
c7e53c8e
...
...
@@ -490,38 +490,17 @@ public class ApiPolicyFollowController {
*/
@GetMapping
(
"/get/vo"
)
@Operation
(
summary
=
"根据 policyBizId 获取新单跟进详情"
)
public
Result
<
PolicyFollowVO
>
getPolicyFollowByPolicyBizId
(
@RequestParam
(
"policyBizId"
)
String
policyBizId
,
HttpServletRequest
request
)
{
public
Result
<
PolicyFollow
Detail
VO
>
getPolicyFollowByPolicyBizId
(
@RequestParam
(
"policyBizId"
)
String
policyBizId
,
HttpServletRequest
request
)
{
if
(
StringUtils
.
isBlank
(
policyBizId
))
{
return
Result
.
fail
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
"policyBizId不能为空"
);
}
// 查询数据库
PolicyFollow
policyFollow
=
policyFollowService
.
getByPolicyBizId
(
policyBizId
);
if
(
policyFollow
==
null
)
{
// 查询数据库
并组装详情数据(包含附加险和介绍人)
PolicyFollow
DetailVO
detailVO
=
policyFollowService
.
getPolicyFollowDetailVO
(
policyBizId
);
if
(
detailVO
==
null
)
{
return
Result
.
fail
(
ErrorCode
.
NOT_FOUND_ERROR
.
getCode
(),
ErrorCode
.
NOT_FOUND_ERROR
.
getMessage
());
}
// 异步查询产品上架信息表
if
(
StringUtils
.
isNotBlank
(
policyFollow
.
getPolicyNo
())
&&
StringUtils
.
isBlank
(
policyFollow
.
getProductLaunchBizId
()))
{
// 异步查询产品上架信息表
// ApiExpectedCommissionRatioPageRequest apiExpectedCommissionRatioPageRequest = new ApiExpectedCommissionRatioPageRequest();
// apiExpectedCommissionRatioPageRequest.setPageNo(1);
// apiExpectedCommissionRatioPageRequest.setPageSize(100);
// apiExpectedCommissionRatioPageRequest.setWarrantyPeriod(String.valueOf(policyFollow.getPaymentTerm()));
// Result<Page<ApiExpectedCommissionRatioPageResponse>> result = apiExpectedCommissionRatioFeignClient.page(apiExpectedCommissionRatioPageRequest);
// if (result != null && result.getData() != null) {
// List<ApiExpectedCommissionRatioPageResponse> records = (List<ApiExpectedCommissionRatioPageResponse>) result.getData();
// if (CollectionUtils.isNotEmpty(records)) {
// policyFollow.setProductLaunchBizId(records.get(0).getProductLaunchBizId());
// }
// }
PolicyFollow
updatePolicyFollow
=
new
PolicyFollow
();
updatePolicyFollow
.
setId
(
policyFollow
.
getId
());
updatePolicyFollow
.
setProductLaunchBizId
(
"product_launch_kudwRqXsz1"
);
policyFollowService
.
updateById
(
updatePolicyFollow
);
}
// 获取封装类
return
Result
.
success
(
policyFollowService
.
getPolicyFollowVO
(
policyFollow
)
);
return
Result
.
success
(
detailVO
);
}
/**
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyFollowService.java
View file @
c7e53c8e
...
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.yd.csf.service.dto.*
;
import
com.yd.csf.service.enums.PolicyFollowStatusEnum
;
import
com.yd.csf.service.model.PolicyFollow
;
import
com.yd.csf.service.vo.PolicyFollowDetailVO
;
import
com.yd.csf.service.vo.PolicyFollowVO
;
import
java.util.List
;
...
...
@@ -40,6 +41,11 @@ public interface PolicyFollowService extends IService<PolicyFollow> {
*/
Map
<
String
,
Object
>
addPolicyFollowDto
(
PolicyFollowDto
policyFollowDto
);
/**
* 获取新单跟进详情(包含附加险和介绍人)
*/
PolicyFollowDetailVO
getPolicyFollowDetailVO
(
String
policyBizId
);
Boolean
addToPolicy
(
List
<
String
>
policyNoList
);
Boolean
changePolicyFollowStatus
(
ChangePolicyFollowStatusRequest
changePolicyFollowStatusRequest
,
PolicyFollow
policyFollow
);
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
View file @
c7e53c8e
...
...
@@ -22,6 +22,7 @@ import com.yd.csf.service.service.*;
import
com.yd.csf.service.dao.PolicyFollowMapper
;
import
com.yd.csf.service.utils.AsyncQueryUtil
;
import
com.yd.csf.service.utils.GSONUtil
;
import
com.yd.csf.service.vo.PolicyFollowDetailVO
;
import
com.yd.csf.service.vo.PolicyFollowVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
...
...
@@ -310,6 +311,39 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
return
Collections
.
singletonMap
(
"policyBizId"
,
policyBizId
);
}
@Override
public
PolicyFollowDetailVO
getPolicyFollowDetailVO
(
String
policyBizId
)
{
if
(
StringUtils
.
isBlank
(
policyBizId
))
{
return
null
;
}
// 查询主表
PolicyFollow
policyFollow
=
getByPolicyBizId
(
policyBizId
);
if
(
policyFollow
==
null
)
{
return
null
;
}
// 转换为 DetailVO
PolicyFollowDetailVO
detailVO
=
PolicyFollowDetailVO
.
objToVo
(
policyFollow
);
// 查询介绍人列表
List
<
PolicyBroker
>
brokerList
=
policyBrokerService
.
list
(
new
QueryWrapper
<
PolicyBroker
>()
.
eq
(
"policy_biz_id"
,
policyBizId
)
.
eq
(
"is_deleted"
,
0
)
);
detailVO
.
setBrokerList
(
brokerList
);
// 查询附加险列表
List
<
PolicyAdditional
>
additionalList
=
policyAdditionalService
.
list
(
new
QueryWrapper
<
PolicyAdditional
>()
.
eq
(
"policy_biz_id"
,
policyBizId
)
.
eq
(
"is_deleted"
,
0
)
);
detailVO
.
setAdditionalList
(
additionalList
);
return
detailVO
;
}
@Override
public
Boolean
addToPolicy
(
List
<
String
>
policyNoList
)
{
...
...
@@ -634,7 +668,7 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"新单跟进记录不存在"
);
}
if
(
org
.
apache
.
commons
.
collections4
.
CollectionUtils
.
isEmpty
(
brokerBatchSaveRequest
.
getBrokerList
()))
{
if
(
CollectionUtils
.
isEmpty
(
brokerBatchSaveRequest
.
getBrokerList
()))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"介绍人列表不能为空"
);
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/PolicyFollowDetailVO.java
View file @
c7e53c8e
...
...
@@ -2,6 +2,7 @@ package com.yd.csf.service.vo;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yd.csf.service.enums.PolicyFollowStatusEnum
;
import
com.yd.csf.service.model.PolicyAdditional
;
import
com.yd.csf.service.model.PolicyBroker
;
import
com.yd.csf.service.model.PolicyFollow
;
import
io.swagger.v3.oas.annotations.media.Schema
;
...
...
@@ -13,270 +14,459 @@ import java.math.BigDecimal;
import
java.util.*
;
/**
* 新单跟进
Detail
VO
* 新单跟进
详情
VO
*/
@Data
@Schema
(
description
=
"新单跟进详情"
)
public
class
PolicyFollowDetailVO
implements
Serializable
{
/**
* id
*/
@Schema
(
description
=
"policy follow id"
)
private
Long
id
;
/**
* 新单跟进唯一业务ID
*/
@Schema
(
description
=
"新单跟进唯一业务ID"
)
private
String
policyBizId
;
/**
* 保单号
*/
@Schema
(
description
=
"保单号"
)
private
String
policyNo
;
/**
* 预约信息主表唯一业务ID
*/
@Schema
(
description
=
"预约信息主表唯一业务ID"
)
private
String
appointmentBizId
;
/**
* 预约编号
*/
@Schema
(
description
=
"预约编号"
)
private
String
appointmentNo
;
/**
* 用户业务id
*/
private
String
userBizId
;
/**
* 客户业务id
*/
@Schema
(
description
=
"客户业务ID"
)
private
String
customerBizId
;
/**
*
客户名称
*
递交日期
*/
private
String
customerName
;
@Schema
(
description
=
"递交日期"
)
private
Date
submitDate
;
/**
*
递交日期
*
客户名称
*/
private
Date
submitDate
;
@Schema
(
description
=
"客户名称"
)
private
String
customerName
;
/**
* 签单日期
*/
@Schema
(
description
=
"签单日期"
)
private
Date
signDate
;
/**
* 签单人
*/
@Schema
(
description
=
"签单人"
)
private
String
signer
;
/**
* 签单人业务id
*/
@Schema
(
description
=
"签单人业务ID"
)
private
String
signerBizId
;
/**
* 签单人执业编号
*/
@Schema
(
description
=
"签单人执业编号"
)
private
String
signerRegNo
;
/**
* 签单地点
*/
@Schema
(
description
=
"签单地点"
)
private
String
signLocation
;
/**
* 缮发日期
*/
@Schema
(
description
=
"缮发日期"
)
private
Date
issueDate
;
/**
* 冷静期结束日期
*/
@Schema
(
description
=
"冷静期结束日期"
)
private
Date
coolingOffEndDate
;
/**
* 冷静期天数
*/
@Schema
(
description
=
"冷静期天数"
)
private
Integer
coolingOffDays
;
/**
* 核保日期
*/
@Schema
(
description
=
"核保日期"
)
private
Date
underwritingDate
;
/**
* 生效日期
*/
@Schema
(
description
=
"生效日期"
)
private
Date
effectiveDate
;
/**
* 续保日期
*/
@Schema
(
description
=
"续保日期"
)
private
Date
renewalDate
;
/**
* 保单回执日期
*/
@Schema
(
description
=
"保单回执日期"
)
private
Date
receiptDate
;
/**
* 回执状态
*/
@Schema
(
description
=
"回执状态"
)
private
String
receiptStatus
;
/**
* 是否开通直接支付
*/
@Schema
(
description
=
"是否开通直接支付"
)
private
Integer
directPaymentEnabled
;
/**
* 供款年期
*/
private
Object
paymentTerm
;
@Schema
(
description
=
"供款年期"
)
private
Integer
issueNumber
;
/**
*
期交保费
*
保障期限
*/
private
BigDecimal
paymentPremium
;
@Schema
(
description
=
"保障期限"
)
private
Integer
guaranteePeriod
;
/**
* 保额(重疾险)
*/
@Schema
(
description
=
"保额(重疾险)"
)
private
BigDecimal
sumInsured
;
/**
* 付款频率(字典)
*/
@Schema
(
description
=
"付款频率"
)
private
String
paymentFrequency
;
/**
* 每期保费
*/
@Schema
(
description
=
"每期保费"
)
private
BigDecimal
eachIssuePremium
;
/**
* 是否预缴: 0-否, 1-是
*/
private
Integer
isPrepaid
;
@Schema
(
description
=
"是否预缴: 0-否, 1-是"
)
private
Integer
isPrepay
;
/**
* 是否追溯: 0-否, 1-是
*/
@Schema
(
description
=
"是否追溯: 0-否, 1-是"
)
private
Integer
isTraceable
;
/**
* 回溯日期
*/
@Schema
(
description
=
"回溯日期"
)
private
Date
retroactiveDate
;
/**
* 预缴年期
*/
@Schema
(
description
=
"预缴年期"
)
private
Integer
prepaidTerm
;
/**
* 预付额
*/
@Schema
(
description
=
"预付额"
)
private
String
prepaidAmount
;
/**
* 折扣后预付额
*/
@Schema
(
description
=
"折扣后预付额"
)
private
String
prepaidAmountAfterDiscount
;
/**
* 保单截止日期
*/
@Schema
(
description
=
"保单截止日期"
)
private
Date
policyExpirationDate
;
/**
* 缴费编号
*/
@Schema
(
description
=
"缴费编号"
)
private
String
paymentNumber
;
/**
* 产品上架信息表唯一业务ID
*/
@Schema
(
description
=
"产品上架信息表唯一业务ID"
)
private
String
productLaunchBizId
;
/**
* 产品名称
*/
@Schema
(
description
=
"产品名称"
)
private
String
productName
;
/**
* 产品类别
*/
@Schema
(
description
=
"产品类别"
)
private
String
productCate
;
/**
* 保险公司
*/
@Schema
(
description
=
"保险公司"
)
private
String
insuranceCompany
;
/**
* 保险公司业务id
*/
@Schema
(
description
=
"保险公司业务ID"
)
private
String
insuranceCompanyBizId
;
/**
* 对账公司
*/
@Schema
(
description
=
"对账公司"
)
private
String
reconciliationCompany
;
/**
* 对账公司业务id
*/
@Schema
(
description
=
"对账公司业务ID"
)
private
String
reconciliationCompanyBizId
;
/**
* 新单跟进状态
*/
@Schema
(
description
=
"新单跟进状态"
)
private
String
status
;
/**
* 下一步跟进状态列表
*/
@Schema
(
description
=
"下一步跟进状态列表"
)
private
Object
nextStatusList
;
/**
* 保單持有人
*/
@Schema
(
description
=
"保单持有人"
)
private
String
policyHolder
;
/**
* 受保人
*/
@Schema
(
description
=
"受保人"
)
private
String
insured
;
/**
*
币种
*
受保人年龄
*/
private
String
currency
;
@Schema
(
description
=
"受保人年龄"
)
private
Integer
insuredAge
;
/**
* 宽限期
*/
@Schema
(
description
=
"宽限期"
)
private
Integer
gracePeriod
;
/**
* 是否参加递增保障权益: 0-否, 1-是(字典)
*/
@Schema
(
description
=
"是否参加递增保障权益: 0-否, 1-是"
)
private
Integer
isJoin
;
/**
* 保单币种
*/
@Schema
(
description
=
"保单币种"
)
private
String
policyCurrency
;
/**
* 首期付款方式(字典)
*/
@Schema
(
description
=
"首期付款方式"
)
private
String
initialPaymentMethod
;
/**
* 首期保费(不含徽费,预缴保费)
*/
private
Object
initialPremium
;
@Schema
(
description
=
"首期保费(不含徽费,预缴保费)"
)
private
BigDecimal
initialPremium
;
/**
* 首期已缴保费
*/
private
Object
initialPremiumPaid
;
@Schema
(
description
=
"首期已缴保费"
)
private
BigDecimal
initialPremiumPaid
;
/**
* 首期待缴保费
*/
private
Object
initialPremiumDue
;
@Schema
(
description
=
"首期待缴保费"
)
private
BigDecimal
initialPremiumDue
;
/**
* 首期缴费总额
*/
private
Object
initialPremiumTotal
;
@Schema
(
description
=
"首期缴费总额"
)
private
BigDecimal
initialPremiumTotal
;
/**
* 首期缴费状态
*/
@Schema
(
description
=
"首期缴费状态"
)
private
String
initialPaymentStatus
;
/**
* 首期保费优惠金额
*/
private
Object
initialPremiumDiscount
;
@Schema
(
description
=
"首期保费优惠金额"
)
private
BigDecimal
initialPremiumDiscount
;
/**
* 寄送方式
1-自提,
2-快递
* 寄送方式
字典值:1-自提
2-快递
*/
@Schema
(
description
=
"寄送方式 1-自提 2-快递"
)
private
String
mailingMethod
;
/**
* 续期付款方式(字典)
*/
@Schema
(
description
=
"续期付款方式"
)
private
String
renewalPaymentMethod
;
/**
* 红利付款方式(字典)
*/
@Schema
(
description
=
"红利付款方式"
)
private
String
dividendPaymentMethod
;
/**
* 快递单号
*/
@Schema
(
description
=
"快递单号"
)
private
String
deliveryNo
;
/**
* 保单征费
*/
@Schema
(
description
=
"保单征费"
)
private
String
policyLevy
;
/**
* 最晚缴费日期
*/
@Schema
(
description
=
"最晚缴费日期"
)
private
Date
latestPaymentDate
;
/**
* 经纪公司签收日期
*/
private
String
brokerSignDate
;
@Schema
(
description
=
"经纪公司签收日期"
)
private
Date
brokerSignDate
;
/**
* 保险公司寄出日期
*/
private
String
insurerMailingDate
;
@Schema
(
description
=
"保险公司寄出日期"
)
private
Date
insurerMailingDate
;
/**
* 客户签收日期
*/
private
String
customerSignDate
;
@Schema
(
description
=
"客户签收日期"
)
private
Date
customerSignDate
;
/**
* 附件
列表
* 附件
地址列表 逗号隔开
*/
@Schema
(
description
=
"附件地址列表"
)
private
String
attachments
;
/**
* 转介人
* 转介人
列表
*/
@Schema
(
description
=
"转介人"
)
@Schema
(
description
=
"转介人
列表
"
)
private
List
<
PolicyBroker
>
brokerList
;
/**
* 备注
* 附加险列表
*/
@Schema
(
description
=
"附加险列表"
)
private
List
<
PolicyAdditional
>
additionalList
;
/**
* 通用备注
*/
@Schema
(
description
=
"通用备注"
)
private
String
remark
;
/**
* 删除标识: 0-正常, 1-删除
*/
@
TableField
(
)
@
Schema
(
description
=
"删除标识: 0-正常, 1-删除"
)
private
Integer
isDeleted
;
/**
* 创建人ID
*/
@Schema
(
description
=
"创建人ID"
)
private
String
creatorId
;
/**
* 更新人ID
*/
@Schema
(
description
=
"更新人ID"
)
private
String
updaterId
;
/**
* 创建时间
*/
@Schema
(
description
=
"创建时间"
)
private
Date
createTime
;
/**
* 更新时间
*/
@Schema
(
description
=
"更新时间"
)
private
Date
updateTime
;
@TableField
(
exist
=
false
)
...
...
@@ -285,17 +475,17 @@ public class PolicyFollowDetailVO implements Serializable {
/**
* 对象转封装类
*
* @param policyFollow
* @return
* @param policyFollow
新单跟进实体
* @return
PolicyFollowDetailVO
*/
public
static
PolicyFollowDetailVO
objToVo
(
PolicyFollow
policyFollow
)
{
if
(
policyFollow
==
null
)
{
return
null
;
}
PolicyFollowDetailVO
PolicyFollowD
etailVO
=
new
PolicyFollowDetailVO
();
PolicyFollowD
etailVO
.
setPolicyBizId
(
policyFollow
.
getPolicyBizId
());
PolicyFollowDetailVO
d
etailVO
=
new
PolicyFollowDetailVO
();
d
etailVO
.
setPolicyBizId
(
policyFollow
.
getPolicyBizId
());
// 转换PolicyFollow
BeanUtils
.
copyProperties
(
policyFollow
,
PolicyFollowD
etailVO
);
BeanUtils
.
copyProperties
(
policyFollow
,
d
etailVO
);
// 处理 nextStatusList 字段
Object
nextStatusList
=
policyFollow
.
getNextStatusList
();
if
(
nextStatusList
!=
null
&&
!
nextStatusList
.
toString
().
isEmpty
())
{
...
...
@@ -303,13 +493,16 @@ public class PolicyFollowDetailVO implements Serializable {
List
<
Map
<
String
,
String
>>
statusMapList
=
new
ArrayList
<>();
for
(
String
status
:
statusArr
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"itemLabel"
,
PolicyFollowStatusEnum
.
getEnumByValue
(
status
).
getItemLabel
());
map
.
put
(
"itemValue"
,
status
);
PolicyFollowStatusEnum
statusEnum
=
PolicyFollowStatusEnum
.
getEnumByValue
(
status
);
if
(
statusEnum
!=
null
)
{
map
.
put
(
"itemLabel"
,
statusEnum
.
getItemLabel
());
map
.
put
(
"itemValue"
,
status
);
}
statusMapList
.
add
(
map
);
}
PolicyFollowD
etailVO
.
setNextStatusList
(
statusMapList
);
d
etailVO
.
setNextStatusList
(
statusMapList
);
}
return
PolicyFollowD
etailVO
;
return
d
etailVO
;
}
}
\ No newline at end of file
}
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