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
098fcfba
Commit
098fcfba
authored
Oct 31, 2025
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新单跟进11-聚合查询
parent
c663ff31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
2421 additions
and
59 deletions
+2421
-59
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyFollowController.java
+12
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
+144
-51
yd-csf-service/src/main/java/com/yd/csf/service/config/AsyncConfig.java
+58
-0
yd-csf-service/src/main/java/com/yd/csf/service/dao/PolicyBeneficiaryMapper.java
+18
-0
yd-csf-service/src/main/java/com/yd/csf/service/dao/PolicyInsurantMapper.java
+18
-0
yd-csf-service/src/main/java/com/yd/csf/service/dao/PolicyPolicyholderMapper.java
+18
-0
yd-csf-service/src/main/java/com/yd/csf/service/dao/PolicySecondHolderMapper.java
+18
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/PolicyFollowAggregateDto.java
+59
-0
yd-csf-service/src/main/java/com/yd/csf/service/enums/PolicyStatusEnum.java
+65
-0
yd-csf-service/src/main/java/com/yd/csf/service/model/Policy.java
+47
-2
yd-csf-service/src/main/java/com/yd/csf/service/model/PolicyBeneficiary.java
+203
-0
yd-csf-service/src/main/java/com/yd/csf/service/model/PolicyInsurant.java
+403
-0
yd-csf-service/src/main/java/com/yd/csf/service/model/PolicyPolicyholder.java
+418
-0
yd-csf-service/src/main/java/com/yd/csf/service/model/PolicySecondHolder.java
+117
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyBeneficiaryService.java
+13
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyFollowService.java
+2
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyInsurantService.java
+13
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyPolicyholderService.java
+13
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicySecondHolderService.java
+13
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyBeneficiaryServiceImpl.java
+22
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
+94
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyInsurantServiceImpl.java
+22
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyPolicyholderServiceImpl.java
+22
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicySecondHolderServiceImpl.java
+22
-0
yd-csf-service/src/main/java/com/yd/csf/service/utils/AsyncQueryUtil.java
+161
-0
yd-csf-service/src/main/java/com/yd/csf/service/utils/CompletableFutureUtil.java
+109
-0
yd-csf-service/src/main/resources/mappers/PolicyBeneficiaryMapper.xml
+55
-0
yd-csf-service/src/main/resources/mappers/PolicyInsurantMapper.xml
+103
-0
yd-csf-service/src/main/resources/mappers/PolicyMapper.xml
+17
-6
yd-csf-service/src/main/resources/mappers/PolicyPolicyholderMapper.xml
+107
-0
yd-csf-service/src/main/resources/mappers/PolicySecondHolderMapper.xml
+35
-0
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiPolicyFollowController.java
View file @
098fcfba
...
@@ -451,6 +451,18 @@ public class ApiPolicyFollowController {
...
@@ -451,6 +451,18 @@ public class ApiPolicyFollowController {
return
Result
.
success
(
policyFollowService
.
getPolicyFollowVO
(
policyFollow
));
return
Result
.
success
(
policyFollowService
.
getPolicyFollowVO
(
policyFollow
));
}
}
@GetMapping
(
"/detail/{policyBizId}"
)
@Operation
(
summary
=
"根据 policyBizId 获取新单跟进聚合详情"
)
public
Result
<
PolicyFollowAggregateDto
>
getPolicyFollowAggregate
(
@PathVariable
String
policyBizId
)
{
try
{
PolicyFollowAggregateDto
result
=
policyFollowService
.
getPolicyFollowAggregate
(
policyBizId
);
return
Result
.
success
(
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"获取新单跟进聚合详情失败, policyBizId: {}"
,
policyBizId
,
e
);
return
Result
.
fail
(
"查询失败: "
+
e
.
getMessage
());
}
}
/**
/**
* 分页获取新单跟进列表(仅管理员可用)
* 分页获取新单跟进列表(仅管理员可用)
*
*
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
View file @
098fcfba
...
@@ -2,7 +2,6 @@ package com.yd.csf.api.service.impl;
...
@@ -2,7 +2,6 @@ package com.yd.csf.api.service.impl;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.sun.org.apache.bcel.internal.generic.I2F
;
import
com.yd.auth.core.dto.AuthUserDto
;
import
com.yd.auth.core.dto.AuthUserDto
;
import
com.yd.auth.core.utils.SecurityUtil
;
import
com.yd.auth.core.utils.SecurityUtil
;
import
com.yd.common.constant.CodeGeneratorConstants
;
import
com.yd.common.constant.CodeGeneratorConstants
;
...
@@ -21,17 +20,12 @@ import com.yd.csf.feign.response.appointment.ApiAppointmentDetailResponse;
...
@@ -21,17 +20,12 @@ import com.yd.csf.feign.response.appointment.ApiAppointmentDetailResponse;
import
com.yd.csf.feign.response.appointment.ApiAppointmentPageResponse
;
import
com.yd.csf.feign.response.appointment.ApiAppointmentPageResponse
;
import
com.yd.csf.service.enums.AppointmentStatusEnum
;
import
com.yd.csf.service.enums.AppointmentStatusEnum
;
import
com.yd.csf.service.enums.PolicyFollowStatusEnum
;
import
com.yd.csf.service.enums.PolicyFollowStatusEnum
;
import
com.yd.csf.service.model.Appointment
;
import
com.yd.csf.service.enums.PolicyStatusEnum
;
import
com.yd.csf.service.model.Fna
;
import
com.yd.csf.service.model.*
;
import
com.yd.csf.service.model.PolicyFollow
;
import
com.yd.csf.service.service.*
;
import
com.yd.csf.service.model.ProductPlan
;
import
com.yd.csf.service.service.FnaService
;
import
com.yd.csf.service.service.IAppointmentService
;
import
com.yd.csf.service.service.PolicyFollowService
;
import
com.yd.question.feign.client.ApiQuestionnairesFeignClient
;
import
com.yd.question.feign.client.ApiQuestionnairesFeignClient
;
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
com.yd.question.feign.response.ApiQuestionnairesDetailResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -40,6 +34,7 @@ import org.springframework.stereotype.Service;
...
@@ -40,6 +34,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
java.time.ZoneId
;
import
java.time.ZoneId
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -87,9 +82,20 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -87,9 +82,20 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
@Autowired
@Autowired
private
PolicyFollowService
policyFollowService
;
private
PolicyFollowService
policyFollowService
;
@Resource
private
PolicyService
policyService
;
@Resource
private
PolicyPolicyholderService
policyPolicyholderService
;
@Resource
private
PolicyInsurantService
policyInsurantService
;
@Resource
private
PolicyBeneficiaryService
policyBeneficiaryService
;
@Resource
private
PolicySecondHolderService
policySecondHolderService
;
/**
/**
* 预约分页查询
* 预约分页查询
*
* @param request
* @param request
* @return
* @return
*/
*/
...
@@ -102,6 +108,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -102,6 +108,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 预约详情(聚合信息详情)
* 预约详情(聚合信息详情)
*
* @param appointmentBizId
* @param appointmentBizId
* @return
* @return
*/
*/
...
@@ -112,22 +119,22 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -112,22 +119,22 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
Result
<
Appointment
>
result
=
checkAppointmentIsExist
(
appointmentBizId
);
Result
<
Appointment
>
result
=
checkAppointmentIsExist
(
appointmentBizId
);
Appointment
appointment
=
result
.
getData
();
Appointment
appointment
=
result
.
getData
();
ApiAppointmentInfoDto
dto
=
new
ApiAppointmentInfoDto
();
ApiAppointmentInfoDto
dto
=
new
ApiAppointmentInfoDto
();
BeanUtils
.
copyProperties
(
appointment
,
dto
);
BeanUtils
.
copyProperties
(
appointment
,
dto
);
response
.
setApiAppointmentInfoDto
(
dto
);
response
.
setApiAppointmentInfoDto
(
dto
);
//产品计划信息
//产品计划信息
Result
<
ApiProductPlanInfoDto
>
result1
=
apiProductPlanService
.
detail
(
appointmentBizId
,
""
);
Result
<
ApiProductPlanInfoDto
>
result1
=
apiProductPlanService
.
detail
(
appointmentBizId
,
""
);
response
.
setApiProductPlanInfoDto
(
result1
.
getData
());
response
.
setApiProductPlanInfoDto
(
result1
.
getData
());
//投保人信息
//投保人信息
Result
<
ApiPolicyholderInfoDto
>
result2
=
apiPolicyholderService
.
detail
(
appointmentBizId
,
""
);
Result
<
ApiPolicyholderInfoDto
>
result2
=
apiPolicyholderService
.
detail
(
appointmentBizId
,
""
);
response
.
setApiPolicyholderInfoDto
(
result2
.
getData
());
response
.
setApiPolicyholderInfoDto
(
result2
.
getData
());
//受保人信息
//受保人信息
Result
<
ApiInsurantInfoDto
>
result3
=
apiInsurantService
.
detail
(
appointmentBizId
,
""
);
Result
<
ApiInsurantInfoDto
>
result3
=
apiInsurantService
.
detail
(
appointmentBizId
,
""
);
response
.
setApiInsurantInfoDto
(
result3
.
getData
());
response
.
setApiInsurantInfoDto
(
result3
.
getData
());
//受益人列表信息
//受益人列表信息
Result
<
List
<
ApiBeneficiaryInfoDto
>>
result4
=
apiBeneficiaryService
.
list
(
appointmentBizId
);
Result
<
List
<
ApiBeneficiaryInfoDto
>>
result4
=
apiBeneficiaryService
.
list
(
appointmentBizId
);
response
.
setApiBeneficiaryInfoDtoList
(
result4
.
getData
());
response
.
setApiBeneficiaryInfoDtoList
(
result4
.
getData
());
//第二持有人信息
//第二持有人信息
Result
<
ApiSecondHolderInfoDto
>
result5
=
apiSecondHolderService
.
detail
(
appointmentBizId
,
""
);
Result
<
ApiSecondHolderInfoDto
>
result5
=
apiSecondHolderService
.
detail
(
appointmentBizId
,
""
);
response
.
setApiSecondHolderInfoDto
(
result5
.
getData
());
response
.
setApiSecondHolderInfoDto
(
result5
.
getData
());
//预约附件信息列表
//预约附件信息列表
Result
<
List
<
ApiAppointmentFileDto
>>
result6
=
apiAppointmentFileService
.
list
(
appointmentBizId
);
Result
<
List
<
ApiAppointmentFileDto
>>
result6
=
apiAppointmentFileService
.
list
(
appointmentBizId
);
...
@@ -142,6 +149,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -142,6 +149,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 预约主体信息详情(单个对象详情)
* 预约主体信息详情(单个对象详情)
*
* @param appointmentBizId
* @param appointmentBizId
* @return
* @return
*/
*/
...
@@ -150,12 +158,13 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -150,12 +158,13 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
Result
<
Appointment
>
result
=
checkAppointmentIsExist
(
appointmentBizId
);
Result
<
Appointment
>
result
=
checkAppointmentIsExist
(
appointmentBizId
);
Appointment
appointment
=
result
.
getData
();
Appointment
appointment
=
result
.
getData
();
ApiAppointmentInfoDto
dto
=
new
ApiAppointmentInfoDto
();
ApiAppointmentInfoDto
dto
=
new
ApiAppointmentInfoDto
();
BeanUtils
.
copyProperties
(
appointment
,
dto
);
BeanUtils
.
copyProperties
(
appointment
,
dto
);
return
Result
.
success
(
dto
);
return
Result
.
success
(
dto
);
}
}
/**
/**
* 新增预约提交
* 新增预约提交
*
* @param request
* @param request
* @return
* @return
*/
*/
...
@@ -166,32 +175,32 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -166,32 +175,32 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
apiAppointmentCheckService
.
checkAddRequest
(
request
);
apiAppointmentCheckService
.
checkAddRequest
(
request
);
//新增预约-添加预约信息主表数据 - 预约状态为待预约
//新增预约-添加预约信息主表数据 - 预约状态为待预约
Result
<
Appointment
>
appointmentResult
=
addAppointmentData
(
request
.
getApiAppointmentInfoDto
(),
AppointmentStatusEnum
.
DYY
.
getItemValue
());
Result
<
Appointment
>
appointmentResult
=
addAppointmentData
(
request
.
getApiAppointmentInfoDto
(),
AppointmentStatusEnum
.
DYY
.
getItemValue
());
Appointment
appointment
=
appointmentResult
.
getData
();
Appointment
appointment
=
appointmentResult
.
getData
();
//添加产品计划信息表数据
//添加产品计划信息表数据
Result
<
ProductPlan
>
productPlanResult
=
apiProductPlanService
.
addProductPlanData
(
request
.
getApiProductPlanInfoDto
(),
appointment
.
getAppointmentBizId
());
Result
<
ProductPlan
>
productPlanResult
=
apiProductPlanService
.
addProductPlanData
(
request
.
getApiProductPlanInfoDto
(),
appointment
.
getAppointmentBizId
());
ProductPlan
productPlan
=
productPlanResult
.
getData
();
ProductPlan
productPlan
=
productPlanResult
.
getData
();
//批量添加产品计划-附加险信息表数据
//批量添加产品计划-附加险信息表数据
apiAdditionalService
.
batchAddAdditionalData
(
request
.
getApiProductPlanInfoDto
(),
productPlan
.
getPlanBizId
());
apiAdditionalService
.
batchAddAdditionalData
(
request
.
getApiProductPlanInfoDto
(),
productPlan
.
getPlanBizId
());
//添加投保人信息表数据
//添加投保人信息表数据
apiPolicyholderService
.
addPolicyholderData
(
request
.
getApiPolicyholderInfoDto
(),
appointment
.
getAppointmentBizId
());
apiPolicyholderService
.
addPolicyholderData
(
request
.
getApiPolicyholderInfoDto
(),
appointment
.
getAppointmentBizId
());
//添加受保人信息表数据
//添加受保人信息表数据
apiInsurantService
.
addInsurantData
(
request
.
getApiInsurantInfoDto
(),
appointment
.
getAppointmentBizId
());
apiInsurantService
.
addInsurantData
(
request
.
getApiInsurantInfoDto
(),
appointment
.
getAppointmentBizId
());
//批量添加受益人信息表数据
//批量添加受益人信息表数据
apiBeneficiaryService
.
batchAddBeneficiaryData
(
request
.
getApiBeneficiaryInfoDtoList
(),
appointment
.
getAppointmentBizId
());
apiBeneficiaryService
.
batchAddBeneficiaryData
(
request
.
getApiBeneficiaryInfoDtoList
(),
appointment
.
getAppointmentBizId
());
//添加第二持有人信息表数据
//添加第二持有人信息表数据
apiSecondHolderService
.
addSecondHolderData
(
request
.
getApiSecondHolderInfoDto
(),
appointment
.
getAppointmentBizId
());
apiSecondHolderService
.
addSecondHolderData
(
request
.
getApiSecondHolderInfoDto
(),
appointment
.
getAppointmentBizId
());
//新增健康问卷和预约对象关系绑定
//新增健康问卷和预约对象关系绑定
objectSaveJkQuestion
(
appointment
.
getAppointmentBizId
());
objectSaveJkQuestion
(
appointment
.
getAppointmentBizId
());
//预约编号和预约业务id更新到FNA表(提交待预约状态,预约信息的预约业务id和预约编号更新到Fna表的预约业务id和预约编号)
//预约编号和预约业务id更新到FNA表(提交待预约状态,预约信息的预约业务id和预约编号更新到Fna表的预约业务id和预约编号)
updateFnaBizIdAndNo
(
appointment
.
getFnaBizId
(),
appointment
.
getAppointmentBizId
(),
appointment
.
getAppointmentNo
());
updateFnaBizIdAndNo
(
appointment
.
getFnaBizId
(),
appointment
.
getAppointmentBizId
(),
appointment
.
getAppointmentNo
());
ApiAppointmentAddResponse
response
=
new
ApiAppointmentAddResponse
();
ApiAppointmentAddResponse
response
=
new
ApiAppointmentAddResponse
();
response
.
setAppointmentBizId
(
appointment
.
getAppointmentBizId
());
response
.
setAppointmentBizId
(
appointment
.
getAppointmentBizId
());
return
Result
.
success
(
response
);
return
Result
.
success
(
response
);
...
@@ -199,10 +208,11 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -199,10 +208,11 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 提交待预约状态,预约信息更新到Fna表的预约业务id和预约编号
* 提交待预约状态,预约信息更新到Fna表的预约业务id和预约编号
*
* @return
* @return
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
updateFnaBizIdAndNo
(
String
fnaBizId
,
String
appointmentBizId
,
String
appointmentNo
)
{
public
Result
updateFnaBizIdAndNo
(
String
fnaBizId
,
String
appointmentBizId
,
String
appointmentNo
)
{
Fna
fna
=
fnaService
.
queryOne
(
fnaBizId
);
Fna
fna
=
fnaService
.
queryOne
(
fnaBizId
);
if
(!
Objects
.
isNull
(
fna
))
{
if
(!
Objects
.
isNull
(
fna
))
{
//预约编号
//预约编号
...
@@ -215,6 +225,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -215,6 +225,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 新增预约暂存
* 新增预约暂存
*
* @param request
* @param request
* @return
* @return
*/
*/
...
@@ -225,32 +236,32 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -225,32 +236,32 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
request
.
setApiAppointmentInfoDto
(
new
ApiAppointmentInfoDto
());
request
.
setApiAppointmentInfoDto
(
new
ApiAppointmentInfoDto
());
}
}
//校验预约信息-客户和fna入参
//校验预约信息-客户和fna入参
apiAppointmentCheckService
.
checkCustomerAndFna
(
request
.
getApiAppointmentInfoDto
(),
"预约信息-"
);
apiAppointmentCheckService
.
checkCustomerAndFna
(
request
.
getApiAppointmentInfoDto
(),
"预约信息-"
);
//新增预约暂存-添加预约信息主表数据为暂存状态
//新增预约暂存-添加预约信息主表数据为暂存状态
Result
<
Appointment
>
appointmentResult
=
addAppointmentData
(
request
.
getApiAppointmentInfoDto
(),
AppointmentStatusEnum
.
ZC
.
getItemValue
());
Result
<
Appointment
>
appointmentResult
=
addAppointmentData
(
request
.
getApiAppointmentInfoDto
(),
AppointmentStatusEnum
.
ZC
.
getItemValue
());
Appointment
appointment
=
appointmentResult
.
getData
();
Appointment
appointment
=
appointmentResult
.
getData
();
//添加产品计划信息表数据
//添加产品计划信息表数据
Result
<
ProductPlan
>
productPlanResult
=
apiProductPlanService
.
addProductPlanData
(
request
.
getApiProductPlanInfoDto
(),
appointment
.
getAppointmentBizId
());
Result
<
ProductPlan
>
productPlanResult
=
apiProductPlanService
.
addProductPlanData
(
request
.
getApiProductPlanInfoDto
(),
appointment
.
getAppointmentBizId
());
ProductPlan
productPlan
=
productPlanResult
.
getData
();
ProductPlan
productPlan
=
productPlanResult
.
getData
();
//批量添加产品计划-附加险信息表数据
//批量添加产品计划-附加险信息表数据
apiAdditionalService
.
batchAddAdditionalData
(
request
.
getApiProductPlanInfoDto
(),
productPlan
.
getPlanBizId
());
apiAdditionalService
.
batchAddAdditionalData
(
request
.
getApiProductPlanInfoDto
(),
productPlan
.
getPlanBizId
());
//添加投保人信息表数据
//添加投保人信息表数据
apiPolicyholderService
.
addPolicyholderData
(
request
.
getApiPolicyholderInfoDto
(),
appointment
.
getAppointmentBizId
());
apiPolicyholderService
.
addPolicyholderData
(
request
.
getApiPolicyholderInfoDto
(),
appointment
.
getAppointmentBizId
());
//添加受保人信息表数据
//添加受保人信息表数据
apiInsurantService
.
addInsurantData
(
request
.
getApiInsurantInfoDto
(),
appointment
.
getAppointmentBizId
());
apiInsurantService
.
addInsurantData
(
request
.
getApiInsurantInfoDto
(),
appointment
.
getAppointmentBizId
());
//批量添加受益人信息表数据
//批量添加受益人信息表数据
apiBeneficiaryService
.
batchAddBeneficiaryData
(
request
.
getApiBeneficiaryInfoDtoList
(),
appointment
.
getAppointmentBizId
());
apiBeneficiaryService
.
batchAddBeneficiaryData
(
request
.
getApiBeneficiaryInfoDtoList
(),
appointment
.
getAppointmentBizId
());
//添加第二持有人信息表数据
//添加第二持有人信息表数据
apiSecondHolderService
.
addSecondHolderData
(
request
.
getApiSecondHolderInfoDto
(),
appointment
.
getAppointmentBizId
());
apiSecondHolderService
.
addSecondHolderData
(
request
.
getApiSecondHolderInfoDto
(),
appointment
.
getAppointmentBizId
());
//预约编号和预约业务id更新到FNA表(提交待预约状态,预约信息的预约业务id和预约编号更新到Fna表的预约业务id和预约编号)
//预约编号和预约业务id更新到FNA表(提交待预约状态,预约信息的预约业务id和预约编号更新到Fna表的预约业务id和预约编号)
updateFnaBizIdAndNo
(
appointment
.
getFnaBizId
(),
appointment
.
getAppointmentBizId
(),
appointment
.
getAppointmentNo
());
updateFnaBizIdAndNo
(
appointment
.
getFnaBizId
(),
appointment
.
getAppointmentBizId
(),
appointment
.
getAppointmentNo
());
//新增健康问卷和预约对象关系绑定
//新增健康问卷和预约对象关系绑定
objectSaveJkQuestion
(
appointment
.
getAppointmentBizId
());
objectSaveJkQuestion
(
appointment
.
getAppointmentBizId
());
...
@@ -260,11 +271,12 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -260,11 +271,12 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 新增预约-添加预约信息主表数据
* 新增预约-添加预约信息主表数据
*
* @param dto
* @param dto
* @return
* @return
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
<
Appointment
>
addAppointmentData
(
ApiAppointmentInfoDto
dto
,
Integer
status
)
{
public
Result
<
Appointment
>
addAppointmentData
(
ApiAppointmentInfoDto
dto
,
Integer
status
)
{
if
(
Objects
.
isNull
(
dto
))
{
if
(
Objects
.
isNull
(
dto
))
{
//为空设置,方便新建暂存公用方法
//为空设置,方便新建暂存公用方法
dto
=
new
ApiAppointmentInfoDto
();
dto
=
new
ApiAppointmentInfoDto
();
...
@@ -272,7 +284,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -272,7 +284,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//获取Security上下文当前用户的登录信息
//获取Security上下文当前用户的登录信息
AuthUserDto
authUserDto
=
SecurityUtil
.
getCurrentLoginUser
();
AuthUserDto
authUserDto
=
SecurityUtil
.
getCurrentLoginUser
();
Appointment
appointment
=
new
Appointment
();
Appointment
appointment
=
new
Appointment
();
BeanUtils
.
copyProperties
(
dto
,
appointment
);
BeanUtils
.
copyProperties
(
dto
,
appointment
);
//生成预约信息主表唯一业务ID
//生成预约信息主表唯一业务ID
appointment
.
setAppointmentBizId
(
RandomStringGenerator
.
generateBizId16
(
CommonEnum
.
UID_TYPE_APPOINTMENT
.
getCode
()));
appointment
.
setAppointmentBizId
(
RandomStringGenerator
.
generateBizId16
(
CommonEnum
.
UID_TYPE_APPOINTMENT
.
getCode
()));
//生成预约编号
//生成预约编号
...
@@ -286,6 +298,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -286,6 +298,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 编辑预约提交 (聚合信息编辑预约提交)
* 编辑预约提交 (聚合信息编辑预约提交)
*
* @param request
* @param request
* @return
* @return
*/
*/
...
@@ -301,7 +314,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -301,7 +314,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
//校验预约信息是否存在
//校验预约信息是否存在
Result
<
Appointment
>
result
=
checkAppointmentIsExist
(
request
.
getApiAppointmentInfoDto
().
getAppointmentBizId
());
Result
<
Appointment
>
result
=
checkAppointmentIsExist
(
request
.
getApiAppointmentInfoDto
().
getAppointmentBizId
());
appointmentCheck
=
result
.
getData
();
appointmentCheck
=
result
.
getData
();
if
(
AppointmentStatusEnum
.
ZC
.
getItemValue
().
equals
(
appointmentCheck
.
getStatus
())){
if
(
AppointmentStatusEnum
.
ZC
.
getItemValue
().
equals
(
appointmentCheck
.
getStatus
()))
{
//当前为暂存状态——>提交更新为待预约状态
//当前为暂存状态——>提交更新为待预约状态
status
=
AppointmentStatusEnum
.
DYY
.
getItemValue
();
status
=
AppointmentStatusEnum
.
DYY
.
getItemValue
();
}
}
...
@@ -317,31 +330,31 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -317,31 +330,31 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
}
}
//编辑预约提交-编辑预约信息主表数据
//编辑预约提交-编辑预约信息主表数据
Result
<
Appointment
>
appointmentResult
=
editAppointmentData
(
request
.
getApiAppointmentInfoDto
(),
status
);
Result
<
Appointment
>
appointmentResult
=
editAppointmentData
(
request
.
getApiAppointmentInfoDto
(),
status
);
Appointment
appointment
=
appointmentResult
.
getData
();
Appointment
appointment
=
appointmentResult
.
getData
();
//编辑产品计划信息表数据
//编辑产品计划信息表数据
Result
<
ProductPlan
>
productPlanResult
=
apiProductPlanService
.
editProductPlanData
(
request
.
getApiProductPlanInfoDto
(),
appointment
.
getAppointmentBizId
());
Result
<
ProductPlan
>
productPlanResult
=
apiProductPlanService
.
editProductPlanData
(
request
.
getApiProductPlanInfoDto
(),
appointment
.
getAppointmentBizId
());
ProductPlan
productPlan
=
productPlanResult
.
getData
();
ProductPlan
productPlan
=
productPlanResult
.
getData
();
//批量编辑产品计划-附加险信息表数据
//批量编辑产品计划-附加险信息表数据
apiAdditionalService
.
batchEditAdditionalData
(
request
.
getApiProductPlanInfoDto
(),
productPlan
.
getPlanBizId
());
apiAdditionalService
.
batchEditAdditionalData
(
request
.
getApiProductPlanInfoDto
(),
productPlan
.
getPlanBizId
());
//编辑投保人信息表数据
//编辑投保人信息表数据
apiPolicyholderService
.
editPolicyholderData
(
request
.
getApiPolicyholderInfoDto
(),
appointment
.
getAppointmentBizId
());
apiPolicyholderService
.
editPolicyholderData
(
request
.
getApiPolicyholderInfoDto
(),
appointment
.
getAppointmentBizId
());
//编辑受保人信息表数据
//编辑受保人信息表数据
apiInsurantService
.
editInsurantData
(
request
.
getApiInsurantInfoDto
(),
appointment
.
getAppointmentBizId
());
apiInsurantService
.
editInsurantData
(
request
.
getApiInsurantInfoDto
(),
appointment
.
getAppointmentBizId
());
//批量编辑受益人信息表数据
//批量编辑受益人信息表数据
apiBeneficiaryService
.
batchEditBeneficiaryData
(
request
.
getApiBeneficiaryInfoDtoList
(),
appointment
.
getAppointmentBizId
());
apiBeneficiaryService
.
batchEditBeneficiaryData
(
request
.
getApiBeneficiaryInfoDtoList
(),
appointment
.
getAppointmentBizId
());
//编辑第二持有人信息表数据
//编辑第二持有人信息表数据
apiSecondHolderService
.
editSecondHolderData
(
request
.
getApiSecondHolderInfoDto
(),
appointment
.
getAppointmentBizId
());
apiSecondHolderService
.
editSecondHolderData
(
request
.
getApiSecondHolderInfoDto
(),
appointment
.
getAppointmentBizId
());
if
(!
Objects
.
isNull
(
status
)
&&
AppointmentStatusEnum
.
DYY
.
getItemValue
().
equals
(
status
))
{
if
(!
Objects
.
isNull
(
status
)
&&
AppointmentStatusEnum
.
DYY
.
getItemValue
().
equals
(
status
))
{
//当前为暂存状态——>提交更新为待预约状态需要更新Fna表的编号和业务id完成绑定关联
//当前为暂存状态——>提交更新为待预约状态需要更新Fna表的编号和业务id完成绑定关联
//预约编号和预约业务id更新到FNA表(提交待预约状态,预约信息的预约业务id和预约编号更新到Fna表的预约业务id和预约编号)
//预约编号和预约业务id更新到FNA表(提交待预约状态,预约信息的预约业务id和预约编号更新到Fna表的预约业务id和预约编号)
updateFnaBizIdAndNo
(
appointment
.
getFnaBizId
(),
appointment
.
getAppointmentBizId
(),
appointment
.
getAppointmentNo
());
updateFnaBizIdAndNo
(
appointment
.
getFnaBizId
(),
appointment
.
getAppointmentBizId
(),
appointment
.
getAppointmentNo
());
}
}
//远程调用-问卷-答题提交接口
//远程调用-问卷-答题提交接口
...
@@ -358,6 +371,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -358,6 +371,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 确定预约时间提交 (流程流转到新单跟进)
* 确定预约时间提交 (流程流转到新单跟进)
*
* @param request
* @param request
* @return
* @return
*/
*/
...
@@ -372,7 +386,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -372,7 +386,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
if
(
AppointmentStatusEnum
.
ZC
.
getItemValue
().
equals
(
appointment
.
getStatus
()))
{
if
(
AppointmentStatusEnum
.
ZC
.
getItemValue
().
equals
(
appointment
.
getStatus
()))
{
//暂存
//暂存
throw
new
BusinessException
(
"当前为暂存状态,不能提交到新单跟进!"
);
throw
new
BusinessException
(
"当前为暂存状态,不能提交到新单跟进!"
);
}
else
{
}
else
{
//其他状态
//其他状态
throw
new
BusinessException
(
"你已经提交到新单跟进,不能再次提交!"
);
throw
new
BusinessException
(
"你已经提交到新单跟进,不能再次提交!"
);
}
}
...
@@ -389,6 +403,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -389,6 +403,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 确定预约时间提交 (流程流转到新单跟进) - 新增新单跟进记录
* 确定预约时间提交 (流程流转到新单跟进) - 新增新单跟进记录
*
* @return
* @return
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -399,16 +414,17 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -399,16 +414,17 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
ApiInsurantInfoDto
apiInsurantInfoDto
=
null
;
ApiInsurantInfoDto
apiInsurantInfoDto
=
null
;
if
(!
Objects
.
isNull
(
response
)
if
(!
Objects
.
isNull
(
response
)
&&
!
Objects
.
isNull
(
response
.
getApiProductPlanInfoDto
())
&&
!
Objects
.
isNull
(
response
.
getApiProductPlanInfoDto
())
&&
!
Objects
.
isNull
(
response
.
getApiProductPlanInfoDto
().
getApiProductPlanMainInfoDto
())){
&&
!
Objects
.
isNull
(
response
.
getApiProductPlanInfoDto
().
getApiProductPlanMainInfoDto
()))
{
apiProductPlanMainInfoDto
=
response
.
getApiProductPlanInfoDto
().
getApiProductPlanMainInfoDto
();
apiProductPlanMainInfoDto
=
response
.
getApiProductPlanInfoDto
().
getApiProductPlanMainInfoDto
();
}
}
if
(!
Objects
.
isNull
(
response
)
if
(!
Objects
.
isNull
(
response
)
&&
!
Objects
.
isNull
(
response
.
getApiInsurantInfoDto
())){
&&
!
Objects
.
isNull
(
response
.
getApiInsurantInfoDto
()))
{
apiInsurantInfoDto
=
response
.
getApiInsurantInfoDto
();
apiInsurantInfoDto
=
response
.
getApiInsurantInfoDto
();
}
}
PolicyFollow
follow
=
new
PolicyFollow
();
PolicyFollow
follow
=
new
PolicyFollow
();
String
policyBizId
=
RandomStringGenerator
.
generateBizId16
(
CommonEnum
.
UID_TYPE_POLICY
.
getCode
());
//新单跟进唯一业务ID
//新单跟进唯一业务ID
follow
.
setPolicyBizId
(
RandomStringGenerator
.
generateBizId16
(
CommonEnum
.
UID_TYPE_POLICY
.
getCode
())
);
follow
.
setPolicyBizId
(
policyBizId
);
follow
.
setAppointmentBizId
(
appointment
.
getAppointmentBizId
());
follow
.
setAppointmentBizId
(
appointment
.
getAppointmentBizId
());
follow
.
setAppointmentNo
(
appointment
.
getAppointmentNo
());
follow
.
setAppointmentNo
(
appointment
.
getAppointmentNo
());
//客户信息表唯一业务ID
//客户信息表唯一业务ID
...
@@ -462,11 +478,79 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -462,11 +478,79 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
policyFollowService
.
saveOrUpdate
(
follow
);
policyFollowService
.
saveOrUpdate
(
follow
);
// 同步保存保单(产品计划)
savePolicy
(
follow
,
apiProductPlanMainInfoDto
,
policyBizId
);
// 同步保存保单投保人
savePolicyPolicyholder
(
apiInsurantInfoDto
,
policyBizId
);
// 同步保存保单受保人
savePolicyInsurant
(
apiInsurantInfoDto
,
policyBizId
);
// 同步保存保单受益人
savePolicyBeneficiary
(
apiInsurantInfoDto
,
policyBizId
);
// 同步保存保单第二持有人
savePolicySecondHolder
(
apiInsurantInfoDto
,
policyBizId
);
return
Result
.
success
();
return
Result
.
success
();
}
}
private
boolean
savePolicySecondHolder
(
ApiInsurantInfoDto
apiInsurantInfoDto
,
String
policyBizId
)
{
PolicySecondHolder
policySecondHolder
=
new
PolicySecondHolder
();
BeanUtils
.
copyProperties
(
apiInsurantInfoDto
,
policySecondHolder
);
policySecondHolder
.
setId
(
null
);
policySecondHolder
.
setPolicyBizId
(
policyBizId
);
policySecondHolder
.
setPolicySecondHolderBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_second_holder"
));
return
policySecondHolderService
.
saveOrUpdate
(
policySecondHolder
);
}
private
boolean
savePolicyBeneficiary
(
ApiInsurantInfoDto
apiInsurantInfoDto
,
String
policyBizId
)
{
PolicyBeneficiary
policyBeneficiary
=
new
PolicyBeneficiary
();
BeanUtils
.
copyProperties
(
apiInsurantInfoDto
,
policyBeneficiary
);
policyBeneficiary
.
setId
(
null
);
policyBeneficiary
.
setPolicyBizId
(
policyBizId
);
policyBeneficiary
.
setPolicyBeneficiaryBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_beneficiary"
));
return
policyBeneficiaryService
.
saveOrUpdate
(
policyBeneficiary
);
}
private
boolean
savePolicyInsurant
(
ApiInsurantInfoDto
apiInsurantInfoDto
,
String
policyBizId
)
{
PolicyInsurant
policyInsurant
=
new
PolicyInsurant
();
BeanUtils
.
copyProperties
(
apiInsurantInfoDto
,
policyInsurant
);
policyInsurant
.
setId
(
null
);
policyInsurant
.
setPolicyBizId
(
policyBizId
);
policyInsurant
.
setPolicyInsurantBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_insurant"
));
return
policyInsurantService
.
saveOrUpdate
(
policyInsurant
);
}
private
boolean
savePolicyPolicyholder
(
ApiInsurantInfoDto
apiInsurantInfoDto
,
String
policyBizId
)
{
PolicyPolicyholder
policyPolicyholder
=
new
PolicyPolicyholder
();
BeanUtils
.
copyProperties
(
apiInsurantInfoDto
,
policyPolicyholder
);
policyPolicyholder
.
setId
(
null
);
policyPolicyholder
.
setPolicyBizId
(
policyBizId
);
policyPolicyholder
.
setPolicyPolicyholderBizId
(
RandomStringGenerator
.
generateBizId16
(
"policy_policyholder"
));
return
policyPolicyholderService
.
saveOrUpdate
(
policyPolicyholder
);
}
private
boolean
savePolicy
(
PolicyFollow
policyFollow
,
ApiProductPlanMainInfoDto
apiProductPlanMainInfoDto
,
String
policyBizId
)
{
// 同步保存保单(产品计划)
Policy
policy
=
new
Policy
();
BeanUtils
.
copyProperties
(
policyFollow
,
policy
);
BeanUtils
.
copyProperties
(
apiProductPlanMainInfoDto
,
policy
);
policy
.
setId
(
null
);
policy
.
setPolicyBizId
(
policyBizId
);
policy
.
setPlanBizId
(
apiProductPlanMainInfoDto
.
getPlanBizId
());
policy
.
setStatus
(
PolicyStatusEnum
.
INFORCE
.
getItemValue
());
policy
.
setCreateTime
(
new
Date
());
policy
.
setUpdateTime
(
new
Date
());
return
policyService
.
saveOrUpdate
(
policy
);
}
/**
/**
* 单个对象编辑-编辑预约主体信息
* 单个对象编辑-编辑预约主体信息
*
* @param apiAppointmentInfoDto
* @param apiAppointmentInfoDto
* @return
* @return
*/
*/
...
@@ -478,17 +562,18 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -478,17 +562,18 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
apiAppointmentCheckService
.
checkEditApiAppointmentInfoDto
(
apiAppointmentInfoDto
);
apiAppointmentCheckService
.
checkEditApiAppointmentInfoDto
(
apiAppointmentInfoDto
);
//编辑预约-编辑预约信息主表数据
//编辑预约-编辑预约信息主表数据
editAppointmentData
(
apiAppointmentInfoDto
,
null
);
editAppointmentData
(
apiAppointmentInfoDto
,
null
);
return
Result
.
success
();
return
Result
.
success
();
}
}
/**
/**
* 编辑预约-编辑预约信息主表数据
* 编辑预约-编辑预约信息主表数据
*
* @param dto
* @param dto
* @return
* @return
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
<
Appointment
>
editAppointmentData
(
ApiAppointmentInfoDto
dto
,
Integer
status
)
{
public
Result
<
Appointment
>
editAppointmentData
(
ApiAppointmentInfoDto
dto
,
Integer
status
)
{
if
(
Objects
.
isNull
(
dto
))
{
if
(
Objects
.
isNull
(
dto
))
{
//预约信息对象不能为空
//预约信息对象不能为空
throw
new
BusinessException
(
"预约信息对象不能为空"
);
throw
new
BusinessException
(
"预约信息对象不能为空"
);
...
@@ -497,7 +582,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -497,7 +582,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
Result
<
Appointment
>
result
=
checkAppointmentIsExist
(
dto
.
getAppointmentBizId
());
Result
<
Appointment
>
result
=
checkAppointmentIsExist
(
dto
.
getAppointmentBizId
());
Appointment
appointment
=
result
.
getData
();
Appointment
appointment
=
result
.
getData
();
BeanUtils
.
copyProperties
(
dto
,
appointment
);
BeanUtils
.
copyProperties
(
dto
,
appointment
);
if
(!
Objects
.
isNull
(
status
))
{
if
(!
Objects
.
isNull
(
status
))
{
//不为空设置状态
//不为空设置状态
appointment
.
setStatus
(
status
);
appointment
.
setStatus
(
status
);
...
@@ -508,6 +593,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -508,6 +593,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 预约编辑关联FNA
* 预约编辑关联FNA
*
* @param request
* @param request
* @return
* @return
*/
*/
...
@@ -527,6 +613,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -527,6 +613,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 预约解除关联FNA
* 预约解除关联FNA
*
* @param request
* @param request
* @return
* @return
*/
*/
...
@@ -546,6 +633,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -546,6 +633,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 预约编辑关联计划书
* 预约编辑关联计划书
*
* @param request
* @param request
* @return
* @return
*/
*/
...
@@ -565,6 +653,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -565,6 +653,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 预约解除关联计划书
* 预约解除关联计划书
*
* @param request
* @param request
* @return
* @return
*/
*/
...
@@ -584,6 +673,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -584,6 +673,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 预约编辑转保声明
* 预约编辑转保声明
*
* @param request
* @param request
* @return
* @return
*/
*/
...
@@ -601,6 +691,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -601,6 +691,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 删除预约信息
* 删除预约信息
*
* @param appointmentBizId
* @param appointmentBizId
* @return
* @return
*/
*/
...
@@ -616,6 +707,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -616,6 +707,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 新增健康问卷和预约对象关系绑定
* 新增健康问卷和预约对象关系绑定
*
* @return
* @return
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -631,6 +723,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -631,6 +723,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
/**
/**
* 校验预约信息是否存在
* 校验预约信息是否存在
*
* @param appointmentBizId
* @param appointmentBizId
* @return
* @return
*/
*/
...
@@ -638,7 +731,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -638,7 +731,7 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
Appointment
appointment
=
iAppointmentService
.
queryOne
(
appointmentBizId
);
Appointment
appointment
=
iAppointmentService
.
queryOne
(
appointmentBizId
);
if
(
Objects
.
isNull
(
appointment
))
{
if
(
Objects
.
isNull
(
appointment
))
{
//数据不存在
//数据不存在
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
ResultCode
.
NULL_ERROR
.
getMessage
());
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
ResultCode
.
NULL_ERROR
.
getMessage
());
}
}
return
Result
.
success
(
appointment
);
return
Result
.
success
(
appointment
);
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/config/AsyncConfig.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
config
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
import
java.util.concurrent.Executor
;
import
java.util.concurrent.ThreadPoolExecutor
;
@Configuration
@EnableAsync
public
class
AsyncConfig
{
/**
* 异步聚合查询线程池
*/
@Bean
(
"asyncQueryExecutor"
)
public
Executor
asyncQueryExecutor
()
{
ThreadPoolTaskExecutor
executor
=
new
ThreadPoolTaskExecutor
();
// 核心线程数(根据CPU核心数动态设置)
executor
.
setCorePoolSize
(
Runtime
.
getRuntime
().
availableProcessors
());
// 最大线程数
executor
.
setMaxPoolSize
(
Runtime
.
getRuntime
().
availableProcessors
()
*
2
);
// 队列容量
executor
.
setQueueCapacity
(
100
);
// 线程名前缀
executor
.
setThreadNamePrefix
(
"async-query-"
);
// 拒绝策略:由调用线程处理(保证不会丢失任务)
executor
.
setRejectedExecutionHandler
(
new
ThreadPoolExecutor
.
CallerRunsPolicy
());
// 等待任务完成再关闭
executor
.
setWaitForTasksToCompleteOnShutdown
(
true
);
executor
.
setAwaitTerminationSeconds
(
60
);
// 空闲线程存活时间
executor
.
setKeepAliveSeconds
(
60
);
executor
.
initialize
();
return
executor
;
}
/**
* 通用异步任务线程池
*/
@Bean
(
"commonAsyncExecutor"
)
public
Executor
commonAsyncExecutor
()
{
ThreadPoolTaskExecutor
executor
=
new
ThreadPoolTaskExecutor
();
executor
.
setCorePoolSize
(
5
);
executor
.
setMaxPoolSize
(
10
);
executor
.
setQueueCapacity
(
50
);
executor
.
setThreadNamePrefix
(
"common-async-"
);
executor
.
setRejectedExecutionHandler
(
new
ThreadPoolExecutor
.
CallerRunsPolicy
());
executor
.
setWaitForTasksToCompleteOnShutdown
(
true
);
executor
.
setAwaitTerminationSeconds
(
30
);
executor
.
setKeepAliveSeconds
(
30
);
executor
.
initialize
();
return
executor
;
}
}
\ No newline at end of file
yd-csf-service/src/main/java/com/yd/csf/service/dao/PolicyBeneficiaryMapper.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
dao
;
import
com.yd.csf.service.model.PolicyBeneficiary
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* @author Zhang Jianan
* @description 针对表【policy_beneficiary(受益人信息表)】的数据库操作Mapper
* @createDate 2025-10-31 11:43:16
* @Entity generator.domain.PolicyBeneficiary
*/
public
interface
PolicyBeneficiaryMapper
extends
BaseMapper
<
PolicyBeneficiary
>
{
}
yd-csf-service/src/main/java/com/yd/csf/service/dao/PolicyInsurantMapper.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
dao
;
import
com.yd.csf.service.model.PolicyInsurant
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* @author Zhang Jianan
* @description 针对表【policy_insurant(保单受保人信息表)】的数据库操作Mapper
* @createDate 2025-10-31 13:29:18
* @Entity generator.domain.PolicyInsurant
*/
public
interface
PolicyInsurantMapper
extends
BaseMapper
<
PolicyInsurant
>
{
}
yd-csf-service/src/main/java/com/yd/csf/service/dao/PolicyPolicyholderMapper.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
dao
;
import
com.yd.csf.service.model.PolicyPolicyholder
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* @author Zhang Jianan
* @description 针对表【policy_policyholder(保单投保人信息表)】的数据库操作Mapper
* @createDate 2025-10-31 11:43:10
* @Entity generator.domain.PolicyPolicyholder
*/
public
interface
PolicyPolicyholderMapper
extends
BaseMapper
<
PolicyPolicyholder
>
{
}
yd-csf-service/src/main/java/com/yd/csf/service/dao/PolicySecondHolderMapper.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
dao
;
import
com.yd.csf.service.model.PolicySecondHolder
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* @author Zhang Jianan
* @description 针对表【policy_second_holder(第二持有人信息表)】的数据库操作Mapper
* @createDate 2025-10-31 13:29:23
* @Entity generator.domain.PolicySecondHolder
*/
public
interface
PolicySecondHolderMapper
extends
BaseMapper
<
PolicySecondHolder
>
{
}
yd-csf-service/src/main/java/com/yd/csf/service/dto/PolicyFollowAggregateDto.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
dto
;
import
com.yd.csf.service.model.*
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 新单跟进聚合查询结果DTO
*/
@Data
public
class
PolicyFollowAggregateDto
implements
Serializable
{
/**
* 新单跟进业务ID
*/
@Schema
(
description
=
"新单跟进业务ID"
)
private
String
policyBizId
;
/**
* 保单产品计划(保单)
*/
@Schema
(
description
=
"保单产品计划(保单)"
)
private
Policy
policy
;
/**
* 保单投保人
*/
@Schema
(
description
=
"保单投保人"
)
private
List
<
PolicyPolicyholder
>
policyPolicyholderList
;
/**
* 保单受保人
*/
@Schema
(
description
=
"保单受保人"
)
private
List
<
PolicyInsurant
>
policyInsurantList
;
/**
* 保单受益人
*/
@Schema
(
description
=
"保单受益人"
)
private
List
<
PolicyBeneficiary
>
policyBeneficiaryList
;
/**
* 保单第二持有人
*/
@Schema
(
description
=
"保单第二持有人"
)
private
List
<
PolicySecondHolder
>
policySecondHolderList
;
// todo 健康问卷
// private Object policyholderInfo;
// 错误信息(如果有查询失败的情况)
private
String
errorMessage
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yd-csf-service/src/main/java/com/yd/csf/service/enums/PolicyStatusEnum.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
enums
;
import
org.apache.commons.lang3.ObjectUtils
;
public
enum
PolicyStatusEnum
{
INFORCE
(
"生效中"
,
"INFORCE"
),
LAPSED
(
"保单失效"
,
"LAPSED"
),
MATURED
(
"期满终止"
,
"MATURED"
),
;
//字典项标签(名称)
private
String
itemLabel
;
//字典项值
private
String
itemValue
;
//构造函数
PolicyStatusEnum
(
String
itemLabel
,
String
itemValue
)
{
this
.
itemLabel
=
itemLabel
;
this
.
itemValue
=
itemValue
;
}
/**
* 根据 itemLabel 获取枚举
*
* @param itemLabel
* @return
*/
public
static
PolicyStatusEnum
getEnumByItemLabel
(
String
itemLabel
)
{
if
(
ObjectUtils
.
isEmpty
(
itemLabel
))
{
return
null
;
}
for
(
PolicyStatusEnum
anEnum
:
PolicyStatusEnum
.
values
())
{
if
(
anEnum
.
itemLabel
.
equals
(
itemLabel
))
{
return
anEnum
;
}
}
return
null
;
}
public
String
getItemLabel
()
{
return
itemLabel
;
}
public
String
getItemValue
()
{
return
itemValue
;
}
/**
* 根据 value 获取枚举
*
* @param value
* @return
*/
public
static
PolicyStatusEnum
getEnumByValue
(
String
value
)
{
if
(
ObjectUtils
.
isEmpty
(
value
))
{
return
null
;
}
for
(
PolicyStatusEnum
anEnum
:
PolicyStatusEnum
.
values
())
{
if
(
anEnum
.
getItemValue
().
equals
(
value
))
{
return
anEnum
;
}
}
return
null
;
}
}
yd-csf-service/src/main/java/com/yd/csf/service/model/Policy.java
View file @
098fcfba
...
@@ -38,6 +38,11 @@ public class Policy implements Serializable {
...
@@ -38,6 +38,11 @@ public class Policy implements Serializable {
private
String
userBizId
;
private
String
userBizId
;
/**
/**
* 产品业务id
*/
private
String
planBizId
;
/**
* 产品代码
* 产品代码
*/
*/
private
String
productCode
;
private
String
productCode
;
...
@@ -48,7 +53,7 @@ public class Policy implements Serializable {
...
@@ -48,7 +53,7 @@ public class Policy implements Serializable {
private
String
productName
;
private
String
productName
;
/**
/**
* 产品
类别
* 产品
险种
*/
*/
private
String
productCate
;
private
String
productCate
;
...
@@ -63,6 +68,11 @@ public class Policy implements Serializable {
...
@@ -63,6 +68,11 @@ public class Policy implements Serializable {
private
String
insurerBizId
;
private
String
insurerBizId
;
/**
/**
* 地区
*/
private
String
region
;
/**
* 保單持有人
* 保單持有人
*/
*/
private
String
policyHolder
;
private
String
policyHolder
;
...
@@ -73,11 +83,16 @@ public class Policy implements Serializable {
...
@@ -73,11 +83,16 @@ public class Policy implements Serializable {
private
String
insured
;
private
String
insured
;
/**
/**
* 供款年期
* 供款年期
(字典)
*/
*/
private
Integer
paymentTerm
;
private
Integer
paymentTerm
;
/**
/**
* 付款频率(字典)
*/
private
String
paymentFrequency
;
/**
* 期交保费
* 期交保费
*/
*/
private
BigDecimal
paymentPremium
;
private
BigDecimal
paymentPremium
;
...
@@ -123,11 +138,41 @@ public class Policy implements Serializable {
...
@@ -123,11 +138,41 @@ public class Policy implements Serializable {
private
Integer
isPrepaid
;
private
Integer
isPrepaid
;
/**
/**
* 预付额
*/
private
String
deductibles
;
/**
* 预缴年期
* 预缴年期
*/
*/
private
Integer
prepaidTerm
;
private
Integer
prepaidTerm
;
/**
/**
* 首期付款方式(字典)
*/
private
String
initialPaymentMethod
;
/**
* 续期付款方式(字典)
*/
private
String
renewalPaymentMethod
;
/**
* 红利分配方式(字典)
*/
private
String
dividendDistributionMethod
;
/**
* 保单日期回溯: 0-否, 1-是(字典)
*/
private
Integer
isBacktrack
;
/**
* 是否参加递增保障权益: 0-否, 1-是(字典)
*/
private
Integer
isJoin
;
/**
* 对账公司
* 对账公司
*/
*/
private
String
reconciliationCompany
;
private
String
reconciliationCompany
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/PolicyBeneficiary.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 受益人信息表
* @TableName policy_beneficiary
*/
@TableName
(
value
=
"policy_beneficiary"
)
@Data
public
class
PolicyBeneficiary
implements
Serializable
{
/**
*
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 保单受益人信息表唯一业务ID
*/
private
String
policyBeneficiaryBizId
;
/**
* 新单跟进业务ID
*/
private
String
policyBizId
;
/**
* 保单号
*/
private
String
policyNo
;
/**
* 客户类型(字典)(个人或者公司)
*/
private
String
customerType
;
/**
* 与受保人关系(字典)
*/
private
String
insurantRel
;
/**
* 受益比例
*/
private
BigDecimal
benefitRatio
;
/**
* 名字
*/
private
String
name
;
/**
* 名字-英文
*/
private
String
nameEn
;
/**
* 性别(字典)
*/
private
String
gender
;
/**
* 证件类型(字典)
*/
private
String
documentType
;
/**
* 证件号码
*/
private
String
idNumber
;
/**
* 护照号码
*/
private
String
passportNumber
;
/**
* 出生日期
*/
private
Date
birthTime
;
/**
* 公司名称
*/
private
String
companyName
;
/**
* 公司名称(英文)
*/
private
String
companyNameEn
;
/**
* 公司商业登记号码
*/
private
String
companyBusinessNo
;
/**
* 公司注册日期
*/
private
Date
companyRegisterTime
;
/**
* 公司注册地区(字典)
*/
private
String
companyRegisterRegion
;
/**
* 公司电话区号
*/
private
String
companyMobileCode
;
/**
* 公司电话
*/
private
String
companyMobile
;
/**
* 公司邮箱
*/
private
String
companyEmail
;
/**
* 公司登记地址
*/
private
String
companyEnterAddress
;
/**
* 通讯地址
*/
private
String
mailingAddress
;
/**
* 授权代表姓名中文-名字
*/
private
String
authNameCn
;
/**
* 授权代表姓名英文-名字
*/
private
String
authNameEn
;
/**
* 授权代表职称
*/
private
String
authProfessional
;
/**
* 授权代表电话区号
*/
private
String
authMobileCode
;
/**
* 授权代表电话
*/
private
String
authMobile
;
/**
* 地址列表(json串)
*/
private
String
addressList
;
/**
* 通用备注
*/
private
String
remark
;
/**
* 删除标识: 0-正常, 1-删除
*/
private
Integer
isDeleted
;
/**
* 创建人ID
*/
private
String
creatorId
;
/**
* 更新人ID
*/
private
String
updaterId
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
@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/model/PolicyInsurant.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 保单受保人信息表
* @TableName policy_insurant
*/
@TableName
(
value
=
"policy_insurant"
)
@Data
public
class
PolicyInsurant
implements
Serializable
{
/**
*
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 受保人信息表唯一业务ID
*/
private
String
policyInsurantBizId
;
/**
* 新单跟进业务ID
*/
private
String
policyBizId
;
/**
* 保单号
*/
private
String
policyNo
;
/**
* 客户类型(字典)
*/
private
String
customerType
;
/**
* 关联客户信息表唯一业务ID(冗余字段)
*/
private
String
customerBizId
;
/**
* 关联客户编号(和客户信息表唯一业务ID是一对,唯一,冗余字段)
*/
private
String
customerNo
;
/**
* 与投保人关系(字典)
*/
private
String
policyholderRel
;
/**
* 名字
*/
private
String
name
;
/**
* 名字-英文
*/
private
String
nameEn
;
/**
* 性别(字典)
*/
private
String
gender
;
/**
* 证件类型(字典)
*/
private
String
documentType
;
/**
* 证件号码
*/
private
String
idNumber
;
/**
* 出生日期
*/
private
Date
birthday
;
/**
* 年龄
*/
private
String
age
;
/**
* 居住地址
*/
private
String
residentialAddress
;
/**
* 通讯地址
*/
private
String
mailingAddress
;
/**
* 移动电话区号
*/
private
String
mobileCode
;
/**
* 移动电话
*/
private
String
mobile
;
/**
* 邮箱
*/
private
String
email
;
/**
* 公司名称
*/
private
String
companyName
;
/**
* 公司地址
*/
private
String
companyAddress
;
/**
* 行业
*/
private
String
industry
;
/**
* 职位
*/
private
String
position
;
/**
* 风险偏好(字典)
*/
private
String
riskAppetite
;
/**
* 是否VIP: 0-否, 1-是(字典)
*/
private
Integer
isVip
;
/**
* vip备注
*/
private
String
vipRemark
;
/**
* 称谓(字典)
*/
private
String
appellation
;
/**
* 是否区分吸烟(字典)
*/
private
String
smokingAllowed
;
/**
* 出生地(省市)
*/
private
String
birthplace
;
/**
* 国籍
*/
private
String
nationality
;
/**
* 护照号码
*/
private
String
passportNo
;
/**
* 通行证号码
*/
private
String
passNo
;
/**
* 身高
*/
private
String
height
;
/**
* 体重
*/
private
String
weight
;
/**
* BMI
*/
private
String
bmi
;
/**
* 受雇于现职年期
*/
private
BigDecimal
currentTenure
;
/**
* 总负债额
*/
private
BigDecimal
totalDebt
;
/**
* 受供养人数目
*/
private
Integer
dependentsNum
;
/**
* 婚姻状况(字典)
*/
private
String
maritalStatus
;
/**
* 教育程度(字典)
*/
private
String
educationLevel
;
/**
* 总工作年期
*/
private
BigDecimal
totalWorkingYears
;
/**
* 现时每月收入
*/
private
BigDecimal
currentMonthlyIncome
;
/**
* 公司电话区号
*/
private
String
companyMobileCode
;
/**
* 公司电话
*/
private
String
companyMobile
;
/**
* 固定电话区号
*/
private
String
landlineCode
;
/**
* 固定电话
*/
private
String
landline
;
/**
* 其他电话
*/
private
String
otherMobile
;
/**
* 过往一年是否所属国家以外地区居住超过182日: 0-否, 1-是(字典)
*/
private
Integer
isExceed
;
/**
* 是否拥有其他国家公民身份(如美国、日本等): 0-否, 1-是(字典)
*/
private
Integer
isOtherCountry
;
/**
* 是否接受推广信息: 0-否, 1-是(字典)
*/
private
Integer
isPromotion
;
/**
* 旅行(字典)
*/
private
String
travel
;
/**
* 运动(字典)
*/
private
String
exercise
;
/**
* 游戏(字典)
*/
private
String
game
;
/**
* 电影/戏剧(字典)
*/
private
String
movieDrama
;
/**
* 美食(字典)
*/
private
String
delicacy
;
/**
* 地址列表(json串)
*/
private
String
addressList
;
/**
* 通用备注
*/
private
String
remark
;
/**
* 删除标识: 0-正常, 1-删除
*/
private
Integer
isDeleted
;
/**
* 创建人ID
*/
private
String
creatorId
;
/**
* 更新人ID
*/
private
String
updaterId
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 吸烟量(支/天)
*/
private
String
smokingVolume
;
/**
* 货币(字典)
*/
private
String
currency
;
/**
* 公司名称(英文)
*/
private
String
companyNameEn
;
/**
* 公司商业登记号码
*/
private
String
companyBusinessNo
;
/**
* 公司注册日期
*/
private
Date
companyRegisterTime
;
/**
* 公司注册地区(字典)
*/
private
String
companyRegisterRegion
;
/**
* 公司邮箱
*/
private
String
companyEmail
;
/**
* 公司登记地址
*/
private
String
companyEnterAddress
;
/**
* 授权代表姓名中文-名字
*/
private
String
authNameCn
;
/**
* 授权代表姓名英文-名字
*/
private
String
authNameEn
;
/**
* 授权代表职称
*/
private
String
authProfessional
;
/**
* 授权代表电话区号
*/
private
String
authMobileCode
;
/**
* 授权代表电话
*/
private
String
authMobile
;
@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/model/PolicyPolicyholder.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 保单投保人信息表
* @TableName policy_policyholder
*/
@TableName
(
value
=
"policy_policyholder"
)
@Data
public
class
PolicyPolicyholder
implements
Serializable
{
/**
*
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 投保人信息表唯一业务ID
*/
private
String
policyPolicyholderBizId
;
/**
* 新单跟进业务ID
*/
private
String
policyBizId
;
/**
* 保单号
*/
private
String
policyNo
;
/**
* 客户类型(字典)
*/
private
String
customerType
;
/**
* 关联客户信息表唯一业务ID(冗余字段)
*/
private
String
customerBizId
;
/**
* 关联客户编号(和客户信息表唯一业务ID是一对,唯一,冗余字段)
*/
private
String
customerNo
;
/**
* 名字
*/
private
String
name
;
/**
* 名字-英文
*/
private
String
nameEn
;
/**
* 性别(字典)
*/
private
String
gender
;
/**
* 证件类型(字典)
*/
private
String
documentType
;
/**
* 证件号码
*/
private
String
idNumber
;
/**
* 出生日期
*/
private
Date
birthday
;
/**
* 年龄
*/
private
String
age
;
/**
* 居住地址
*/
private
String
residentialAddress
;
/**
* 通讯地址
*/
private
String
mailingAddress
;
/**
* 移动电话区号
*/
private
String
mobileCode
;
/**
* 移动电话
*/
private
String
mobile
;
/**
* 邮箱
*/
private
String
email
;
/**
* 公司名称
*/
private
String
companyName
;
/**
* 公司地址
*/
private
String
companyAddress
;
/**
* 行业
*/
private
String
industry
;
/**
* 职位
*/
private
String
position
;
/**
* 风险偏好(字典)
*/
private
String
riskAppetite
;
/**
* 是否VIP: 0-否, 1-是(字典)
*/
private
Integer
isVip
;
/**
* vip备注
*/
private
String
vipRemark
;
/**
* 称谓(字典)
*/
private
String
appellation
;
/**
* 是否区分吸烟(字典)
*/
private
String
smokingAllowed
;
/**
* 出生地(省市)
*/
private
String
birthplace
;
/**
* 国籍
*/
private
String
nationality
;
/**
* 护照号码
*/
private
String
passportNo
;
/**
* 通行证号码
*/
private
String
passNo
;
/**
* 身高
*/
private
String
height
;
/**
* 体重
*/
private
String
weight
;
/**
* BMI
*/
private
String
bmi
;
/**
* 平均每月支出
*/
private
BigDecimal
monthExpenditure
;
/**
* 平均每月收入
*/
private
BigDecimal
monthIncome
;
/**
* 受雇于现职年期
*/
private
BigDecimal
currentTenure
;
/**
* 总流动资产
*/
private
BigDecimal
totalCurrentAssets
;
/**
* 总负债额
*/
private
BigDecimal
totalDebt
;
/**
* 受供养人数目
*/
private
Integer
dependentsNum
;
/**
* 婚姻状况(字典)
*/
private
String
maritalStatus
;
/**
* 教育程度(字典)
*/
private
String
educationLevel
;
/**
* 总工作年期
*/
private
BigDecimal
totalWorkingYears
;
/**
* 现时每月收入
*/
private
BigDecimal
currentMonthlyIncome
;
/**
* 公司电话区号
*/
private
String
companyMobileCode
;
/**
* 公司电话
*/
private
String
companyMobile
;
/**
* 固定电话区号
*/
private
String
landlineCode
;
/**
* 固定电话
*/
private
String
landline
;
/**
* 其他电话
*/
private
String
otherMobile
;
/**
* 过往一年是否所属国家以外地区居住超过182日: 0-否, 1-是(字典)
*/
private
Integer
isExceed
;
/**
* 是否拥有其他国家公民身份(如美国、日本等): 0-否, 1-是(字典)
*/
private
Integer
isOtherCountry
;
/**
* 是否接受推广信息: 0-否, 1-是(字典)
*/
private
Integer
isPromotion
;
/**
* 投保人邮政编码
*/
private
String
postalCode
;
/**
* 旅行(字典)
*/
private
String
travel
;
/**
* 运动(字典)
*/
private
String
exercise
;
/**
* 游戏(字典)
*/
private
String
game
;
/**
* 电影/戏剧(字典)
*/
private
String
movieDrama
;
/**
* 美食(字典)
*/
private
String
delicacy
;
/**
* 地址列表(json串)
*/
private
String
addressList
;
/**
* 吸烟量(支/天)
*/
private
String
smokingVolume
;
/**
* 货币(字典)
*/
private
String
currency
;
/**
* 公司名称(英文)
*/
private
String
companyNameEn
;
/**
* 公司商业登记号码
*/
private
String
companyBusinessNo
;
/**
* 公司注册日期
*/
private
Date
companyRegisterTime
;
/**
* 公司注册地区(字典)
*/
private
String
companyRegisterRegion
;
/**
* 公司邮箱
*/
private
String
companyEmail
;
/**
* 公司登记地址
*/
private
String
companyEnterAddress
;
/**
* 授权代表姓名中文-名字
*/
private
String
authNameCn
;
/**
* 授权代表姓名英文-名字
*/
private
String
authNameEn
;
/**
* 授权代表职称
*/
private
String
authProfessional
;
/**
* 授权代表电话区号
*/
private
String
authMobileCode
;
/**
* 授权代表电话
*/
private
String
authMobile
;
/**
* 通用备注
*/
private
String
remark
;
/**
* 删除标识: 0-正常, 1-删除
*/
private
Integer
isDeleted
;
/**
* 创建人ID
*/
private
String
creatorId
;
/**
* 更新人ID
*/
private
String
updaterId
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
@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/model/PolicySecondHolder.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 第二持有人信息表
* @TableName policy_second_holder
*/
@TableName
(
value
=
"policy_second_holder"
)
@Data
public
class
PolicySecondHolder
implements
Serializable
{
/**
*
*/
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 第二持有人信息表唯一业务ID
*/
private
String
policySecondHolderBizId
;
/**
* 新单跟进业务ID
*/
private
String
policyBizId
;
/**
* 保单号
*/
private
String
policyNo
;
/**
* 与受保人关系(字典)
*/
private
String
insurantRel
;
/**
* 名字
*/
private
String
name
;
/**
* 名字-英文
*/
private
String
nameEn
;
/**
* 性别(字典)
*/
private
String
gender
;
/**
* 证件类型(字典)
*/
private
String
documentType
;
/**
* 证件号码
*/
private
String
idNumber
;
/**
* 护照号码
*/
private
String
passportNumber
;
/**
* 出生日期
*/
private
Date
birthTime
;
/**
* 年龄
*/
private
String
age
;
/**
* 通用备注
*/
private
String
remark
;
/**
* 删除标识: 0-正常, 1-删除
*/
private
Integer
isDeleted
;
/**
* 创建人ID
*/
private
String
creatorId
;
/**
* 更新人ID
*/
private
String
updaterId
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
@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/PolicyBeneficiaryService.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
service
;
import
com.yd.csf.service.model.PolicyBeneficiary
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* @author Zhang Jianan
* @description 针对表【policy_beneficiary(受益人信息表)】的数据库操作Service
* @createDate 2025-10-31 11:43:16
*/
public
interface
PolicyBeneficiaryService
extends
IService
<
PolicyBeneficiary
>
{
}
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyFollowService.java
View file @
098fcfba
...
@@ -36,4 +36,6 @@ public interface PolicyFollowService extends IService<PolicyFollow> {
...
@@ -36,4 +36,6 @@ public interface PolicyFollowService extends IService<PolicyFollow> {
Boolean
uploadAttachment
(
AttachmentUploadRequest
attachmentUploadRequest
);
Boolean
uploadAttachment
(
AttachmentUploadRequest
attachmentUploadRequest
);
String
getNextStatus
(
PolicyFollowStatusEnum
policyFollowStatusEnum
);
String
getNextStatus
(
PolicyFollowStatusEnum
policyFollowStatusEnum
);
PolicyFollowAggregateDto
getPolicyFollowAggregate
(
String
policyBizId
);
}
}
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyInsurantService.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
service
;
import
com.yd.csf.service.model.PolicyInsurant
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* @author Zhang Jianan
* @description 针对表【policy_insurant(保单受保人信息表)】的数据库操作Service
* @createDate 2025-10-31 13:29:18
*/
public
interface
PolicyInsurantService
extends
IService
<
PolicyInsurant
>
{
}
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyPolicyholderService.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
service
;
import
com.yd.csf.service.model.PolicyPolicyholder
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* @author Zhang Jianan
* @description 针对表【policy_policyholder(保单投保人信息表)】的数据库操作Service
* @createDate 2025-10-31 11:43:10
*/
public
interface
PolicyPolicyholderService
extends
IService
<
PolicyPolicyholder
>
{
}
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicySecondHolderService.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
service
;
import
com.yd.csf.service.model.PolicySecondHolder
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* @author Zhang Jianan
* @description 针对表【policy_second_holder(第二持有人信息表)】的数据库操作Service
* @createDate 2025-10-31 13:29:23
*/
public
interface
PolicySecondHolderService
extends
IService
<
PolicySecondHolder
>
{
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyBeneficiaryServiceImpl.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yd.csf.service.model.PolicyBeneficiary
;
import
com.yd.csf.service.service.PolicyBeneficiaryService
;
import
com.yd.csf.service.dao.PolicyBeneficiaryMapper
;
import
org.springframework.stereotype.Service
;
/**
* @author Zhang Jianan
* @description 针对表【policy_beneficiary(受益人信息表)】的数据库操作Service实现
* @createDate 2025-10-31 11:43:16
*/
@Service
public
class
PolicyBeneficiaryServiceImpl
extends
ServiceImpl
<
PolicyBeneficiaryMapper
,
PolicyBeneficiary
>
implements
PolicyBeneficiaryService
{
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
View file @
098fcfba
...
@@ -17,7 +17,9 @@ import com.yd.csf.service.enums.PolicyFollowStatusEnum;
...
@@ -17,7 +17,9 @@ import com.yd.csf.service.enums.PolicyFollowStatusEnum;
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.dao.PolicyFollowMapper
;
import
com.yd.csf.service.dao.PolicyFollowMapper
;
import
com.yd.csf.service.utils.AsyncQueryUtil
;
import
com.yd.csf.service.vo.PolicyFollowVO
;
import
com.yd.csf.service.vo.PolicyFollowVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -26,6 +28,8 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -26,6 +28,8 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -34,6 +38,7 @@ import java.util.stream.Collectors;
...
@@ -34,6 +38,7 @@ import java.util.stream.Collectors;
* @createDate 2025-09-16 18:18:06
* @createDate 2025-09-16 18:18:06
*/
*/
@Service
@Service
@Slf4j
public
class
PolicyFollowServiceImpl
extends
ServiceImpl
<
PolicyFollowMapper
,
PolicyFollow
>
public
class
PolicyFollowServiceImpl
extends
ServiceImpl
<
PolicyFollowMapper
,
PolicyFollow
>
implements
PolicyFollowService
{
implements
PolicyFollowService
{
...
@@ -47,6 +52,16 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
...
@@ -47,6 +52,16 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
private
PolicyFollowRecordService
policyFollowRecordService
;
private
PolicyFollowRecordService
policyFollowRecordService
;
@Resource
@Resource
private
PolicyFollowFileService
policyFollowFileService
;
private
PolicyFollowFileService
policyFollowFileService
;
@Resource
private
AsyncQueryUtil
asyncQueryUtil
;
@Resource
private
PolicyPolicyholderService
policyPolicyholderService
;
@Resource
private
PolicyInsurantService
policyInsurantService
;
@Resource
private
PolicyBeneficiaryService
policyBeneficiaryService
;
@Resource
private
PolicySecondHolderService
policySecondHolderService
;
@Override
@Override
...
@@ -328,6 +343,85 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
...
@@ -328,6 +343,85 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
}
}
}
}
/**
* 异步聚合查询新单跟进详情
*/
@Override
public
PolicyFollowAggregateDto
getPolicyFollowAggregate
(
String
policyBizId
)
{
long
startTime
=
System
.
currentTimeMillis
();
try
{
// 1. 异步查询保单信息
CompletableFuture
<
Policy
>
policyFuture
=
asyncQueryUtil
.
asyncQuery
(
()
->
policyService
.
getOne
(
new
QueryWrapper
<
Policy
>().
eq
(
"policy_biz_id"
,
policyBizId
)),
"查询保单信息"
);
// 2. 异步查询保单投保人
CompletableFuture
<
List
<
PolicyPolicyholder
>>
policyholderListFuture
=
asyncQueryUtil
.
asyncQuery
(
()
->
{
QueryWrapper
<
PolicyPolicyholder
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"policy_biz_id"
,
policyBizId
);
return
policyPolicyholderService
.
list
(
queryWrapper
);
},
"查询保单投保人"
);
// 3. 异步查询保单受保人
CompletableFuture
<
List
<
PolicyInsurant
>>
insurantListFuture
=
asyncQueryUtil
.
asyncQuery
(
()
->
{
QueryWrapper
<
PolicyInsurant
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"policy_biz_id"
,
policyBizId
);
return
policyInsurantService
.
list
(
queryWrapper
);
},
"查询保单受保人"
);
// 4. 异步查询保单受益人
CompletableFuture
<
List
<
PolicyBeneficiary
>>
beneficiaryListFuture
=
asyncQueryUtil
.
asyncQuery
(
()
->
{
QueryWrapper
<
PolicyBeneficiary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"policy_biz_id"
,
policyBizId
);
return
policyBeneficiaryService
.
list
(
queryWrapper
);
},
"查询保单受益人"
);
// 5. 异步查询保单第二持有人
CompletableFuture
<
List
<
PolicySecondHolder
>>
secondPolicyholderListFuture
=
asyncQueryUtil
.
asyncQuery
(
()
->
{
QueryWrapper
<
PolicySecondHolder
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"policy_biz_id"
,
policyBizId
);
return
policySecondHolderService
.
list
(
queryWrapper
);
},
"查询保单第二持有人"
);
// 5. 等待所有异步任务完成(设置超时时间)
CompletableFuture
.
allOf
(
policyFuture
,
policyholderListFuture
,
insurantListFuture
,
beneficiaryListFuture
,
secondPolicyholderListFuture
)
.
get
(
5
,
TimeUnit
.
SECONDS
);
// 5秒超时
// 6. 构建聚合结果
PolicyFollowAggregateDto
aggregateDto
=
new
PolicyFollowAggregateDto
();
aggregateDto
.
setPolicy
(
policyFuture
.
get
());
aggregateDto
.
setPolicyPolicyholderList
(
policyholderListFuture
.
get
());
aggregateDto
.
setPolicyInsurantList
(
insurantListFuture
.
get
());
aggregateDto
.
setPolicyBeneficiaryList
(
beneficiaryListFuture
.
get
());
aggregateDto
.
setPolicySecondHolderList
(
secondPolicyholderListFuture
.
get
());
long
costTime
=
System
.
currentTimeMillis
()
-
startTime
;
log
.
info
(
"新单跟进聚合查询完成, policyBizId: {}, 总耗时: {}ms"
,
policyBizId
,
costTime
);
return
aggregateDto
;
}
catch
(
Exception
e
)
{
log
.
error
(
"新单跟进聚合查询失败, policyBizId: {}, 错误: {}"
,
policyBizId
,
e
.
getMessage
(),
e
);
PolicyFollowAggregateDto
errorDto
=
new
PolicyFollowAggregateDto
();
errorDto
.
setErrorMessage
(
"查询失败: "
+
e
.
getMessage
());
return
errorDto
;
}
}
@Override
@Override
public
Boolean
uploadAttachment
(
AttachmentUploadRequest
attachmentUploadRequest
)
{
public
Boolean
uploadAttachment
(
AttachmentUploadRequest
attachmentUploadRequest
)
{
String
policyBizId
=
attachmentUploadRequest
.
getPolicyBizId
();
String
policyBizId
=
attachmentUploadRequest
.
getPolicyBizId
();
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyInsurantServiceImpl.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yd.csf.service.model.PolicyInsurant
;
import
com.yd.csf.service.service.PolicyInsurantService
;
import
com.yd.csf.service.dao.PolicyInsurantMapper
;
import
org.springframework.stereotype.Service
;
/**
* @author Zhang Jianan
* @description 针对表【policy_insurant(保单受保人信息表)】的数据库操作Service实现
* @createDate 2025-10-31 13:29:18
*/
@Service
public
class
PolicyInsurantServiceImpl
extends
ServiceImpl
<
PolicyInsurantMapper
,
PolicyInsurant
>
implements
PolicyInsurantService
{
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyPolicyholderServiceImpl.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yd.csf.service.model.PolicyPolicyholder
;
import
com.yd.csf.service.service.PolicyPolicyholderService
;
import
com.yd.csf.service.dao.PolicyPolicyholderMapper
;
import
org.springframework.stereotype.Service
;
/**
* @author Zhang Jianan
* @description 针对表【policy_policyholder(保单投保人信息表)】的数据库操作Service实现
* @createDate 2025-10-31 11:43:10
*/
@Service
public
class
PolicyPolicyholderServiceImpl
extends
ServiceImpl
<
PolicyPolicyholderMapper
,
PolicyPolicyholder
>
implements
PolicyPolicyholderService
{
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicySecondHolderServiceImpl.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yd.csf.service.model.PolicySecondHolder
;
import
com.yd.csf.service.service.PolicySecondHolderService
;
import
com.yd.csf.service.dao.PolicySecondHolderMapper
;
import
org.springframework.stereotype.Service
;
/**
* @author Zhang Jianan
* @description 针对表【policy_second_holder(第二持有人信息表)】的数据库操作Service实现
* @createDate 2025-10-31 13:29:23
*/
@Service
public
class
PolicySecondHolderServiceImpl
extends
ServiceImpl
<
PolicySecondHolderMapper
,
PolicySecondHolder
>
implements
PolicySecondHolderService
{
}
yd-csf-service/src/main/java/com/yd/csf/service/utils/AsyncQueryUtil.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
utils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.TimeUnit
;
import
java.util.function.Supplier
;
import
java.util.stream.Collectors
;
/**
* 异步聚合查询工具类
* 专门用于接口中聚合查询多个数据实体的场景
*/
@Slf4j
@Component
public
class
AsyncQueryUtil
{
/**
* 异步执行单个查询任务
*
* @param supplier 查询任务
* @param taskName 任务名称(用于日志)
* @return CompletableFuture
*/
@Async
(
"asyncQueryExecutor"
)
public
<
T
>
CompletableFuture
<
T
>
asyncQuery
(
Supplier
<
T
>
supplier
,
String
taskName
)
{
long
startTime
=
System
.
currentTimeMillis
();
try
{
log
.
info
(
"开始异步查询任务: {}"
,
taskName
);
T
result
=
supplier
.
get
();
long
costTime
=
System
.
currentTimeMillis
()
-
startTime
;
log
.
info
(
"异步查询任务完成: {}, 耗时: {}ms"
,
taskName
,
costTime
);
return
CompletableFuture
.
completedFuture
(
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"异步查询任务失败: {}, 错误: {}"
,
taskName
,
e
.
getMessage
(),
e
);
// 使用兼容性工具类替代CompletableFuture.failedFuture()
return
CompletableFutureUtil
.
failedFuture
(
e
);
}
}
/**
* 批量异步查询,等待所有任务完成
*
* @param tasks 查询任务列表
* @return 所有查询结果的CompletableFuture
*/
public
<
T
>
CompletableFuture
<
List
<
T
>>
batchAsyncQuery
(
List
<
CompletableFuture
<
T
>>
tasks
)
{
return
CompletableFutureUtil
.
allOf
(
tasks
.
toArray
(
new
CompletableFuture
[
0
]))
.
thenApply
(
v
->
tasks
.
stream
()
.
map
(
CompletableFutureUtil:
:
safeJoin
)
// 使用安全的join方法
.
collect
(
Collectors
.
toList
()));
}
/**
* 异步查询并设置超时时间
*
* @param supplier 查询任务
* @param taskName 任务名称
* @param timeoutMs 超时时间(毫秒)
* @return CompletableFuture
*/
@Async
(
"asyncQueryExecutor"
)
public
<
T
>
CompletableFuture
<
T
>
asyncQueryWithTimeout
(
Supplier
<
T
>
supplier
,
String
taskName
,
long
timeoutMs
)
{
// 使用兼容性工具类的超时方法
return
CompletableFutureUtil
.
supplyAsyncWithTimeout
(
supplier
,
timeoutMs
,
TimeUnit
.
MILLISECONDS
)
.
whenComplete
((
result
,
throwable
)
->
{
if
(
throwable
!=
null
)
{
log
.
error
(
"异步查询任务超时或失败: {}, 错误: {}"
,
taskName
,
throwable
.
getMessage
());
}
else
{
log
.
info
(
"异步查询任务完成: {}"
,
taskName
);
}
});
}
/**
* 增强的异步查询方法,支持自定义异常处理
*/
@Async
(
"asyncQueryExecutor"
)
public
<
T
>
CompletableFuture
<
T
>
enhancedAsyncQuery
(
Supplier
<
T
>
supplier
,
String
taskName
,
java
.
util
.
function
.
Function
<
Exception
,
T
>
exceptionHandler
)
{
long
startTime
=
System
.
currentTimeMillis
();
try
{
log
.
info
(
"开始增强异步查询任务: {}"
,
taskName
);
T
result
=
supplier
.
get
();
long
costTime
=
System
.
currentTimeMillis
()
-
startTime
;
log
.
info
(
"增强异步查询任务完成: {}, 耗时: {}ms"
,
taskName
,
costTime
);
return
CompletableFuture
.
completedFuture
(
result
);
}
catch
(
Exception
e
)
{
log
.
error
(
"增强异步查询任务失败: {}, 错误: {}"
,
taskName
,
e
.
getMessage
(),
e
);
try
{
// 使用自定义异常处理器
T
fallbackResult
=
exceptionHandler
.
apply
(
e
);
return
CompletableFuture
.
completedFuture
(
fallbackResult
);
}
catch
(
Exception
handlerException
)
{
log
.
error
(
"异常处理器执行失败: {}, 错误: {}"
,
taskName
,
handlerException
.
getMessage
(),
handlerException
);
return
CompletableFutureUtil
.
failedFuture
(
handlerException
);
}
}
}
/**
* 并行执行多个查询任务,返回第一个成功的结果
*/
@SafeVarargs
public
final
<
T
>
CompletableFuture
<
T
>
firstSuccessAsyncQuery
(
String
taskName
,
Supplier
<
T
>...
suppliers
)
{
@SuppressWarnings
(
"unchecked"
)
CompletableFuture
<
T
>[]
futures
=
new
CompletableFuture
[
suppliers
.
length
];
for
(
int
i
=
0
;
i
<
suppliers
.
length
;
i
++)
{
final
int
index
=
i
;
futures
[
i
]
=
asyncQuery
(
suppliers
[
i
],
taskName
+
"-"
+
(
i
+
1
))
.
exceptionally
(
e
->
{
log
.
warn
(
"查询任务 {} 失败: {}"
,
taskName
+
"-"
+
(
index
+
1
),
e
.
getMessage
());
return
null
;
// 返回null表示失败,让其他任务继续
});
}
return
CompletableFutureUtil
.
anyOf
(
futures
)
.
thenApply
(
result
->
{
if
(
result
==
null
)
{
throw
new
RuntimeException
(
"所有查询任务都失败了: "
+
taskName
);
}
return
result
;
});
}
/**
* 重试机制的异步查询
*/
@Async
(
"asyncQueryExecutor"
)
public
<
T
>
CompletableFuture
<
T
>
retryAsyncQuery
(
Supplier
<
T
>
supplier
,
String
taskName
,
int
maxRetries
,
long
retryDelayMs
)
{
return
retryAsyncQueryInternal
(
supplier
,
taskName
,
maxRetries
,
retryDelayMs
,
0
);
}
private
<
T
>
CompletableFuture
<
T
>
retryAsyncQueryInternal
(
Supplier
<
T
>
supplier
,
String
taskName
,
int
maxRetries
,
long
retryDelayMs
,
int
currentRetry
)
{
long
startTime
=
System
.
currentTimeMillis
();
try
{
log
.
info
(
"开始重试异步查询任务: {}, 重试次数: {}/{}"
,
taskName
,
currentRetry
,
maxRetries
);
T
result
=
supplier
.
get
();
long
costTime
=
System
.
currentTimeMillis
()
-
startTime
;
log
.
info
(
"重试异步查询任务完成: {}, 重试次数: {}, 耗时: {}ms"
,
taskName
,
currentRetry
,
costTime
);
return
CompletableFuture
.
completedFuture
(
result
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"重试异步查询任务失败: {}, 重试次数: {}, 错误: {}"
,
taskName
,
currentRetry
,
e
.
getMessage
());
if
(
currentRetry
<
maxRetries
)
{
// 延迟重试 - 使用thenCompose展平嵌套的CompletableFuture
return
CompletableFutureUtil
.
delayedFuture
(
retryDelayMs
,
TimeUnit
.
MILLISECONDS
,
()
->
null
)
.
thenCompose
(
ignored
->
retryAsyncQueryInternal
(
supplier
,
taskName
,
maxRetries
,
retryDelayMs
,
currentRetry
+
1
));
}
else
{
log
.
error
(
"重试异步查询任务最终失败: {}, 最大重试次数: {}"
,
taskName
,
maxRetries
);
return
CompletableFutureUtil
.
failedFuture
(
e
);
}
}
}
}
\ No newline at end of file
yd-csf-service/src/main/java/com/yd/csf/service/utils/CompletableFutureUtil.java
0 → 100644
View file @
098fcfba
package
com
.
yd
.
csf
.
service
.
utils
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.CompletionException
;
import
java.util.function.Supplier
;
/**
* CompletableFuture兼容性工具类
* 提供Java 8兼容的CompletableFuture方法
*/
public
class
CompletableFutureUtil
{
/**
* Java 8兼容的failedFuture方法
* 替代Java 9+的CompletableFuture.failedFuture()
*/
public
static
<
T
>
CompletableFuture
<
T
>
failedFuture
(
Throwable
ex
)
{
CompletableFuture
<
T
>
future
=
new
CompletableFuture
<>();
future
.
completeExceptionally
(
ex
);
return
future
;
}
/**
* 创建已完成的异常Future(别名方法)
*/
public
static
<
T
>
CompletableFuture
<
T
>
completedExceptionally
(
Throwable
ex
)
{
return
failedFuture
(
ex
);
}
/**
* 安全的join方法,避免CompletionException包装
* 直接抛出原始异常
*/
public
static
<
T
>
T
safeJoin
(
CompletableFuture
<
T
>
future
)
{
try
{
return
future
.
join
();
}
catch
(
CompletionException
e
)
{
Throwable
cause
=
e
.
getCause
();
if
(
cause
instanceof
RuntimeException
)
{
throw
(
RuntimeException
)
cause
;
}
else
if
(
cause
instanceof
Error
)
{
throw
(
Error
)
cause
;
}
else
{
throw
new
RuntimeException
(
cause
);
}
}
}
/**
* 带超时的supplyAsync方法(Java 8兼容)
*/
public
static
<
T
>
CompletableFuture
<
T
>
supplyAsyncWithTimeout
(
Supplier
<
T
>
supplier
,
long
timeout
,
java
.
util
.
concurrent
.
TimeUnit
unit
)
{
CompletableFuture
<
T
>
future
=
CompletableFuture
.
supplyAsync
(
supplier
);
// 使用定时器模拟超时
java
.
util
.
Timer
timeoutTimer
=
new
java
.
util
.
Timer
();
timeoutTimer
.
schedule
(
new
java
.
util
.
TimerTask
()
{
@Override
public
void
run
()
{
if
(!
future
.
isDone
())
{
future
.
completeExceptionally
(
new
java
.
util
.
concurrent
.
TimeoutException
(
"Operation timed out after "
+
timeout
+
" "
+
unit
.
name
().
toLowerCase
()));
}
}
},
unit
.
toMillis
(
timeout
));
return
future
.
whenComplete
((
result
,
throwable
)
->
timeoutTimer
.
cancel
());
}
/**
* 批量等待所有Future完成
*/
@SafeVarargs
public
static
CompletableFuture
<
Void
>
allOf
(
CompletableFuture
<?>...
futures
)
{
return
CompletableFuture
.
allOf
(
futures
);
}
/**
* 批量等待任意Future完成
*/
@SafeVarargs
public
static
<
T
>
CompletableFuture
<
T
>
anyOf
(
CompletableFuture
<
T
>...
futures
)
{
return
CompletableFuture
.
anyOf
(
futures
).
thenApply
(
obj
->
(
T
)
obj
);
}
/**
* 延迟执行的CompletableFuture
*/
public
static
<
T
>
CompletableFuture
<
T
>
delayedFuture
(
long
delay
,
java
.
util
.
concurrent
.
TimeUnit
unit
,
Supplier
<
T
>
supplier
)
{
CompletableFuture
<
T
>
future
=
new
CompletableFuture
<>();
java
.
util
.
Timer
timer
=
new
java
.
util
.
Timer
();
timer
.
schedule
(
new
java
.
util
.
TimerTask
()
{
@Override
public
void
run
()
{
try
{
T
result
=
supplier
.
get
();
future
.
complete
(
result
);
}
catch
(
Exception
e
)
{
future
.
completeExceptionally
(
e
);
}
finally
{
timer
.
cancel
();
}
}
},
unit
.
toMillis
(
delay
));
return
future
;
}
}
\ No newline at end of file
yd-csf-service/src/main/resources/mappers/PolicyBeneficiaryMapper.xml
0 → 100644
View file @
098fcfba
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yd.csf.service.dao.PolicyBeneficiaryMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.csf.service.model.PolicyBeneficiary"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"policyBeneficiaryBizId"
column=
"policy_beneficiary_biz_id"
/>
<result
property=
"policyBizId"
column=
"policy_biz_id"
/>
<result
property=
"policyNo"
column=
"policy_no"
/>
<result
property=
"customerType"
column=
"customer_type"
/>
<result
property=
"insurantRel"
column=
"insurant_rel"
/>
<result
property=
"benefitRatio"
column=
"benefit_ratio"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"nameEn"
column=
"name_en"
/>
<result
property=
"gender"
column=
"gender"
/>
<result
property=
"documentType"
column=
"document_type"
/>
<result
property=
"idNumber"
column=
"id_number"
/>
<result
property=
"passportNumber"
column=
"passport_number"
/>
<result
property=
"birthTime"
column=
"birth_time"
/>
<result
property=
"companyName"
column=
"company_name"
/>
<result
property=
"companyNameEn"
column=
"company_name_en"
/>
<result
property=
"companyBusinessNo"
column=
"company_business_no"
/>
<result
property=
"companyRegisterTime"
column=
"company_register_time"
/>
<result
property=
"companyRegisterRegion"
column=
"company_register_region"
/>
<result
property=
"companyMobileCode"
column=
"company_mobile_code"
/>
<result
property=
"companyMobile"
column=
"company_mobile"
/>
<result
property=
"companyEmail"
column=
"company_email"
/>
<result
property=
"companyEnterAddress"
column=
"company_enter_address"
/>
<result
property=
"mailingAddress"
column=
"mailing_address"
/>
<result
property=
"authNameCn"
column=
"auth_name_cn"
/>
<result
property=
"authNameEn"
column=
"auth_name_en"
/>
<result
property=
"authProfessional"
column=
"auth_professional"
/>
<result
property=
"authMobileCode"
column=
"auth_mobile_code"
/>
<result
property=
"authMobile"
column=
"auth_mobile"
/>
<result
property=
"addressList"
column=
"address_list"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"isDeleted"
column=
"is_deleted"
/>
<result
property=
"creatorId"
column=
"creator_id"
/>
<result
property=
"updaterId"
column=
"updater_id"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,policy_beneficiary_biz_id,policy_biz_id,policy_no,customer_type,insurant_rel,
benefit_ratio,name,name_en,gender,document_type,
id_number,passport_number,birth_time,company_name,company_name_en,
company_business_no,company_register_time,company_register_region,company_mobile_code,company_mobile,
company_email,company_enter_address,mailing_address,auth_name_cn,auth_name_en,
auth_professional,auth_mobile_code,auth_mobile,address_list,remark,
is_deleted,creator_id,updater_id,create_time,update_time
</sql>
</mapper>
yd-csf-service/src/main/resources/mappers/PolicyInsurantMapper.xml
0 → 100644
View file @
098fcfba
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yd.csf.service.dao.PolicyInsurantMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.csf.service.model.PolicyInsurant"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"policyInsurantBizId"
column=
"policy_insurant_biz_id"
/>
<result
property=
"policyBizId"
column=
"policy_biz_id"
/>
<result
property=
"policyNo"
column=
"policy_no"
/>
<result
property=
"customerType"
column=
"customer_type"
/>
<result
property=
"customerBizId"
column=
"customer_biz_id"
/>
<result
property=
"customerNo"
column=
"customer_no"
/>
<result
property=
"policyholderRel"
column=
"policyholder_rel"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"nameEn"
column=
"name_en"
/>
<result
property=
"gender"
column=
"gender"
/>
<result
property=
"documentType"
column=
"document_type"
/>
<result
property=
"idNumber"
column=
"id_number"
/>
<result
property=
"birthday"
column=
"birthday"
/>
<result
property=
"age"
column=
"age"
/>
<result
property=
"residentialAddress"
column=
"residential_address"
/>
<result
property=
"mailingAddress"
column=
"mailing_address"
/>
<result
property=
"mobileCode"
column=
"mobile_code"
/>
<result
property=
"mobile"
column=
"mobile"
/>
<result
property=
"email"
column=
"email"
/>
<result
property=
"companyName"
column=
"company_name"
/>
<result
property=
"companyAddress"
column=
"company_address"
/>
<result
property=
"industry"
column=
"industry"
/>
<result
property=
"position"
column=
"position"
/>
<result
property=
"riskAppetite"
column=
"risk_appetite"
/>
<result
property=
"isVip"
column=
"is_vip"
/>
<result
property=
"vipRemark"
column=
"vip_remark"
/>
<result
property=
"appellation"
column=
"appellation"
/>
<result
property=
"smokingAllowed"
column=
"smoking_allowed"
/>
<result
property=
"birthplace"
column=
"birthplace"
/>
<result
property=
"nationality"
column=
"nationality"
/>
<result
property=
"passportNo"
column=
"passport_no"
/>
<result
property=
"passNo"
column=
"pass_no"
/>
<result
property=
"height"
column=
"height"
/>
<result
property=
"weight"
column=
"weight"
/>
<result
property=
"bmi"
column=
"bmi"
/>
<result
property=
"currentTenure"
column=
"current_tenure"
/>
<result
property=
"totalDebt"
column=
"total_debt"
/>
<result
property=
"dependentsNum"
column=
"dependents_num"
/>
<result
property=
"maritalStatus"
column=
"marital_status"
/>
<result
property=
"educationLevel"
column=
"education_level"
/>
<result
property=
"totalWorkingYears"
column=
"total_working_years"
/>
<result
property=
"currentMonthlyIncome"
column=
"current_monthly_income"
/>
<result
property=
"companyMobileCode"
column=
"company_mobile_code"
/>
<result
property=
"companyMobile"
column=
"company_mobile"
/>
<result
property=
"landlineCode"
column=
"landline_code"
/>
<result
property=
"landline"
column=
"landline"
/>
<result
property=
"otherMobile"
column=
"other_mobile"
/>
<result
property=
"isExceed"
column=
"is_exceed"
/>
<result
property=
"isOtherCountry"
column=
"is_other_country"
/>
<result
property=
"isPromotion"
column=
"is_promotion"
/>
<result
property=
"travel"
column=
"travel"
/>
<result
property=
"exercise"
column=
"exercise"
/>
<result
property=
"game"
column=
"game"
/>
<result
property=
"movieDrama"
column=
"movie_drama"
/>
<result
property=
"delicacy"
column=
"delicacy"
/>
<result
property=
"addressList"
column=
"address_list"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"isDeleted"
column=
"is_deleted"
/>
<result
property=
"creatorId"
column=
"creator_id"
/>
<result
property=
"updaterId"
column=
"updater_id"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"smokingVolume"
column=
"smoking_volume"
/>
<result
property=
"currency"
column=
"currency"
/>
<result
property=
"companyNameEn"
column=
"company_name_en"
/>
<result
property=
"companyBusinessNo"
column=
"company_business_no"
/>
<result
property=
"companyRegisterTime"
column=
"company_register_time"
/>
<result
property=
"companyRegisterRegion"
column=
"company_register_region"
/>
<result
property=
"companyEmail"
column=
"company_email"
/>
<result
property=
"companyEnterAddress"
column=
"company_enter_address"
/>
<result
property=
"authNameCn"
column=
"auth_name_cn"
/>
<result
property=
"authNameEn"
column=
"auth_name_en"
/>
<result
property=
"authProfessional"
column=
"auth_professional"
/>
<result
property=
"authMobileCode"
column=
"auth_mobile_code"
/>
<result
property=
"authMobile"
column=
"auth_mobile"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,policy_insurant_biz_id,policy_biz_id,policy_no,customer_type,customer_biz_id,
customer_no,policyholder_rel,name,name_en,gender,
document_type,id_number,birthday,age,residential_address,
mailing_address,mobile_code,mobile,email,company_name,
company_address,industry,position,risk_appetite,is_vip,
vip_remark,appellation,smoking_allowed,birthplace,nationality,
passport_no,pass_no,height,weight,bmi,
current_tenure,total_debt,dependents_num,marital_status,education_level,
total_working_years,current_monthly_income,company_mobile_code,company_mobile,landline_code,
landline,other_mobile,is_exceed,is_other_country,is_promotion,
travel,exercise,game,movie_drama,delicacy,
address_list,remark,is_deleted,creator_id,updater_id,
create_time,update_time,smoking_volume,currency,company_name_en,
company_business_no,company_register_time,company_register_region,company_email,company_enter_address,
auth_name_cn,auth_name_en,auth_professional,auth_mobile_code,auth_mobile
</sql>
</mapper>
yd-csf-service/src/main/resources/mappers/PolicyMapper.xml
View file @
098fcfba
...
@@ -9,14 +9,17 @@
...
@@ -9,14 +9,17 @@
<result
property=
"policyBizId"
column=
"policy_biz_id"
/>
<result
property=
"policyBizId"
column=
"policy_biz_id"
/>
<result
property=
"policyNo"
column=
"policy_no"
/>
<result
property=
"policyNo"
column=
"policy_no"
/>
<result
property=
"userBizId"
column=
"user_biz_id"
/>
<result
property=
"userBizId"
column=
"user_biz_id"
/>
<result
property=
"planBizId"
column=
"plan_biz_id"
/>
<result
property=
"productCode"
column=
"product_code"
/>
<result
property=
"productCode"
column=
"product_code"
/>
<result
property=
"productName"
column=
"product_name"
/>
<result
property=
"productName"
column=
"product_name"
/>
<result
property=
"productCate"
column=
"product_cate"
/>
<result
property=
"productCate"
column=
"product_cate"
/>
<result
property=
"insurer"
column=
"insurer"
/>
<result
property=
"insurer"
column=
"insurer"
/>
<result
property=
"insurerBizId"
column=
"insurer_biz_id"
/>
<result
property=
"insurerBizId"
column=
"insurer_biz_id"
/>
<result
property=
"region"
column=
"region"
/>
<result
property=
"policyHolder"
column=
"policy_holder"
/>
<result
property=
"policyHolder"
column=
"policy_holder"
/>
<result
property=
"insured"
column=
"insured"
/>
<result
property=
"insured"
column=
"insured"
/>
<result
property=
"paymentTerm"
column=
"payment_term"
/>
<result
property=
"paymentTerm"
column=
"payment_term"
/>
<result
property=
"paymentFrequency"
column=
"payment_frequency"
/>
<result
property=
"paymentPremium"
column=
"payment_premium"
/>
<result
property=
"paymentPremium"
column=
"payment_premium"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"currency"
column=
"currency"
/>
<result
property=
"currency"
column=
"currency"
/>
...
@@ -26,7 +29,13 @@
...
@@ -26,7 +29,13 @@
<result
property=
"effectiveDate"
column=
"effective_date"
/>
<result
property=
"effectiveDate"
column=
"effective_date"
/>
<result
property=
"renewalDate"
column=
"renewal_date"
/>
<result
property=
"renewalDate"
column=
"renewal_date"
/>
<result
property=
"isPrepaid"
column=
"is_prepaid"
/>
<result
property=
"isPrepaid"
column=
"is_prepaid"
/>
<result
property=
"deductibles"
column=
"deductibles"
/>
<result
property=
"prepaidTerm"
column=
"prepaid_term"
/>
<result
property=
"prepaidTerm"
column=
"prepaid_term"
/>
<result
property=
"initialPaymentMethod"
column=
"initial_payment_method"
/>
<result
property=
"renewalPaymentMethod"
column=
"renewal_payment_method"
/>
<result
property=
"dividendDistributionMethod"
column=
"dividend_distribution_method"
/>
<result
property=
"isBacktrack"
column=
"is_backtrack"
/>
<result
property=
"isJoin"
column=
"is_join"
/>
<result
property=
"reconciliationCompany"
column=
"reconciliation_company"
/>
<result
property=
"reconciliationCompany"
column=
"reconciliation_company"
/>
<result
property=
"reconciliationCompanyBizId"
column=
"reconciliation_company_biz_id"
/>
<result
property=
"reconciliationCompanyBizId"
column=
"reconciliation_company_biz_id"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"remark"
column=
"remark"
/>
...
@@ -38,11 +47,13 @@
...
@@ -38,11 +47,13 @@
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id,policy_biz_id,policy_no,user_biz_id,product_code,product_name,
id,policy_biz_id,policy_no,user_biz_id,plan_biz_id,product_code,
product_cate,insurer,insurer_biz_id,policy_holder,insured,
product_name,product_cate,insurer,insurer_biz_id,region,
payment_term,payment_premium,status,currency,initial_premium,
policy_holder,insured,payment_term,payment_frequency,payment_premium,
sign_date,issue_date,effective_date,renewal_date,is_prepaid,
status,currency,initial_premium,sign_date,issue_date,
prepaid_term,reconciliation_company,reconciliation_company_biz_id,remark,is_deleted,
effective_date,renewal_date,is_prepaid,deductibles,prepaid_term,
creator_id,updater_id,create_time,update_time
initial_payment_method,renewal_payment_method,dividend_distribution_method,is_backtrack,is_join,
reconciliation_company,reconciliation_company_biz_id,remark,is_deleted,creator_id,
updater_id,create_time,update_time
</sql>
</sql>
</mapper>
</mapper>
yd-csf-service/src/main/resources/mappers/PolicyPolicyholderMapper.xml
0 → 100644
View file @
098fcfba
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yd.csf.service.dao.PolicyPolicyholderMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.csf.service.model.PolicyPolicyholder"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"policyPolicyholderBizId"
column=
"policy_policyholder_biz_id"
/>
<result
property=
"policyBizId"
column=
"policy_biz_id"
/>
<result
property=
"policyNo"
column=
"policy_no"
/>
<result
property=
"customerType"
column=
"customer_type"
/>
<result
property=
"customerBizId"
column=
"customer_biz_id"
/>
<result
property=
"customerNo"
column=
"customer_no"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"nameEn"
column=
"name_en"
/>
<result
property=
"gender"
column=
"gender"
/>
<result
property=
"documentType"
column=
"document_type"
/>
<result
property=
"idNumber"
column=
"id_number"
/>
<result
property=
"birthday"
column=
"birthday"
/>
<result
property=
"age"
column=
"age"
/>
<result
property=
"residentialAddress"
column=
"residential_address"
/>
<result
property=
"mailingAddress"
column=
"mailing_address"
/>
<result
property=
"mobileCode"
column=
"mobile_code"
/>
<result
property=
"mobile"
column=
"mobile"
/>
<result
property=
"email"
column=
"email"
/>
<result
property=
"companyName"
column=
"company_name"
/>
<result
property=
"companyAddress"
column=
"company_address"
/>
<result
property=
"industry"
column=
"industry"
/>
<result
property=
"position"
column=
"position"
/>
<result
property=
"riskAppetite"
column=
"risk_appetite"
/>
<result
property=
"isVip"
column=
"is_vip"
/>
<result
property=
"vipRemark"
column=
"vip_remark"
/>
<result
property=
"appellation"
column=
"appellation"
/>
<result
property=
"smokingAllowed"
column=
"smoking_allowed"
/>
<result
property=
"birthplace"
column=
"birthplace"
/>
<result
property=
"nationality"
column=
"nationality"
/>
<result
property=
"passportNo"
column=
"passport_no"
/>
<result
property=
"passNo"
column=
"pass_no"
/>
<result
property=
"height"
column=
"height"
/>
<result
property=
"weight"
column=
"weight"
/>
<result
property=
"bmi"
column=
"bmi"
/>
<result
property=
"monthExpenditure"
column=
"month_expenditure"
/>
<result
property=
"monthIncome"
column=
"month_income"
/>
<result
property=
"currentTenure"
column=
"current_tenure"
/>
<result
property=
"totalCurrentAssets"
column=
"total_current_assets"
/>
<result
property=
"totalDebt"
column=
"total_debt"
/>
<result
property=
"dependentsNum"
column=
"dependents_num"
/>
<result
property=
"maritalStatus"
column=
"marital_status"
/>
<result
property=
"educationLevel"
column=
"education_level"
/>
<result
property=
"totalWorkingYears"
column=
"total_working_years"
/>
<result
property=
"currentMonthlyIncome"
column=
"current_monthly_income"
/>
<result
property=
"companyMobileCode"
column=
"company_mobile_code"
/>
<result
property=
"companyMobile"
column=
"company_mobile"
/>
<result
property=
"landlineCode"
column=
"landline_code"
/>
<result
property=
"landline"
column=
"landline"
/>
<result
property=
"otherMobile"
column=
"other_mobile"
/>
<result
property=
"isExceed"
column=
"is_exceed"
/>
<result
property=
"isOtherCountry"
column=
"is_other_country"
/>
<result
property=
"isPromotion"
column=
"is_promotion"
/>
<result
property=
"postalCode"
column=
"postal_code"
/>
<result
property=
"travel"
column=
"travel"
/>
<result
property=
"exercise"
column=
"exercise"
/>
<result
property=
"game"
column=
"game"
/>
<result
property=
"movieDrama"
column=
"movie_drama"
/>
<result
property=
"delicacy"
column=
"delicacy"
/>
<result
property=
"addressList"
column=
"address_list"
/>
<result
property=
"smokingVolume"
column=
"smoking_volume"
/>
<result
property=
"currency"
column=
"currency"
/>
<result
property=
"companyNameEn"
column=
"company_name_en"
/>
<result
property=
"companyBusinessNo"
column=
"company_business_no"
/>
<result
property=
"companyRegisterTime"
column=
"company_register_time"
/>
<result
property=
"companyRegisterRegion"
column=
"company_register_region"
/>
<result
property=
"companyEmail"
column=
"company_email"
/>
<result
property=
"companyEnterAddress"
column=
"company_enter_address"
/>
<result
property=
"authNameCn"
column=
"auth_name_cn"
/>
<result
property=
"authNameEn"
column=
"auth_name_en"
/>
<result
property=
"authProfessional"
column=
"auth_professional"
/>
<result
property=
"authMobileCode"
column=
"auth_mobile_code"
/>
<result
property=
"authMobile"
column=
"auth_mobile"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"isDeleted"
column=
"is_deleted"
/>
<result
property=
"creatorId"
column=
"creator_id"
/>
<result
property=
"updaterId"
column=
"updater_id"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,policy_policyholder_biz_id,policy_biz_id,policy_no,customer_type,customer_biz_id,
customer_no,name,name_en,gender,document_type,
id_number,birthday,age,residential_address,mailing_address,
mobile_code,mobile,email,company_name,company_address,
industry,position,risk_appetite,is_vip,vip_remark,
appellation,smoking_allowed,birthplace,nationality,passport_no,
pass_no,height,weight,bmi,month_expenditure,
month_income,current_tenure,total_current_assets,total_debt,dependents_num,
marital_status,education_level,total_working_years,current_monthly_income,company_mobile_code,
company_mobile,landline_code,landline,other_mobile,is_exceed,
is_other_country,is_promotion,postal_code,travel,exercise,
game,movie_drama,delicacy,address_list,smoking_volume,
currency,company_name_en,company_business_no,company_register_time,company_register_region,
company_email,company_enter_address,auth_name_cn,auth_name_en,auth_professional,
auth_mobile_code,auth_mobile,remark,is_deleted,creator_id,
updater_id,create_time,update_time
</sql>
</mapper>
yd-csf-service/src/main/resources/mappers/PolicySecondHolderMapper.xml
0 → 100644
View file @
098fcfba
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yd.csf.service.dao.PolicySecondHolderMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.csf.service.model.PolicySecondHolder"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"policySecondHolderBizId"
column=
"policy_second_holder_biz_id"
/>
<result
property=
"policyBizId"
column=
"policy_biz_id"
/>
<result
property=
"policyNo"
column=
"policy_no"
/>
<result
property=
"insurantRel"
column=
"insurant_rel"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"nameEn"
column=
"name_en"
/>
<result
property=
"gender"
column=
"gender"
/>
<result
property=
"documentType"
column=
"document_type"
/>
<result
property=
"idNumber"
column=
"id_number"
/>
<result
property=
"passportNumber"
column=
"passport_number"
/>
<result
property=
"birthTime"
column=
"birth_time"
/>
<result
property=
"age"
column=
"age"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"isDeleted"
column=
"is_deleted"
/>
<result
property=
"creatorId"
column=
"creator_id"
/>
<result
property=
"updaterId"
column=
"updater_id"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,policy_second_holder_biz_id,policy_biz_id,policy_no,insurant_rel,name,
name_en,gender,document_type,id_number,passport_number,
birth_time,age,remark,is_deleted,creator_id,
updater_id,create_time,update_time
</sql>
</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