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
5b3e841e
Commit
5b3e841e
authored
Nov 04, 2025
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新单跟进31
parent
6d65e011
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
23 deletions
+72
-23
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
+67
-22
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/AddressDto.java
+5
-1
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
View file @
5b3e841e
...
@@ -23,7 +23,9 @@ import com.yd.csf.service.enums.PolicyFollowStatusEnum;
...
@@ -23,7 +23,9 @@ import com.yd.csf.service.enums.PolicyFollowStatusEnum;
import
com.yd.csf.service.enums.PolicyStatusEnum
;
import
com.yd.csf.service.enums.PolicyStatusEnum
;
import
com.yd.csf.service.model.*
;
import
com.yd.csf.service.model.*
;
import
com.yd.csf.service.service.*
;
import
com.yd.csf.service.service.*
;
import
com.yd.csf.service.utils.GSONUtil
;
import
com.yd.question.feign.client.ApiQuestionnairesFeignClient
;
import
com.yd.question.feign.client.ApiQuestionnairesFeignClient
;
import
com.yd.question.feign.dto.ApiAnswerSessionsDto
;
import
com.yd.question.feign.request.ApiAnswerSaveRequest
;
import
com.yd.question.feign.request.ApiAnswerSaveRequest
;
import
com.yd.question.feign.request.ApiObjectSaveRequest
;
import
com.yd.question.feign.request.ApiObjectSaveRequest
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -413,9 +415,13 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -413,9 +415,13 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
public
Result
savePolicyFollow
(
Appointment
appointment
)
{
public
Result
savePolicyFollow
(
Appointment
appointment
)
{
Result
<
ApiAppointmentDetailResponse
>
result
=
detail
(
appointment
.
getAppointmentBizId
());
Result
<
ApiAppointmentDetailResponse
>
result
=
detail
(
appointment
.
getAppointmentBizId
());
ApiAppointmentDetailResponse
response
=
result
.
getData
();
ApiAppointmentDetailResponse
response
=
result
.
getData
();
// 获取入参
ApiProductPlanMainInfoDto
apiProductPlanMainInfoDto
=
null
;
ApiProductPlanMainInfoDto
apiProductPlanMainInfoDto
=
null
;
List
<
ApiProductPlanAdditionalInfoDto
>
apiProductPlanAdditionalInfoDtoList
=
new
ArrayList
<>();
List
<
ApiProductPlanAdditionalInfoDto
>
apiProductPlanAdditionalInfoDtoList
=
new
ArrayList
<>();
ApiPolicyholderInfoDto
apiPolicyholderInfoDto
=
null
;
ApiInsurantInfoDto
apiInsurantInfoDto
=
null
;
ApiInsurantInfoDto
apiInsurantInfoDto
=
null
;
List
<
ApiBeneficiaryInfoDto
>
apiBeneficiaryInfoDtoList
=
null
;
ApiSecondHolderInfoDto
apiSecondHolderInfoDto
=
null
;
String
policyTransfer
=
null
;
String
policyTransfer
=
null
;
if
(!
Objects
.
isNull
(
response
)
if
(!
Objects
.
isNull
(
response
)
&&
!
Objects
.
isNull
(
response
.
getApiProductPlanInfoDto
())
&&
!
Objects
.
isNull
(
response
.
getApiProductPlanInfoDto
())
...
@@ -425,6 +431,14 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -425,6 +431,14 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
policyTransfer
=
response
.
getApiAppointmentInfoDto
().
getPolicyTransfer
();
policyTransfer
=
response
.
getApiAppointmentInfoDto
().
getPolicyTransfer
();
// 产品计划附加险列表
// 产品计划附加险列表
apiProductPlanAdditionalInfoDtoList
=
response
.
getApiProductPlanInfoDto
().
getApiProductPlanAdditionalInfoDtoList
();
apiProductPlanAdditionalInfoDtoList
=
response
.
getApiProductPlanInfoDto
().
getApiProductPlanAdditionalInfoDtoList
();
// 投保人
apiPolicyholderInfoDto
=
response
.
getApiPolicyholderInfoDto
();
// 受保人
apiInsurantInfoDto
=
response
.
getApiInsurantInfoDto
();
// 受益人列表信息
apiBeneficiaryInfoDtoList
=
response
.
getApiBeneficiaryInfoDtoList
();
// 第二持有人
apiSecondHolderInfoDto
=
response
.
getApiSecondHolderInfoDto
();
}
}
if
(!
Objects
.
isNull
(
response
)
if
(!
Objects
.
isNull
(
response
)
&&
!
Objects
.
isNull
(
response
.
getApiInsurantInfoDto
()))
{
&&
!
Objects
.
isNull
(
response
.
getApiInsurantInfoDto
()))
{
...
@@ -492,25 +506,28 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -492,25 +506,28 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
// 同步保存保单产品计划附加险
// 同步保存保单产品计划附加险
savePolicyAdditional
(
apiProductPlanAdditionalInfoDtoList
,
policyBizId
);
savePolicyAdditional
(
apiProductPlanAdditionalInfoDtoList
,
policyBizId
);
// 同步保存保单投保人
// 同步保存保单投保人
savePolicyPolicyholder
(
api
Insurant
InfoDto
,
policyBizId
);
savePolicyPolicyholder
(
api
Policyholder
InfoDto
,
policyBizId
);
// 同步保存保单受保人
// 同步保存保单受保人
savePolicyInsurant
(
apiInsurantInfoDto
,
policyBizId
);
savePolicyInsurant
(
apiInsurantInfoDto
,
policyBizId
);
// 同步保存保单受益人
// 同步保存保单受益人
savePolicyBeneficiary
(
api
InsurantInfoDto
,
policyBizId
);
savePolicyBeneficiary
(
api
BeneficiaryInfoDtoList
,
policyBizId
);
// 同步保存保单第二持有人
// 同步保存保单第二持有人
savePolicySecondHolder
(
api
Insurant
InfoDto
,
policyBizId
);
savePolicySecondHolder
(
api
SecondHolder
InfoDto
,
policyBizId
);
// 同步问卷信息
// 同步问卷信息
savePolicyQuestionnaire
(
ap
iInsurantInfoDto
,
policyBizId
);
savePolicyQuestionnaire
(
ap
pointment
.
getAppointmentBizId
()
,
policyBizId
);
return
Result
.
success
();
return
Result
.
success
();
}
}
private
void
savePolicyQuestionnaire
(
ApiInsurantInfoDto
apiInsurantInfoDto
,
String
policyBizId
)
{
private
void
savePolicyQuestionnaire
(
String
appointmentBizId
,
String
policyBizId
)
{
//远程调用-问卷-答题提交接口
// 远程调用-问卷-答题提交接口
ApiAnswerSaveRequest
answerSaveRequest
=
new
ApiAnswerSaveRequest
();
// ApiAnswerSaveRequest answerSaveRequest = new ApiAnswerSaveRequest();
answerSaveRequest
.
setObjectBizId
(
policyBizId
);
// answerSaveRequest.setObjectBizId(policyBizId);
answerSaveRequest
.
setQuestionnaireBizId
(
"questionnaires_1001"
);
// answerSaveRequest.setQuestionnaireBizId("questionnaires_1001");
apiQuestionnairesFeignClient
.
answerSave
(
answerSaveRequest
);
// apiQuestionnairesFeignClient.answerSave(answerSaveRequest);
// 查询问卷答案
// Result<ApiAnswerSessionsDto> answerSession = apiQuestionnairesFeignClient.answerSession("questionnaires_1001", appointmentBizId);
}
}
private
void
savePolicyAdditional
(
List
<
ApiProductPlanAdditionalInfoDto
>
apiProductPlanAdditionalInfoDtoList
,
String
policyBizId
)
{
private
void
savePolicyAdditional
(
List
<
ApiProductPlanAdditionalInfoDto
>
apiProductPlanAdditionalInfoDtoList
,
String
policyBizId
)
{
...
@@ -526,9 +543,12 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -526,9 +543,12 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
}
}
}
}
private
boolean
savePolicySecondHolder
(
ApiInsurantInfoDto
apiInsurantInfoDto
,
String
policyBizId
)
{
private
boolean
savePolicySecondHolder
(
ApiSecondHolderInfoDto
apiSecondHolderInfoDto
,
String
policyBizId
)
{
if
(
apiSecondHolderInfoDto
==
null
)
{
return
false
;
}
PolicySecondHolder
policySecondHolder
=
new
PolicySecondHolder
();
PolicySecondHolder
policySecondHolder
=
new
PolicySecondHolder
();
BeanUtils
.
copyProperties
(
api
Insurant
InfoDto
,
policySecondHolder
);
BeanUtils
.
copyProperties
(
api
SecondHolder
InfoDto
,
policySecondHolder
);
policySecondHolder
.
setId
(
null
);
policySecondHolder
.
setId
(
null
);
policySecondHolder
.
setPolicyBizId
(
policyBizId
);
policySecondHolder
.
setPolicyBizId
(
policyBizId
);
policySecondHolder
.
setPolicySecondHolderBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_second_holder"
));
policySecondHolder
.
setPolicySecondHolderBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_second_holder"
));
...
@@ -536,19 +556,35 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -536,19 +556,35 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
return
policySecondHolderService
.
saveOrUpdate
(
policySecondHolder
);
return
policySecondHolderService
.
saveOrUpdate
(
policySecondHolder
);
}
}
private
boolean
savePolicyBeneficiary
(
ApiInsurantInfoDto
apiInsurantInfoDto
,
String
policyBizId
)
{
private
boolean
savePolicyBeneficiary
(
List
<
ApiBeneficiaryInfoDto
>
apiBeneficiaryInfoDtoList
,
String
policyBizId
)
{
PolicyBeneficiary
policyBeneficiary
=
new
PolicyBeneficiary
();
if
(
CollectionUtils
.
isEmpty
(
apiBeneficiaryInfoDtoList
))
{
BeanUtils
.
copyProperties
(
apiInsurantInfoDto
,
policyBeneficiary
);
return
false
;
policyBeneficiary
.
setId
(
null
);
}
policyBeneficiary
.
setPolicyBizId
(
policyBizId
);
List
<
PolicyBeneficiary
>
policyBeneficiaryList
=
new
ArrayList
<>();
policyBeneficiary
.
setPolicyBeneficiaryBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_beneficiary"
));
for
(
ApiBeneficiaryInfoDto
apiBeneficiaryInfoDto
:
apiBeneficiaryInfoDtoList
)
{
PolicyBeneficiary
policyBeneficiary
=
new
PolicyBeneficiary
();
BeanUtils
.
copyProperties
(
apiBeneficiaryInfoDto
,
policyBeneficiary
,
"addressList"
);
if
(!
CollectionUtils
.
isEmpty
(
apiBeneficiaryInfoDto
.
getAddressList
()))
{
policyBeneficiary
.
setAddressList
(
GSONUtil
.
toJson
(
apiBeneficiaryInfoDto
.
getAddressList
()));
}
policyBeneficiary
.
setId
(
null
);
policyBeneficiary
.
setPolicyBizId
(
policyBizId
);
policyBeneficiary
.
setPolicyBeneficiaryBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_beneficiary"
));
return
policyBeneficiaryService
.
saveOrUpdate
(
policyBeneficiary
);
policyBeneficiaryList
.
add
(
policyBeneficiary
);
}
return
policyBeneficiaryService
.
saveBatch
(
policyBeneficiaryList
);
}
}
private
boolean
savePolicyInsurant
(
ApiInsurantInfoDto
apiInsurantInfoDto
,
String
policyBizId
)
{
private
boolean
savePolicyInsurant
(
ApiInsurantInfoDto
apiInsurantInfoDto
,
String
policyBizId
)
{
if
(
apiInsurantInfoDto
==
null
)
{
return
false
;
}
PolicyInsurant
policyInsurant
=
new
PolicyInsurant
();
PolicyInsurant
policyInsurant
=
new
PolicyInsurant
();
BeanUtils
.
copyProperties
(
apiInsurantInfoDto
,
policyInsurant
);
BeanUtils
.
copyProperties
(
apiInsurantInfoDto
,
policyInsurant
,
"addressList"
);
if
(!
CollectionUtils
.
isEmpty
(
apiInsurantInfoDto
.
getAddressList
()))
{
policyInsurant
.
setAddressList
(
GSONUtil
.
toJson
(
apiInsurantInfoDto
.
getAddressList
()));
}
policyInsurant
.
setId
(
null
);
policyInsurant
.
setId
(
null
);
policyInsurant
.
setPolicyBizId
(
policyBizId
);
policyInsurant
.
setPolicyBizId
(
policyBizId
);
policyInsurant
.
setPolicyInsurantBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_insurant"
));
policyInsurant
.
setPolicyInsurantBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_insurant"
));
...
@@ -556,9 +592,15 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -556,9 +592,15 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
return
policyInsurantService
.
saveOrUpdate
(
policyInsurant
);
return
policyInsurantService
.
saveOrUpdate
(
policyInsurant
);
}
}
private
boolean
savePolicyPolicyholder
(
ApiInsurantInfoDto
apiInsurantInfoDto
,
String
policyBizId
)
{
private
boolean
savePolicyPolicyholder
(
ApiPolicyholderInfoDto
apiPolicyholderInfoDto
,
String
policyBizId
)
{
if
(
apiPolicyholderInfoDto
==
null
)
{
return
false
;
}
PolicyPolicyholder
policyPolicyholder
=
new
PolicyPolicyholder
();
PolicyPolicyholder
policyPolicyholder
=
new
PolicyPolicyholder
();
BeanUtils
.
copyProperties
(
apiInsurantInfoDto
,
policyPolicyholder
);
BeanUtils
.
copyProperties
(
apiPolicyholderInfoDto
,
policyPolicyholder
,
"addressList"
);
if
(!
CollectionUtils
.
isEmpty
(
apiPolicyholderInfoDto
.
getAddressList
()))
{
policyPolicyholder
.
setAddressList
(
GSONUtil
.
toJson
(
apiPolicyholderInfoDto
.
getAddressList
()));
}
policyPolicyholder
.
setId
(
null
);
policyPolicyholder
.
setId
(
null
);
policyPolicyholder
.
setPolicyBizId
(
policyBizId
);
policyPolicyholder
.
setPolicyBizId
(
policyBizId
);
policyPolicyholder
.
setPolicyPolicyholderBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_policyholder"
));
policyPolicyholder
.
setPolicyPolicyholderBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_policyholder"
));
...
@@ -567,6 +609,9 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -567,6 +609,9 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
}
}
private
boolean
savePolicy
(
PolicyFollow
policyFollow
,
ApiProductPlanMainInfoDto
apiProductPlanMainInfoDto
,
String
policyBizId
,
String
policyTransfer
)
{
private
boolean
savePolicy
(
PolicyFollow
policyFollow
,
ApiProductPlanMainInfoDto
apiProductPlanMainInfoDto
,
String
policyBizId
,
String
policyTransfer
)
{
if
(
policyFollow
==
null
)
{
return
false
;
}
// 同步保存保单(产品计划)
// 同步保存保单(产品计划)
Policy
policy
=
new
Policy
();
Policy
policy
=
new
Policy
();
BeanUtils
.
copyProperties
(
policyFollow
,
policy
);
BeanUtils
.
copyProperties
(
policyFollow
,
policy
);
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/AddressDto.java
View file @
5b3e841e
...
@@ -2,11 +2,15 @@ package com.yd.csf.feign.dto;
...
@@ -2,11 +2,15 @@ package com.yd.csf.feign.dto;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
/**
* 地址DTO
* 地址DTO
*/
*/
@Data
@Data
public
class
AddressDto
{
public
class
AddressDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
* 地址类型 residenceAddress-居住地址、residentialAddress-住宅地址、mailingAddress-邮寄地址、companyAddress-公司地址
* 地址类型 residenceAddress-居住地址、residentialAddress-住宅地址、mailingAddress-邮寄地址、companyAddress-公司地址
...
...
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