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
0c290d46
Commit
0c290d46
authored
Nov 06, 2025
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新单跟进40
parent
64b7a2bc
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
67 additions
and
12 deletions
+67
-12
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyFollowController.java
+16
-2
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
+24
-5
yd-csf-service/src/main/java/com/yd/csf/service/dao/FnaMapper.java
+3
-0
yd-csf-service/src/main/java/com/yd/csf/service/model/PolicyFollow.java
+2
-2
yd-csf-service/src/main/java/com/yd/csf/service/service/FnaService.java
+2
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerServiceImpl.java
+8
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FnaServiceImpl.java
+5
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/vo/PolicyFollowVO.java
+2
-2
yd-csf-service/src/main/resources/mappers/FnaMapper.xml
+4
-0
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyFollowController.java
View file @
0c290d46
...
...
@@ -489,14 +489,28 @@ public class ApiPolicyFollowController {
@PostMapping
(
"/list/page/vo"
)
@Operation
(
summary
=
"分页获取新单跟进列表"
)
public
Result
<
Page
<
PolicyFollow
>>
listPolicyFollowByPage
(
@RequestBody
PolicyFollowQueryRequest
policyFollowQueryRequest
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
{
long
current
=
policyFollowQueryRequest
.
getPageNo
();
long
size
=
policyFollowQueryRequest
.
getPageSize
();
// 查询数据库
Page
<
PolicyFollow
>
policyFollowPage
=
policyFollowService
.
page
(
new
Page
<>(
current
,
size
),
policyFollowService
.
getQueryWrapper
(
policyFollowQueryRequest
));
// 获取封装类
// 处理 nextStatusList 字段
policyFollowPage
.
getRecords
().
forEach
(
policyFollow
->
{
Object
nextStatusList
=
policyFollow
.
getNextStatusList
();
if
(
nextStatusList
!=
null
&&
!
nextStatusList
.
toString
().
isEmpty
())
{
String
[]
statusArr
=
nextStatusList
.
toString
().
split
(
","
);
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
);
statusMapList
.
add
(
map
);
}
policyFollow
.
setNextStatusList
(
statusMapList
);
}
});
return
Result
.
success
(
policyFollowPage
);
}
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
View file @
0c290d46
...
...
@@ -101,6 +101,8 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
private
PolicyAdditionalService
policyAdditionalService
;
@Resource
private
IProductPlanService
iProductPlanService
;
@Resource
private
CustomerService
customerService
;
/**
* 预约分页查询
...
...
@@ -448,6 +450,12 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
&&
!
Objects
.
isNull
(
response
.
getApiInsurantInfoDto
()))
{
apiInsurantInfoDto
=
response
.
getApiInsurantInfoDto
();
}
// 查询客户信息表数据
Customer
customer
=
customerService
.
getByCustomerBizId
(
appointment
.
getCustomerBizId
());
// 查询产品计划信息表数据
ProductPlan
productPlan
=
iProductPlanService
.
queryOne
(
appointment
.
getAppointmentBizId
(),
apiProductPlanMainInfoDto
.
getPlanBizId
());
// 新增新单跟进记录
PolicyFollow
follow
=
new
PolicyFollow
();
String
policyBizId
=
RandomStringGenerator
.
generateBizId16
(
CommonEnum
.
UID_TYPE_POLICY
.
getCode
());
//新单跟进唯一业务ID
...
...
@@ -456,6 +464,10 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
follow
.
setAppointmentNo
(
appointment
.
getAppointmentNo
());
//客户信息表唯一业务ID
follow
.
setCustomerBizId
(
appointment
.
getCustomerBizId
());
if
(
customer
!=
null
)
{
//客户名称
follow
.
setCustomerName
(
customer
.
getFirstNamePinyin
());
}
//待跟进
follow
.
setStatus
(
PolicyFollowStatusEnum
.
FOLLOW_UP
.
getItemValue
());
follow
.
setNextStatusList
(
policyFollowService
.
getNextStatus
(
PolicyFollowStatusEnum
.
CHECKING
));
...
...
@@ -463,8 +475,10 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
// follow.setInsurerBizId();
//TODO 期交保费
// follow.setPaymentPremium();
//TODO 保單持有人
// follow.setPolicyHolder();
// 保單持有人
if
(
apiPolicyholderInfoDto
!=
null
)
{
follow
.
setPolicyHolder
(
apiPolicyholderInfoDto
.
getName
());
}
//TODO 预缴年期
// follow.setPrepaidTerm();
//TODO 产品类别
...
...
@@ -498,6 +512,9 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//供款年期
if
(
StringUtils
.
isNotBlank
(
apiProductPlanMainInfoDto
.
getPaymentTerm
()))
{
follow
.
setPaymentTerm
(
Integer
.
getInteger
(
apiProductPlanMainInfoDto
.
getPaymentTerm
()));
if
(
follow
.
getPaymentTerm
()
==
null
)
{
follow
.
setPaymentTerm
(
productPlan
.
getPaymentTerm
());
}
}
//产品名称
follow
.
setProductName
(
apiProductPlanMainInfoDto
.
getProductName
());
...
...
@@ -506,7 +523,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
policyFollowService
.
saveOrUpdate
(
follow
);
// 同步保存保单(产品计划)
savePolicy
(
apiPolicyholderInfoDto
,
apiInsurantInfoDto
,
apiProductPlanMainInfoDto
,
policyBizId
,
policyTransfer
);
savePolicy
(
productPlan
,
apiPolicyholderInfoDto
,
apiInsurantInfoDto
,
apiProductPlanMainInfoDto
,
policyBizId
,
policyTransfer
);
// 同步保存保单产品计划附加险
savePolicyAdditional
(
apiProductPlanAdditionalInfoDtoList
,
policyBizId
);
// 同步保存保单投保人
...
...
@@ -608,6 +625,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
policyInsurant
.
setId
(
null
);
policyInsurant
.
setPolicyBizId
(
policyBizId
);
policyInsurant
.
setPolicyInsurantBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_insurant"
));
policyInsurant
.
setName
(
apiInsurantInfoDto
.
getName
());
return
policyInsurantService
.
saveOrUpdate
(
policyInsurant
);
}
...
...
@@ -624,11 +642,13 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
policyPolicyholder
.
setId
(
null
);
policyPolicyholder
.
setPolicyBizId
(
policyBizId
);
policyPolicyholder
.
setPolicyPolicyholderBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_policyholder"
));
policyPolicyholder
.
setName
(
apiPolicyholderInfoDto
.
getName
());
return
policyPolicyholderService
.
saveOrUpdate
(
policyPolicyholder
);
}
private
boolean
savePolicy
(
ApiPolicyholderInfoDto
apiPolicyholderInfoDto
,
private
boolean
savePolicy
(
ProductPlan
productPlan
,
ApiPolicyholderInfoDto
apiPolicyholderInfoDto
,
ApiInsurantInfoDto
apiInsurantInfoDto
,
ApiProductPlanMainInfoDto
apiProductPlanMainInfoDto
,
String
policyBizId
,
...
...
@@ -636,7 +656,6 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
)
{
String
appointmentBizId
=
apiProductPlanMainInfoDto
.
getAppointmentBizId
();
String
planBizId
=
apiProductPlanMainInfoDto
.
getPlanBizId
();
ProductPlan
productPlan
=
iProductPlanService
.
queryOne
(
appointmentBizId
,
planBizId
);
if
(
productPlan
==
null
)
{
return
false
;
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dao/FnaMapper.java
View file @
0c290d46
...
...
@@ -3,6 +3,7 @@ package com.yd.csf.service.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yd.csf.service.model.Fna
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.security.core.parameters.P
;
/**
* @author Zhang Jianan
...
...
@@ -13,6 +14,8 @@ import org.apache.ibatis.annotations.Param;
public
interface
FnaMapper
extends
BaseMapper
<
Fna
>
{
boolean
updateFnaNoById
(
@Param
(
"fnaNo"
)
String
fnaNo
,
@Param
(
"id"
)
Long
id
);
int
updateCustomerNameByCustomerBizId
(
@Param
(
"firstNamePinyin"
)
String
firstNamePinyin
,
@Param
(
"customerBizId"
)
String
customerBizId
);
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/PolicyFollow.java
View file @
0c290d46
...
...
@@ -90,7 +90,7 @@ public class PolicyFollow implements Serializable {
/**
* 供款年期
*/
private
Integer
paymentTerm
;
private
Object
paymentTerm
;
/**
* 期交保费
...
...
@@ -170,7 +170,7 @@ public class PolicyFollow implements Serializable {
/**
* 下一步跟进状态列表
*/
private
String
nextStatusList
;
private
Object
nextStatusList
;
/**
* 保單持有人
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/FnaService.java
View file @
0c290d46
...
...
@@ -53,4 +53,6 @@ public interface FnaService extends IService<Fna> {
Boolean
updateFna
(
FnaUpdateRequest
fnaUpdateRequest
,
String
appointmentNo
);
Map
<
String
,
Object
>
copyFna
(
FnaCopyRequest
fnaCopyRequest
);
int
updateCustomerNameByCustomerBizId
(
String
firstNamePinyin
,
String
customerBizId
);
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerServiceImpl.java
View file @
0c290d46
...
...
@@ -20,8 +20,10 @@ import com.yd.csf.service.dto.CustomerUpdateRequest;
import
com.yd.csf.service.dto.FnaQueryRequest
;
import
com.yd.csf.service.model.Customer
;
import
com.yd.csf.service.model.CustomerExpand
;
import
com.yd.csf.service.model.Fna
;
import
com.yd.csf.service.service.CustomerExpandService
;
import
com.yd.csf.service.service.CustomerService
;
import
com.yd.csf.service.service.FnaService
;
import
com.yd.csf.service.utils.ValidateUtil
;
import
com.yd.csf.service.vo.AddressVO
;
import
com.yd.csf.service.vo.CustomerExpandVO
;
...
...
@@ -54,6 +56,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
@Resource
private
CustomerService
customerService
;
@Resource
private
FnaService
fnaService
;
@Override
...
...
@@ -241,6 +246,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
customerService
.
validCustomer
(
oldCustomer
);
// 更新主表
boolean
result
=
customerService
.
updateById
(
oldCustomer
);
if
(
StringUtils
.
isNotBlank
(
customerUpdateRequest
.
getFirstNamePinyin
()))
{
fnaService
.
updateCustomerNameByCustomerBizId
(
customerUpdateRequest
.
getFirstNamePinyin
(),
customerBizId
);
}
// 获取扩展表信息
CustomerExpand
customerExpand
=
customerExpandService
.
getByCustomerBizId
(
customerBizId
);
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FnaServiceImpl.java
View file @
0c290d46
...
...
@@ -356,6 +356,11 @@ public class FnaServiceImpl extends ServiceImpl<FnaMapper, Fna> implements FnaSe
return
Collections
.
singletonMap
(
"fnaBizId"
,
newFna
.
getFnaBizId
());
}
@Override
public
int
updateCustomerNameByCustomerBizId
(
String
firstNamePinyin
,
String
customerBizId
)
{
return
baseMapper
.
updateCustomerNameByCustomerBizId
(
firstNamePinyin
,
customerBizId
);
}
private
String
copyFnaForm
(
String
oldFnaFormBizId
,
String
userBizId
)
{
FnaForm
fnaForm
=
fnaFormService
.
getByFnaFormBizId
(
oldFnaFormBizId
);
if
(
fnaForm
==
null
)
{
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
View file @
0c290d46
...
...
@@ -92,7 +92,7 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
queryWrapper
.
eq
(
ObjectUtils
.
isNotEmpty
(
policyNo
),
"policy_no"
,
policyNo
);
queryWrapper
.
eq
(
ObjectUtils
.
isNotEmpty
(
customerName
),
"customer_name"
,
customerName
);
queryWrapper
.
eq
(
ObjectUtils
.
isNotEmpty
(
customerBizId
),
"customer_biz_id"
,
customerBizId
);
queryWrapper
.
eq
(
ObjectUtils
.
isNotEmpty
(
status
),
"status"
,
status
);
queryWrapper
.
eq
(
ObjectUtils
.
isNotEmpty
(
status
.
trim
()
),
"status"
,
status
);
queryWrapper
.
eq
(
ObjectUtils
.
isNotEmpty
(
insurer
),
"insurance"
,
insurer
);
queryWrapper
.
eq
(
ObjectUtils
.
isNotEmpty
(
productName
),
"product_code"
,
productName
);
queryWrapper
.
ge
(
ObjectUtils
.
isNotEmpty
(
signDateStart
),
"sign_date"
,
signDateStart
);
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/PolicyFollowVO.java
View file @
0c290d46
...
...
@@ -32,7 +32,7 @@ public class PolicyFollowVO implements Serializable {
* 下一步跟进状态列表
*/
@Schema
(
description
=
"下一步跟进状态列表, 下拉框"
)
private
List
<
String
>
nextStatusList
;
private
Object
nextStatusList
;
/**
* 新单跟进Dto
...
...
@@ -83,7 +83,7 @@ public class PolicyFollowVO implements Serializable {
policyFollowVO
.
setPolicyFollowUpdateDto
(
policyFollowUpdateDto
);
if
(
policyFollow
.
getNextStatusList
()
!=
null
)
{
policyFollowVO
.
setNextStatusList
(
Arrays
.
asList
(
policyFollow
.
getNextStatusList
().
split
(
","
)
));
policyFollowVO
.
setNextStatusList
(
policyFollow
.
getNextStatusList
(
));
}
VerifyPolicyInfo
verifyPolicyInfo
=
new
VerifyPolicyInfo
();
...
...
yd-csf-service/src/main/resources/mappers/FnaMapper.xml
View file @
0c290d46
...
...
@@ -41,4 +41,8 @@
<update
id=
"updateFnaNoById"
>
update fna set fna_no = #{fnaNo} where id = #{id}
</update>
<update
id=
"updateCustomerNameByCustomerBizId"
>
update fna set customer_name = #{firstNamePinyin} where customer_biz_id = #{customerBizId}
</update>
</mapper>
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