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
e0a896ec
Commit
e0a896ec
authored
Feb 05, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into prod
parents
3dc14da4
e0d2344b
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
593 additions
and
220 deletions
+593
-220
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiAppointmentFileController.java
+1
-1
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiPremiumReconciliationService.java
+1
-1
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentFileServiceImpl.java
+65
-74
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
+28
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiInsurantServiceImpl.java
+92
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiPolicyholderServiceImpl.java
+78
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiPremiumReconciliationServiceImpl.java
+14
-13
yd-csf-feign/src/main/java/com/yd/csf/feign/client/appointmentfile/ApiAppointmentFileFeignClient.java
+1
-1
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiAppointmentInfoDto.java
+6
-6
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiBeneficiaryInfoFzDto.java
+1
-1
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiInsurantInfoDto.java
+13
-7
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiPolicyholderInfoDto.java
+13
-7
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiProductPlanMainInfoDto.java
+18
-3
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiConvertExcelPlanNameDto.java
+53
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelImportAppointmentDto.java
+111
-101
yd-csf-feign/src/main/java/com/yd/csf/feign/response/appointmentfile/ApiAppointmentImportExcelResponse.java
+30
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/CommissionAddRequest.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/enums/PolicyFollowStatusEnum.java
+1
-0
yd-csf-service/src/main/java/com/yd/csf/service/model/CommissionExpected.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/model/ProductPlan.java
+18
-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/impl/CommissionExpectedServiceImpl.java
+37
-3
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
+8
-0
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiAppointmentFileController.java
View file @
e0a896ec
...
...
@@ -117,7 +117,7 @@ public class ApiAppointmentFileController implements ApiAppointmentFileFeignClie
}
/**
* Excel导入-预约信息
* Excel导入-
解析Excel
预约信息
* @return
*/
@Override
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiPremiumReconciliationService.java
View file @
e0a896ec
...
...
@@ -32,7 +32,7 @@ public interface ApiPremiumReconciliationService {
Result
editResult
(
ApiPremiumReconciliationResultEditRequest
request
);
@Async
(
"commonAsyncExecutor"
)
void
execute
(
ChangePolicyFollowStatusRequest
changePolicyFollowStatusRequest
);
void
execute
(
ChangePolicyFollowStatusRequest
changePolicyFollowStatusRequest
,
String
token
);
Result
<
Boolean
>
checkReconciliationComplete
(
String
policyNo
);
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentFileServiceImpl.java
View file @
e0a896ec
...
...
@@ -10,10 +10,7 @@ import com.yd.common.enums.CommonEnum;
import
com.yd.common.enums.DictTypeEnum
;
import
com.yd.common.exception.BusinessException
;
import
com.yd.common.result.Result
;
import
com.yd.common.utils.BeanMapUtils
;
import
com.yd.common.utils.DateUtil
;
import
com.yd.common.utils.RandomStringGenerator
;
import
com.yd.common.utils.RedisUtil
;
import
com.yd.common.utils.*
;
import
com.yd.csf.api.service.ApiAppointmentFileService
;
import
com.yd.csf.api.service.ApiAppointmentService
;
import
com.yd.csf.feign.dto.appointment.*
;
...
...
@@ -39,6 +36,9 @@ import com.yd.oss.feign.request.ApiOssExportAppointmentExcelRequest;
import
com.yd.oss.feign.response.ApiGeneratePdfResponse
;
import
com.yd.oss.feign.response.ApiOssExcelParseResponse
;
import
com.yd.oss.feign.response.ApiOssExportAppointmentExcelResponse
;
import
com.yd.product.feign.client.productlaunch.ApiProductLaunchFeignClient
;
import
com.yd.product.feign.request.productlaunch.ApiProductLaunchPageRequest
;
import
com.yd.product.feign.response.productlaunch.ApiProductLaunchPageResponse
;
import
com.yd.user.feign.response.sysdict.GetDictItemListByDictTypeResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -91,6 +91,9 @@ public class ApiAppointmentFileServiceImpl implements ApiAppointmentFileService
private
ApiExcelFeignClient
apiExcelFeignClient
;
@Autowired
private
ApiProductLaunchFeignClient
apiProductLaunchFeignClient
;
@Autowired
private
RedisUtil
redisUtil
;
/**
...
...
@@ -349,7 +352,7 @@ public class ApiAppointmentFileServiceImpl implements ApiAppointmentFileService
/**
* Excel导入-预约信息
* Excel导入-
解析Excel
预约信息
* @param file
* @param request
* @return
...
...
@@ -357,22 +360,17 @@ public class ApiAppointmentFileServiceImpl implements ApiAppointmentFileService
@Override
public
Result
<
ApiAppointmentImportExcelResponse
>
appointmentImportExcel
(
MultipartFile
file
,
ApiAppointmentImportExcelRequest
request
)
{
//校验预约信息是否存在
Result
<
Appointment
>
appointmentResult
=
apiAppointmentService
.
checkAppointmentIsExist
(
request
.
getAppointmentBizId
());
Appointment
appointment
=
appointmentResult
.
getData
();
ApiAppointmentImportExcelResponse
response
=
new
ApiAppointmentImportExcelResponse
();
String
s
=
"com.yd.csf.feign.dto.excel.ApiExcelImportAppointmentDto,com.yd.csf.feign.dto.excel.ApiExcelImportHealthDto"
;
//Feign调用-oss服务,通用-Excel解析(支持多sheet页解析)
Result
<
ApiOssExcelParseResponse
>
result
=
apiExcelFeignClient
.
parse
(
file
,
s
);
if
(
Objects
.
isNull
(
result
.
getData
())
||
(!
Objects
.
isNull
(
result
.
getData
())
&&
Objects
.
isNull
(
result
.
getData
().
getMap
()))){
throw
new
BusinessException
(
"导入数据不能为空!"
);
}
//Excel解析出的信息
Map
<
Integer
,
Object
>
data
=
(
Map
<
Integer
,
Object
>)
result
.
getData
().
getMap
();
ObjectMapper
objectMapper
=
new
ObjectMapper
();
try
{
...
...
@@ -382,83 +380,44 @@ public class ApiAppointmentFileServiceImpl implements ApiAppointmentFileService
LinkedHashMap
<
String
,
Object
>
appointmentData
=
(
LinkedHashMap
<
String
,
Object
>)
data
.
get
(
0
);
ApiExcelImportAppointmentDto
appointmentDto
=
objectMapper
.
convertValue
(
appointmentData
,
ApiExcelImportAppointmentDto
.
class
);
// 获取第二个Sheet页的解析结果并转换为 DTO
// LinkedHashMap<String, Object> healthData = (LinkedHashMap<String, Object>) data.get(1);
// ApiExcelImportHealthDto healthDto = objectMapper.convertValue(healthData, ApiExcelImportHealthDto.class);
//编辑更新预约主体信息
//设置预约主体信息
ApiAppointmentInfoDto
apiAppointmentInfoDto
=
new
ApiAppointmentInfoDto
();
BeanUtils
.
copyProperties
(
appointment
,
apiAppointmentInfoDto
);
apiAppointmentInfoDto
=
ApiExcelImportAppointmentDto
.
buildApiAppointmentInfoDto
(
appointmentDto
,
apiAppointmentInfoDto
,
dictTypeResponses
);
BeanUtils
.
copyProperties
(
apiAppointmentInfoDto
,
appointment
);
iAppointmentService
.
saveOrUpdate
(
appointment
);
response
.
setApiAppointmentInfoDto
(
apiAppointmentInfoDto
);
//编辑更新产品计划主信息
//查询产品计划主信息
ProductPlan
productPlan
=
iProductPlanService
.
queryOne
(
request
.
getAppointmentBizId
(),
""
);
//设置产品计划主信息
ApiProductPlanInfoDto
apiProductPlanInfoDto
=
new
ApiProductPlanInfoDto
();
ApiProductPlanMainInfoDto
apiProductPlanMainInfoDto
=
new
ApiProductPlanMainInfoDto
();
if
(!
Objects
.
isNull
(
productPlan
))
{
BeanUtils
.
copyProperties
(
productPlan
,
apiProductPlanMainInfoDto
);
apiProductPlanMainInfoDto
=
ApiExcelImportAppointmentDto
.
buildApiProductPlanMainInfoDto
(
appointmentDto
,
apiProductPlanMainInfoDto
,
dictTypeResponses
);
BeanUtils
.
copyProperties
(
apiProductPlanMainInfoDto
,
productPlan
);
iProductPlanService
.
saveOrUpdate
(
productPlan
);
//新增附加计划(附加险列表)
List
<
ApiProductPlanAdditionalInfoDto
>
apiBeneficiaryInfoDtoList
=
ApiExcelImportAppointmentDto
.
buildApiProductPlanAdditionalInfoDto
(
appointmentDto
.
getAdditionalDtoList
(),
dictTypeResponses
,
productPlan
.
getPlanBizId
());
if
(!
CollectionUtils
.
isEmpty
(
apiBeneficiaryInfoDtoList
))
{
List
<
Additional
>
saveList
=
apiBeneficiaryInfoDtoList
.
stream
().
map
(
dto
->
{
Additional
additional
=
new
Additional
();
BeanUtils
.
copyProperties
(
dto
,
additional
);
return
additional
;
}).
collect
(
Collectors
.
toList
());
iAdditionalService
.
saveOrUpdateBatch
(
saveList
);
}
}
//编辑更新投保人信息
//查询投保人信息
Policyholder
policyholder
=
iPolicyholderService
.
queryOne
(
request
.
getAppointmentBizId
(),
""
);
apiProductPlanMainInfoDto
=
ApiExcelImportAppointmentDto
.
buildApiProductPlanMainInfoDto
(
appointmentDto
,
apiProductPlanMainInfoDto
,
dictTypeResponses
);
apiProductPlanInfoDto
.
setApiProductPlanMainInfoDto
(
apiProductPlanMainInfoDto
);
//设置产品附加计划(附加险列表)
List
<
ApiProductPlanAdditionalInfoDto
>
apiProductPlanAdditionalInfoDtoList
=
ApiExcelImportAppointmentDto
.
buildApiProductPlanAdditionalInfoDto
(
appointmentDto
.
getAdditionalDtoList
(),
dictTypeResponses
);
apiProductPlanInfoDto
.
setApiProductPlanAdditionalInfoDtoList
(
apiProductPlanAdditionalInfoDtoList
);
response
.
setApiProductPlanInfoDto
(
apiProductPlanInfoDto
);
//设置投保人信息
ApiPolicyholderInfoDto
apiPolicyholderInfoDto
=
new
ApiPolicyholderInfoDto
();
if
(!
Objects
.
isNull
(
policyholder
))
{
BeanUtils
.
copyProperties
(
policyholder
,
apiPolicyholderInfoDto
);
apiPolicyholderInfoDto
=
ApiExcelImportAppointmentDto
.
buildApiPolicyholderInfoDto
(
appointmentDto
,
apiPolicyholderInfoDto
,
dictTypeResponses
);
BeanUtils
.
copyProperties
(
apiPolicyholderInfoDto
,
policyholder
);
iPolicyholderService
.
saveOrUpdate
(
policyholder
);
}
apiPolicyholderInfoDto
=
ApiExcelImportAppointmentDto
.
buildApiPolicyholderInfoDto
(
appointmentDto
,
apiPolicyholderInfoDto
,
dictTypeResponses
);
response
.
setApiPolicyholderInfoDto
(
apiPolicyholderInfoDto
);
//编辑更新受保人信息
//查询受保人信息
Insurant
insurant
=
iInsurantService
.
queryOne
(
request
.
getAppointmentBizId
(),
""
);
//设置受保人信息
ApiInsurantInfoDto
apiInsurantInfoDto
=
new
ApiInsurantInfoDto
();
if
(!
Objects
.
isNull
(
insurant
))
{
BeanUtils
.
copyProperties
(
insurant
,
apiInsurantInfoDto
);
apiInsurantInfoDto
=
ApiExcelImportAppointmentDto
.
buildApiInsurantInfoDto
(
appointmentDto
,
apiInsurantInfoDto
,
dictTypeResponses
);
BeanUtils
.
copyProperties
(
apiInsurantInfoDto
,
insurant
);
iInsurantService
.
saveOrUpdate
(
insurant
);
}
apiInsurantInfoDto
=
ApiExcelImportAppointmentDto
.
buildApiInsurantInfoDto
(
appointmentDto
,
apiInsurantInfoDto
,
dictTypeResponses
);
response
.
setApiInsurantInfoDto
(
apiInsurantInfoDto
);
//编辑更新第二持有人信息
//查询第二持有人信息
SecondHolder
secondHolder
=
iSecondHolderService
.
queryOne
(
request
.
getAppointmentBizId
(),
""
);
ApiSecondHolderInfoDto
apiSecondHolderInfoDto
=
new
ApiSecondHolderInfoDto
();
if
(!
Objects
.
isNull
(
secondHolder
))
{
BeanUtils
.
copyProperties
(
secondHolder
,
apiSecondHolderInfoDto
);
apiSecondHolderInfoDto
=
ApiExcelImportAppointmentDto
.
buildApiSecondHolderInfoDto
(
appointmentDto
,
apiSecondHolderInfoDto
,
dictTypeResponses
);
BeanUtils
.
copyProperties
(
apiSecondHolderInfoDto
,
secondHolder
);
iSecondHolderService
.
saveOrUpdate
(
secondHolder
);
}
apiSecondHolderInfoDto
=
ApiExcelImportAppointmentDto
.
buildApiSecondHolderInfoDto
(
appointmentDto
,
apiSecondHolderInfoDto
,
dictTypeResponses
);
response
.
setApiSecondHolderInfoDto
(
apiSecondHolderInfoDto
);
//新增受益人列表
List
<
ApiBeneficiaryInfoDto
>
apiBeneficiaryInfoDtoList
=
ApiExcelImportAppointmentDto
.
buildApiBeneficiaryInfoDtoList
(
appointmentDto
.
getBeneficiaryDtoList
(),
dictTypeResponses
,
request
.
getAppointmentBizId
());
if
(!
CollectionUtils
.
isEmpty
(
apiBeneficiaryInfoDtoList
))
{
List
<
Beneficiary
>
saveList
=
apiBeneficiaryInfoDtoList
.
stream
().
map
(
dto
->
{
Beneficiary
beneficiary
=
new
Beneficiary
();
BeanUtils
.
copyProperties
(
dto
,
beneficiary
);
return
beneficiary
;
}).
collect
(
Collectors
.
toList
());
iBeneficiaryService
.
saveOrUpdateBatch
(
saveList
);
}
List
<
ApiBeneficiaryInfoDto
>
apiBeneficiaryInfoDtoList
=
ApiExcelImportAppointmentDto
.
buildApiBeneficiaryInfoDtoList
(
appointmentDto
.
getBeneficiaryDtoList
(),
dictTypeResponses
);
ApiBeneficiaryInfoFzDto
fzDto
=
new
ApiBeneficiaryInfoFzDto
();
fzDto
.
setApiBeneficiaryInfoDtoList
(
apiBeneficiaryInfoDtoList
);
response
.
setApiBeneficiaryInfoFzDto
(
fzDto
);
return
Result
.
success
();
return
Result
.
success
(
response
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Excel数据转换异常"
,
e
);
...
...
@@ -466,6 +425,38 @@ public class ApiAppointmentFileServiceImpl implements ApiAppointmentFileService
}
}
/**
* 远程调用feign-根据Excel解析的数据-转换产品计划名称和ID
* @param appointmentDto
* @return
*/
// public List<ApiConvertExcelPlanNameDto> convertExcelPlanName(ApiExcelImportAppointmentDto appointmentDto) {
// List<String> reqNameList = new ArrayList<>();
// if (StringUtils.isNotBlank(appointmentDto.getPlanProductName())){
// //主计划产品名称
// //繁转简
// reqNameList.add(ChineseTextConverter.traditionalToSimplified(appointmentDto.getPlanProductName()));
// //简转繁
// reqNameList.add(ChineseTextConverter.simplifiedToTraditional(appointmentDto.getPlanProductName()));
// }
// if (CollectionUtils.isEmpty(appointmentDto.getAdditionalDtoList())){
// for (ApiExcelImportAdditionalDto additionalDto : appointmentDto.getAdditionalDtoList()) {
// //附加计划产品名称
// //繁转简
// reqNameList.add(ChineseTextConverter.traditionalToSimplified(additionalDto.getAddProductName()));
// //简转繁
// reqNameList.add(ChineseTextConverter.simplifiedToTraditional(additionalDto.getAddProductName()));
// }
// }
// ApiProductLaunchPageRequest request = new ApiProductLaunchPageRequest();
// request.setNameList(reqNameList);
// Result<IPage<ApiProductLaunchPageResponse>> result = apiProductLaunchFeignClient.page(request);
// if (!Objects.isNull(result.getData()) && !CollectionUtils.isEmpty(result.getData().getRecords())) {
// List<ApiProductLaunchPageResponse> responses = result.getData().getRecords();
//
// }
// }
/**
* 校验预约附件信息是否存在
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
View file @
e0a896ec
...
...
@@ -6,6 +6,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.google.gson.reflect.TypeToken
;
import
com.yd.auth.core.dto.AuthUserDto
;
import
com.yd.auth.core.utils.SecurityUtil
;
import
com.yd.base.feign.client.relobjectcertificate.ApiRelObjectCertificateFeignClient
;
import
com.yd.base.feign.dto.ApiCertificateDto
;
import
com.yd.base.feign.request.relobjectcertificate.ApiRelObjectCertificateListAddRequest
;
import
com.yd.common.constant.CodeGeneratorConstants
;
import
com.yd.common.enums.CommonEnum
;
import
com.yd.common.enums.ResultCode
;
...
...
@@ -43,6 +46,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
javax.validation.constraints.NotBlank
;
import
java.time.ZoneId
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -1156,6 +1160,30 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
appointment
.
setStatus
(
AppointmentStatusEnum
.
YQX
.
getItemValue
());
}
iAppointmentService
.
saveOrUpdate
(
appointment
);
//取消预约-更新新单跟进状态为:取消预约
if
(
2
==
request
.
getOprType
())
{
//取消预约-更新新单跟进状态为取消预约
editFollowStatus
(
request
.
getAppointmentBizId
());
}
return
Result
.
success
();
}
/**
* 取消预约-更新新单跟进状态为取消预约
* @return
*/
public
Result
editFollowStatus
(
String
appointmentBizId
)
{
List
<
PolicyFollow
>
followList
=
policyFollowService
.
queryListByAppointmentBizId
(
appointmentBizId
);
if
(!
CollectionUtils
.
isEmpty
(
followList
))
{
//更新当前预约ID绑定新单记录更新新单状态为取消预约。
followList
=
followList
.
stream
().
map
(
dto
->
{
//取消预约
dto
.
setStatus
(
"QX_YY"
);
return
dto
;
}).
collect
(
Collectors
.
toList
());
policyFollowService
.
saveOrUpdateBatch
(
followList
);
}
return
Result
.
success
();
}
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiInsurantServiceImpl.java
View file @
e0a896ec
package
com
.
yd
.
csf
.
api
.
service
.
impl
;
import
com.yd.base.feign.client.relobjectcertificate.ApiRelObjectCertificateFeignClient
;
import
com.yd.base.feign.dto.ApiCertificateDto
;
import
com.yd.base.feign.request.relobjectcertificate.ApiRelObjectCertificateListAddRequest
;
import
com.yd.base.feign.request.relobjectcertificate.ApiRelObjectCertificateListRequest
;
import
com.yd.base.feign.response.relobjectcertificate.ApiRelObjectCertificateListResponse
;
import
com.yd.common.enums.CommonEnum
;
import
com.yd.common.enums.ResultCode
;
import
com.yd.common.exception.BusinessException
;
...
...
@@ -25,6 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
...
...
@@ -48,6 +54,9 @@ public class ApiInsurantServiceImpl implements ApiInsurantService {
@Autowired
private
ApiTaxationService
apiTaxationService
;
@Autowired
private
ApiRelObjectCertificateFeignClient
apiRelObjectCertificateFeignClient
;
/**
* 受保人信息详情
* @param appointmentBizId 预约信息主表唯一业务ID
...
...
@@ -63,11 +72,34 @@ public class ApiInsurantServiceImpl implements ApiInsurantService {
BeanUtils
.
copyProperties
(
insurant
,
dto
);
//地址列表
dto
.
setAddressList
(
CommonUtil
.
getAddressList
(
insurant
.
getAddressList
()));
//查询证件列表信息
dto
.
setApiCertificateDtoList
(
apiCertificateDtoList
(
insurant
.
getInsurantBizId
()));
}
return
Result
.
success
(
dto
);
}
/**
* 查询证件列表信息
* @param insurantBizId
* @return
*/
public
List
<
ApiCertificateDto
>
apiCertificateDtoList
(
String
insurantBizId
)
{
List
<
ApiCertificateDto
>
apiCertificateDtoList
=
new
ArrayList
<>();
//查询受保人证件列表信息
Result
<
List
<
ApiRelObjectCertificateListResponse
>>
result
=
apiRelObjectCertificateFeignClient
.
list
(
ApiRelObjectCertificateListRequest
.
builder
()
.
objectBizId
(
insurantBizId
)
.
build
());
if
(!
CollectionUtils
.
isEmpty
(
result
.
getData
()))
{
apiCertificateDtoList
=
result
.
getData
().
stream
().
map
(
dto
->
{
ApiCertificateDto
apiCertificateDto
=
new
ApiCertificateDto
();
BeanUtils
.
copyProperties
(
dto
,
apiCertificateDto
);
return
apiCertificateDto
;
}).
collect
(
Collectors
.
toList
());
}
return
apiCertificateDtoList
;
}
/**
* 编辑受保人信息
* @param apiInsurantInfoDto
* @return
...
...
@@ -124,6 +156,25 @@ public class ApiInsurantServiceImpl implements ApiInsurantService {
.
apiTaxationDtoList
(
apiTaxationDtoList
)
.
build
());
}
//查询投保人证件列表信息
Result
<
List
<
ApiRelObjectCertificateListResponse
>>
certificateListResult
=
apiRelObjectCertificateFeignClient
.
list
(
ApiRelObjectCertificateListRequest
.
builder
().
objectBizId
(
policyholder
.
getPolicyholderBizId
()).
build
());
if
(!
CollectionUtils
.
isEmpty
(
certificateListResult
.
getData
()))
{
List
<
ApiCertificateDto
>
apiCertificateDtoList
=
certificateListResult
.
getData
()
.
stream
().
map
(
d
->
{
ApiCertificateDto
apiCertificateDto
=
new
ApiCertificateDto
();
BeanUtils
.
copyProperties
(
d
,
apiCertificateDto
);
return
apiCertificateDto
;
}).
collect
(
Collectors
.
toList
());
//添加受保人证件列表信息
apiRelObjectCertificateFeignClient
.
addRelObjectCertificateList
(
ApiRelObjectCertificateListAddRequest
.
builder
()
.
objectBizId
(
insurant
.
getInsurantBizId
())
.
objectName
(
CommonEnum
.
UID_TYPE_INSURANT
.
getName
())
.
objectTableName
(
CommonEnum
.
UID_TYPE_INSURANT
.
getCode
())
.
objectType
(
CommonEnum
.
UID_TYPE_INSURANT
.
getCode
())
.
apiCertificateDtoList
(
apiCertificateDtoList
)
.
build
());
}
return
Result
.
success
(
insurant
);
}
}
...
...
@@ -148,6 +199,17 @@ public class ApiInsurantServiceImpl implements ApiInsurantService {
.
apiTaxationDtoList
(
dto
.
getApiTaxationDtoList
())
.
build
());
}
//添加受保人证件列表信息
if
(!
CollectionUtils
.
isEmpty
(
dto
.
getApiCertificateDtoList
()))
{
apiRelObjectCertificateFeignClient
.
addRelObjectCertificateList
(
ApiRelObjectCertificateListAddRequest
.
builder
()
.
objectBizId
(
insurant
.
getInsurantBizId
())
.
objectName
(
CommonEnum
.
UID_TYPE_INSURANT
.
getName
())
.
objectTableName
(
CommonEnum
.
UID_TYPE_INSURANT
.
getCode
())
.
objectType
(
CommonEnum
.
UID_TYPE_INSURANT
.
getCode
())
.
apiCertificateDtoList
(
dto
.
getApiCertificateDtoList
())
.
build
());
}
return
Result
.
success
(
insurant
);
}
...
...
@@ -197,6 +259,25 @@ public class ApiInsurantServiceImpl implements ApiInsurantService {
.
apiTaxationDtoList
(
apiTaxationDtoList
)
.
build
());
}
//查询投保人证件列表信息
Result
<
List
<
ApiRelObjectCertificateListResponse
>>
certificateListResult
=
apiRelObjectCertificateFeignClient
.
list
(
ApiRelObjectCertificateListRequest
.
builder
().
objectBizId
(
policyholder
.
getPolicyholderBizId
()).
build
());
if
(!
CollectionUtils
.
isEmpty
(
certificateListResult
.
getData
()))
{
List
<
ApiCertificateDto
>
apiCertificateDtoList
=
certificateListResult
.
getData
()
.
stream
().
map
(
d
->
{
ApiCertificateDto
apiCertificateDto
=
new
ApiCertificateDto
();
BeanUtils
.
copyProperties
(
d
,
apiCertificateDto
);
return
apiCertificateDto
;
}).
collect
(
Collectors
.
toList
());
//添加受保人证件列表信息
apiRelObjectCertificateFeignClient
.
addRelObjectCertificateList
(
ApiRelObjectCertificateListAddRequest
.
builder
()
.
objectBizId
(
insurant
.
getInsurantBizId
())
.
objectName
(
CommonEnum
.
UID_TYPE_INSURANT
.
getName
())
.
objectTableName
(
CommonEnum
.
UID_TYPE_INSURANT
.
getCode
())
.
objectType
(
CommonEnum
.
UID_TYPE_INSURANT
.
getCode
())
.
apiCertificateDtoList
(
apiCertificateDtoList
)
.
build
());
}
return
Result
.
success
(
insurant
);
}
}
...
...
@@ -218,6 +299,17 @@ public class ApiInsurantServiceImpl implements ApiInsurantService {
.
apiTaxationDtoList
(
dto
.
getApiTaxationDtoList
())
.
build
());
}
//添加受保人证件列表信息
if
(!
CollectionUtils
.
isEmpty
(
dto
.
getApiCertificateDtoList
()))
{
apiRelObjectCertificateFeignClient
.
addRelObjectCertificateList
(
ApiRelObjectCertificateListAddRequest
.
builder
()
.
objectBizId
(
insurant
.
getInsurantBizId
())
.
objectName
(
CommonEnum
.
UID_TYPE_INSURANT
.
getName
())
.
objectTableName
(
CommonEnum
.
UID_TYPE_INSURANT
.
getCode
())
.
objectType
(
CommonEnum
.
UID_TYPE_INSURANT
.
getCode
())
.
apiCertificateDtoList
(
dto
.
getApiCertificateDtoList
())
.
build
());
}
return
Result
.
success
(
insurant
);
}
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiPolicyholderServiceImpl.java
View file @
e0a896ec
package
com
.
yd
.
csf
.
api
.
service
.
impl
;
import
com.yd.base.feign.client.relobjectcertificate.ApiRelObjectCertificateFeignClient
;
import
com.yd.base.feign.dto.ApiCertificateDto
;
import
com.yd.base.feign.request.relobjectcertificate.ApiRelObjectCertificateListAddRequest
;
import
com.yd.base.feign.request.relobjectcertificate.ApiRelObjectCertificateListRequest
;
import
com.yd.base.feign.response.relobjectcertificate.ApiRelObjectCertificateListResponse
;
import
com.yd.common.enums.CommonEnum
;
import
com.yd.common.enums.ResultCode
;
import
com.yd.common.exception.BusinessException
;
...
...
@@ -20,7 +25,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
/**
* 投保人信息业务实现类
...
...
@@ -38,6 +46,9 @@ public class ApiPolicyholderServiceImpl implements ApiPolicyholderService {
@Autowired
private
ApiTaxationService
apiTaxationService
;
@Autowired
private
ApiRelObjectCertificateFeignClient
apiRelObjectCertificateFeignClient
;
/**
* 投保人信息详情
* @param appointmentBizId 预约信息主表唯一业务ID
...
...
@@ -54,11 +65,34 @@ public class ApiPolicyholderServiceImpl implements ApiPolicyholderService {
BeanUtils
.
copyProperties
(
policyholder
,
dto
);
//地址列表
dto
.
setAddressList
(
CommonUtil
.
getAddressList
(
policyholder
.
getAddressList
()));
dto
.
setApiCertificateDtoList
(
apiCertificateDtoList
(
policyholder
.
getPolicyholderBizId
()));
}
return
Result
.
success
(
dto
);
}
/**
* 查询证件列表信息
* @param policyholderBizId
* @return
*/
public
List
<
ApiCertificateDto
>
apiCertificateDtoList
(
String
policyholderBizId
)
{
List
<
ApiCertificateDto
>
apiCertificateDtoList
=
new
ArrayList
<>();
//查询投保人证件列表信息
Result
<
List
<
ApiRelObjectCertificateListResponse
>>
result
=
apiRelObjectCertificateFeignClient
.
list
(
ApiRelObjectCertificateListRequest
.
builder
()
.
objectBizId
(
policyholderBizId
)
.
build
());
if
(!
CollectionUtils
.
isEmpty
(
result
.
getData
()))
{
apiCertificateDtoList
=
result
.
getData
().
stream
().
map
(
dto
->
{
ApiCertificateDto
apiCertificateDto
=
new
ApiCertificateDto
();
BeanUtils
.
copyProperties
(
dto
,
apiCertificateDto
);
return
apiCertificateDto
;
}).
collect
(
Collectors
.
toList
());
}
return
apiCertificateDtoList
;
}
/**
* 编辑投保人信息
* @param apiPolicyholderInfoDto
* @return
...
...
@@ -105,10 +139,44 @@ public class ApiPolicyholderServiceImpl implements ApiPolicyholderService {
.
apiTaxationDtoList
(
dto
.
getApiTaxationDtoList
())
.
build
());
}
//添加投保人证件列表信息
if
(!
CollectionUtils
.
isEmpty
(
dto
.
getApiCertificateDtoList
()))
{
//新增对象证件关系信息
addRelObjectCertificateList
(
policyholder
.
getPolicyholderBizId
(),
CommonEnum
.
UID_TYPE_POLICYHOLDER
.
getCode
(),
CommonEnum
.
UID_TYPE_POLICYHOLDER
.
getCode
(),
CommonEnum
.
UID_TYPE_POLICYHOLDER
.
getName
(),
dto
.
getApiCertificateDtoList
()
);
}
return
Result
.
success
(
policyholder
);
}
/**
* 新增对象证件关系信息
* @param objectBizId
* @param objectType
* @param objectTableName
* @param objectName
* @param apiCertificateDtoList
* @return
*/
public
Result
addRelObjectCertificateList
(
String
objectBizId
,
String
objectType
,
String
objectTableName
,
String
objectName
,
List
<
ApiCertificateDto
>
apiCertificateDtoList
)
{
ApiRelObjectCertificateListAddRequest
addRequest
=
new
ApiRelObjectCertificateListAddRequest
();
addRequest
.
setObjectBizId
(
objectBizId
);
addRequest
.
setObjectName
(
objectName
);
addRequest
.
setObjectTableName
(
objectTableName
);
addRequest
.
setObjectType
(
objectType
);
addRequest
.
setApiCertificateDtoList
(
apiCertificateDtoList
);
apiRelObjectCertificateFeignClient
.
addRelObjectCertificateList
(
addRequest
);
return
Result
.
success
();
}
/**
* 编辑投保人信息表数据
* @param dto
* @param appointmentBizId
...
...
@@ -143,6 +211,16 @@ public class ApiPolicyholderServiceImpl implements ApiPolicyholderService {
.
apiTaxationDtoList
(
dto
.
getApiTaxationDtoList
())
.
build
());
}
//添加投保人证件列表信息
if
(!
CollectionUtils
.
isEmpty
(
dto
.
getApiCertificateDtoList
()))
{
//新增对象证件关系信息
addRelObjectCertificateList
(
policyholder
.
getPolicyholderBizId
(),
CommonEnum
.
UID_TYPE_POLICYHOLDER
.
getCode
(),
CommonEnum
.
UID_TYPE_POLICYHOLDER
.
getCode
(),
CommonEnum
.
UID_TYPE_POLICYHOLDER
.
getName
(),
dto
.
getApiCertificateDtoList
()
);
}
return
Result
.
success
(
policyholder
);
}
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiPremiumReconciliationServiceImpl.java
View file @
e0a896ec
...
...
@@ -1084,6 +1084,11 @@ public class ApiPremiumReconciliationServiceImpl implements ApiPremiumReconcilia
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
editResult
(
ApiPremiumReconciliationResultEditRequest
request
)
{
// 通过 RequestContextHolder 获取 HttpServletRequest
HttpServletRequest
httpServletRequest
=
((
ServletRequestAttributes
)
RequestContextHolder
.
currentRequestAttributes
()).
getRequest
();
// 获取Token
String
token
=
httpServletRequest
.
getHeader
(
"Authorization"
);
//校验保费对账记录信息是否存在
Result
<
PremiumReconciliation
>
result
=
checkPremiumReconciliationIsExist
(
request
.
getPremiumReconciliationBizId
());
PremiumReconciliation
premiumReconciliation
=
result
.
getData
();
...
...
@@ -1115,8 +1120,8 @@ public class ApiPremiumReconciliationServiceImpl implements ApiPremiumReconcilia
statusRequest
.
setStatus
(
"TAKE_EFFECT"
);
//遍历保单转介人列表信息 -> 调用基本法算出预计发佣列表
// 通过代理对象调用
getSelf
().
execute
(
statusRequest
);
Result
<
Boolean
>
result1
=
changePolicyFollowStatus
(
statusRequest
);
// getSelf().execute(statusRequest,token
);
Result
<
Boolean
>
result1
=
changePolicyFollowStatus
(
statusRequest
,
token
);
if
(
result1
.
getCode
()
!=
200
)
{
throw
new
BusinessException
(
result1
.
getMsg
());
}
...
...
@@ -1135,8 +1140,8 @@ public class ApiPremiumReconciliationServiceImpl implements ApiPremiumReconcilia
@Override
@Async
(
"commonAsyncExecutor"
)
public
void
execute
(
ChangePolicyFollowStatusRequest
changePolicyFollowStatusRequest
)
{
changePolicyFollowStatus
(
changePolicyFollowStatusRequest
);
public
void
execute
(
ChangePolicyFollowStatusRequest
changePolicyFollowStatusRequest
,
String
token
)
{
changePolicyFollowStatus
(
changePolicyFollowStatusRequest
,
token
);
}
/**
...
...
@@ -1146,10 +1151,11 @@ public class ApiPremiumReconciliationServiceImpl implements ApiPremiumReconcilia
* @return
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
<
Boolean
>
changePolicyFollowStatus
(
ChangePolicyFollowStatusRequest
changePolicyFollowStatusRequest
)
{
// 通过 RequestContextHolder 获取 HttpServletRequest
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
currentRequestAttributes
()).
getRequest
();
public
Result
<
Boolean
>
changePolicyFollowStatus
(
ChangePolicyFollowStatusRequest
changePolicyFollowStatusRequest
,
String
token
)
{
// 设置ThreadLocal Token
FeignTokenInterceptor
.
setThreadLocalToken
(
token
);
if
(
changePolicyFollowStatusRequest
==
null
||
StringUtils
.
isBlank
(
changePolicyFollowStatusRequest
.
getPolicyBizId
()))
{
return
Result
.
fail
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"policyBizId不能为空"
);
}
...
...
@@ -1190,8 +1196,6 @@ public class ApiPremiumReconciliationServiceImpl implements ApiPremiumReconcilia
// 修改为生效时需要同步预计发佣
if
(
PolicyFollowStatusEnum
.
EFFECTIVE
.
equals
(
currentStatusEnum
))
{
// 获取Token
String
token
=
request
.
getHeader
(
"Authorization"
);
log
.
info
(
"修改跟进状态获取token:{}"
,
token
);
// 同步:根据保单生成预计出账记录
generateExpectedFortuneSync
(
token
,
policyFollow
.
getPolicyNo
());
...
...
@@ -1206,9 +1210,6 @@ public class ApiPremiumReconciliationServiceImpl implements ApiPremiumReconcilia
* @param policyNo 保单号
*/
private
void
generateExpectedFortuneSync
(
String
token
,
String
policyNo
)
{
// 设置ThreadLocal Token
FeignTokenInterceptor
.
setThreadLocalToken
(
token
);
// 调用 ApiExpectedFortuneService 的 generateSyncWithLogAndRedis(同步版本,包含日志和Redis处理)
ApiGenerateExpectedFortuneRequest
generateExpectedFortuneRequest
=
new
ApiGenerateExpectedFortuneRequest
();
generateExpectedFortuneRequest
.
setPolicyNo
(
policyNo
);
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/client/appointmentfile/ApiAppointmentFileFeignClient.java
View file @
e0a896ec
...
...
@@ -87,7 +87,7 @@ public interface ApiAppointmentFileFeignClient {
Result
<
ApiAppointmentExportExcelResponse
>
appointmentExportExcel
(
@NotBlank
(
message
=
"预约信息主表唯一业务ID不能为空"
)
@RequestParam
(
value
=
"appointmentBizId"
)
String
appointmentBizId
);
/**
* Excel导入-预约信息
* Excel导入-
解析Excel
预约信息
* @return
*/
@PostMapping
(
value
=
"/excel/import/appointment"
)
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiAppointmentInfoDto.java
View file @
e0a896ec
...
...
@@ -106,7 +106,7 @@ public class ApiAppointmentInfoDto {
/**
* 是否开户: 0-否, 1-是(字典)
*/
private
Integer
isOpenAccount
;
private
Integer
isOpenAccount
=
0
;
/**
* 开户行名称
...
...
@@ -153,12 +153,12 @@ public class ApiAppointmentInfoDto {
/**
* 是否体检: 0-否, 1-是(字典)
*/
private
Integer
isTj
;
private
Integer
isTj
=
0
;
/**
* 是否购买过香港保险: 0-否, 1-是(字典)
*/
private
Integer
isBuy
;
private
Integer
isBuy
=
0
;
/**
* 转保声明选项: 0-否, 1-是 2-尚未決定(字典)
...
...
@@ -168,17 +168,17 @@ public class ApiAppointmentInfoDto {
/**
* 是否有用车服务:0-否, 1-是(字典)
*/
private
Integer
isUseCar
;
private
Integer
isUseCar
=
0
;
/**
* 是否有第二持有人
*/
private
Integer
isSecond
;
private
Integer
isSecond
=
0
;
/**
* 转介人是否陪同
*/
private
Integer
isReferrerAccompany
;
private
Integer
isReferrerAccompany
=
0
;
/**
* 创建人用户名
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiBeneficiaryInfoFzDto.java
View file @
e0a896ec
...
...
@@ -13,7 +13,7 @@ public class ApiBeneficiaryInfoFzDto {
* 是否法定受益人
*/
@NotNull
(
message
=
"受益人-是否法定受益人不能为空"
)
private
Integer
isLegalBeneficiary
;
private
Integer
isLegalBeneficiary
=
0
;
/**
* 受益人列表信息
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiInsurantInfoDto.java
View file @
e0a896ec
package
com
.
yd
.
csf
.
feign
.
dto
.
appointment
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yd.base.feign.dto.ApiCertificateDto
;
import
com.yd.csf.feign.dto.AddressDto
;
import
com.yd.csf.feign.dto.taxation.ApiTaxationDto
;
import
com.yd.csf.feign.enums.RelTypeEnum
;
...
...
@@ -114,7 +115,7 @@ public class ApiInsurantInfoDto {
/**
* 是否拥有其他国家公民身份(如美国、日本等): 0-否, 1-是(字典)
*/
private
Integer
isOtherCountry
;
private
Integer
isOtherCountry
=
0
;
/**
* 吸烟情况(字典)
...
...
@@ -125,20 +126,20 @@ public class ApiInsurantInfoDto {
/**
* 婚姻情况(字典)
*/
@NotBlank
(
message
=
"受保人-婚姻情况不能为空"
,
groups
=
GroupValid
.
NotSelf
.
class
)
//
@NotBlank(message = "受保人-婚姻情况不能为空", groups = GroupValid.NotSelf.class)
private
String
maritalStatus
;
/**
* 教育程度(字典)
*/
@NotBlank
(
message
=
"受保人-教育程度不能为空"
,
groups
=
GroupValid
.
NotSelf
.
class
)
//
@NotBlank(message = "受保人-教育程度不能为空", groups = GroupValid.NotSelf.class)
private
String
educationLevel
;
/**
* 是否退休(字典)
*/
@NotNull
(
message
=
"受保人-是否退休不能为空"
,
groups
=
GroupValid
.
NotSelf
.
class
)
private
Integer
isRetirement
;
//
@NotNull(message = "受保人-是否退休不能为空", groups = GroupValid.NotSelf.class)
private
Integer
isRetirement
=
0
;
/**
* 退休年龄(如已退休,再显示)
...
...
@@ -168,7 +169,7 @@ public class ApiInsurantInfoDto {
/**
* 受供养人数目(通过FNA带入)
*/
private
Integer
dependentsNum
;
private
Integer
dependentsNum
=
0
;
//-- 以下是联系信息
/**
...
...
@@ -211,7 +212,7 @@ public class ApiInsurantInfoDto {
/**
* 证件地址
*/
@NotBlank
(
message
=
"受保人-证件地址不能为空"
,
groups
=
GroupValid
.
NotSelf
.
class
)
//
@NotBlank(message = "受保人-证件地址不能为空", groups = GroupValid.NotSelf.class)
private
String
certificateAddress
;
/**
...
...
@@ -342,6 +343,11 @@ public class ApiInsurantInfoDto {
*/
private
List
<
ApiTaxationDto
>
apiTaxationDtoList
;
/**
* 证件信息列表
*/
private
List
<
ApiCertificateDto
>
apiCertificateDtoList
;
// 判断与投保人关系是否为本人关系
public
boolean
isSelf
()
{
return
RelTypeEnum
.
MYSELF
.
getItemValue
().
equals
(
policyholderRel
);
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiPolicyholderInfoDto.java
View file @
e0a896ec
package
com
.
yd
.
csf
.
feign
.
dto
.
appointment
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yd.base.feign.dto.ApiCertificateDto
;
import
com.yd.csf.feign.dto.AddressDto
;
import
com.yd.csf.feign.dto.taxation.ApiTaxationDto
;
import
lombok.Data
;
...
...
@@ -107,7 +108,7 @@ public class ApiPolicyholderInfoDto {
/**
* 是否拥有其他国家公民身份(如美国、日本等): 0-否, 1-是(字典)
*/
private
Integer
isOtherCountry
;
private
Integer
isOtherCountry
=
0
;
/**
* 吸烟情况(字典)
...
...
@@ -118,20 +119,20 @@ public class ApiPolicyholderInfoDto {
/**
* 婚姻情况(字典)
*/
@NotBlank
(
message
=
"投保人-婚姻情况不能为空"
)
//
@NotBlank(message = "投保人-婚姻情况不能为空")
private
String
maritalStatus
;
/**
* 教育程度(字典)
*/
@NotBlank
(
message
=
"投保人-教育程度不能为空"
)
//
@NotBlank(message = "投保人-教育程度不能为空")
private
String
educationLevel
;
/**
* 是否退休(字典)
*/
@NotNull
(
message
=
"投保人-是否退休不能为空"
)
private
Integer
isRetirement
;
//
@NotNull(message = "投保人-是否退休不能为空")
private
Integer
isRetirement
=
0
;
/**
* 退休年龄(如已退休,再显示)
...
...
@@ -161,7 +162,7 @@ public class ApiPolicyholderInfoDto {
/**
* 受供养人数目(通过FNA带入)
*/
private
Integer
dependentsNum
;
private
Integer
dependentsNum
=
0
;
//-- 以下是联系信息
/**
...
...
@@ -204,7 +205,7 @@ public class ApiPolicyholderInfoDto {
/**
* 证件地址
*/
@NotBlank
(
message
=
"投保人-证件地址不能为空"
)
//
@NotBlank(message = "投保人-证件地址不能为空")
private
String
certificateAddress
;
/**
...
...
@@ -334,4 +335,9 @@ public class ApiPolicyholderInfoDto {
* 税务信息列表
*/
private
List
<
ApiTaxationDto
>
apiTaxationDtoList
;
/**
* 证件信息列表
*/
private
List
<
ApiCertificateDto
>
apiCertificateDtoList
;
}
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiProductPlanMainInfoDto.java
View file @
e0a896ec
...
...
@@ -28,6 +28,16 @@ public class ApiProductPlanMainInfoDto {
private
String
companyName
;
/**
* 出单经纪公司(对账公司)ID
*/
private
String
reconciliationCompanyId
;
/**
* 出单经纪公司(对账公司)名称
*/
private
String
reconciliationCompanyName
;
/**
* 保险险种ID(产品上架信息绑定的保险险种参数)
*/
private
String
insuranceTypeId
;
...
...
@@ -97,12 +107,17 @@ public class ApiProductPlanMainInfoDto {
/**
* 是否预缴保费: 0-否, 1-是(字典)
*/
private
Integer
isPrepay
;
private
Integer
isPrepay
=
0
;
/**
* 预缴年期
*/
private
Integer
prepaymentPeriod
=
0
;
/**
* 是否追溯: 0-否, 1-是(字典)
*/
private
Integer
isTraceable
;
private
Integer
isTraceable
=
0
;
/**
* 回溯日期
...
...
@@ -113,7 +128,7 @@ public class ApiProductPlanMainInfoDto {
/**
* 是否参加递增保障权益: 0-否, 1-是(字典)
*/
private
Integer
isJoin
;
private
Integer
isJoin
=
0
;
/**
* 红利分配方式(字典)
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiConvertExcelPlanNameDto.java
0 → 100644
View file @
e0a896ec
package
com
.
yd
.
csf
.
feign
.
dto
.
excel
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
ApiConvertExcelPlanNameDto
{
/**
* 主产品计划名称
*/
private
String
mainPlanName
;
/**
* 主产品计划名称集合(主产品计划名称,繁转简,简转繁两个名称)
*/
private
List
<
String
>
mainPlanNameList
;
/**
* 主产品计划ID
*/
private
String
mainPlanId
;
/**
* 附加产品计划1名称
*/
private
String
addPlanName1
;
/**
* 附加产品计划1名称集合(附加产品计划1名称,繁转简,简转繁两个名称)
*/
private
List
<
String
>
addPlanName1List
;
/**
* 附加产品计划1 ID
*/
private
String
addPlanId1
;
/**
* 附加产品计划2名称
*/
private
String
addPlanName2
;
/**
* 附加产品计划2名称集合(附加产品计划2名称,繁转简,简转繁两个名称)
*/
private
List
<
String
>
addPlanName2List
;
/**
* 附加产品计划2 ID
*/
private
String
addPlanId2
;
}
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/excel/ApiExcelImportAppointmentDto.java
View file @
e0a896ec
...
...
@@ -552,31 +552,30 @@ public class ApiExcelImportAppointmentDto {
infoDto
.
setPolicyCurrency
(
dto
.
getPlanCurrency
());
//供款频率 -> 付款频率(字典)
infoDto
.
setPaymentFrequency
(
dto
.
getPlanPaymentFrequency
());
//预付额 TODO
// infoDto.setDeductibles();
//红利分配方式(字典)
infoDto
.
setDividendDistributionMethod
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_DIVIDEND
.
getItemValue
(),
dto
.
getPlanDividendDistributionMethod
()));
//投保额 ——> 保单额度(重疾)
infoDto
.
setSumInsured
(
dto
.
getPlanSumInsured
());
//供款年期
infoDto
.
setIssueNumber
(
dto
.
getPlanPaymentTerm
());
//每期保费->主險每期保费金额(每期保费)(产品计划信息表)
infoDto
.
setEachIssuePremium
(
dto
.
getPlanEachIssuePremium
());
//首期付款方式->首期保费缴付方式
infoDto
.
setInitialPaymentMethod
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_FIRST_ISSUE
.
getItemValue
(),
dto
.
getPlanInitialPaymentMethod
()));
//是否参加递增保障权益->是否參加遞增保障權益/通脹加保權益
infoDto
.
setIsJoin
(
Integer
.
parseInt
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
SYS_NO_YES
.
getItemValue
(),
dto
.
getPlanIsJoin
())));
//是否预缴保费->是否預繳保費 (如是,請填寫首期保費以外的剩餘保費)(是否预缴保费: 0-否, 1-是(字典)(产品计划信息表))
infoDto
.
setIsPrepay
(
Integer
.
parseInt
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
SYS_NO_YES
.
getItemValue
(),
dto
.
getPlanIsPrepay
())));
//供款年期
infoDto
.
setIssueNumber
(
dto
.
getPlanPaymentTerm
());
//首期付款方式->首期保费缴付方式
infoDto
.
setInitialPaymentMethod
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_FIRST_ISSUE
.
getItemValue
(),
dto
.
getPlanInitialPaymentMethod
()));
//续期付款方式
infoDto
.
setRenewalPaymentMethod
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_FIRST_ISSUE
.
getItemValue
(),
dto
.
getPlanRenewalPaymentMethod
()));
//保额
infoDto
.
setSumInsured
(
dto
.
getPlanSumInsured
());
//是否参加递增保障权益->是否參加遞增保障權益/通脹加保權益
infoDto
.
setIsJoin
(
Integer
.
parseInt
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
SYS_NO_YES
.
getItemValue
(),
dto
.
getPlanIsJoin
())));
//红利分配方式(字典)
infoDto
.
setDividendDistributionMethod
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_DIVIDEND
.
getItemValue
(),
dto
.
getPlanDividendDistributionMethod
()));
//是否需提前保单生效日 TODO
//预付额 TODO
// infoDto.setDeductibles();
return
infoDto
;
}
...
...
@@ -589,50 +588,57 @@ public class ApiExcelImportAppointmentDto {
public
static
ApiPolicyholderInfoDto
buildApiPolicyholderInfoDto
(
ApiExcelImportAppointmentDto
dto
,
ApiPolicyholderInfoDto
infoDto
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
//出生日期->出生日期 (西元 年/月/日)(投保人信息表:出生日期)
infoDto
.
setBirthday
(
DateUtil
.
getYMDLocalDateTime
(
dto
.
getPolicyholderBirthday
()));
//出生地
infoDto
.
setBirthplace
(
dto
.
getPolicyholderBirthplace
());
//公司地址
infoDto
.
setCompanyAddress
(
dto
.
getPolicyholderCompanyAddress
());
//现时每月收入->现时每月收入 (HKD)(投保人信息表:现时每月收入)
infoDto
.
setCurrentMonthlyIncome
(
dto
.
getPolicyholderCurrentMonthlyIncome
());
//受雇于现职年期->工作年期(僅限數字)(投保人信息表:总工作年期)
infoDto
.
setCurrentTenure
(
dto
.
getPolicyholderTotalWorkingYears
());
//教育程度(字典)-> 教育程度 (大學或以上/大專/中學/小學或以下)(投保人信息表:教育程度(字典))
infoDto
.
setEducationLevel
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_EDUCATION
.
getItemValue
(),
ChineseTextConverter
.
traditionalToSimplified
(
dto
.
getPolicyholderEducationLevel
())));
//邮箱
infoDto
.
setEmail
(
dto
.
getPolicyholderEmail
());
//性别(字典)
//中文姓名->中文姓名
infoDto
.
setNameCn
(
dto
.
getPolicyholderName
());
//姓名-(拼音/英文,通过中文自动加载全部大写的拼音)——> 英文姓名 (同护照)
infoDto
.
setNamePyEn
(
dto
.
getPolicyholderNameEn
());
//性别(字典,如果是身份证,自动获取性别和生日)——> 性别(字典)
infoDto
.
setGender
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
SYS_GENDER
.
getItemValue
(),
dto
.
getPolicyholderGender
()));
//证件号码->身份证号码
infoDto
.
setIdNumber
(
dto
.
getPolicyholderIdNumber
());
//过往一年是否所属国家以外地区居住超过182日 TODO
// infoDto.setIsExceed();
//通讯地址
infoDto
.
setMailingAddress
(
dto
.
getPolicyholderMailingAddress
());
//婚姻状况(字典)
//婚姻情况(字典)——> 婚姻状况 (單身 / 已婚 / 離異/ 喪偶)
infoDto
.
setMaritalStatus
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_MARRIAGE
.
getItemValue
(),
ChineseTextConverter
.
traditionalToSimplified
(
dto
.
getPolicyholderMaritalStatus
())));
infoDto
.
setMobile
(
StringUtil
.
getSplitStr
(
dto
.
getPolicyholderMobile
(),
"-"
,
1
));
infoDto
.
setMobileCode
(
StringUtil
.
getSplitStr
(
dto
.
getPolicyholderMobile
(),
"-"
,
0
));
//名字->中文姓名(投保人信息表:名字)
infoDto
.
setNameCn
(
dto
.
getPolicyholderName
());
//名字-英文->英文姓名 (同护照)(投保人信息表:名字-英文)
infoDto
.
setNamePyEn
(
dto
.
getPolicyholderNameEn
());
//出生日期(生日,如果是身份证,自动获取性别和生日)——> 出生日期 (西元 年/月/日)
infoDto
.
setBirthday
(
DateUtil
.
getYMDLocalDateTime
(
dto
.
getPolicyholderBirthday
()));
//出生地 ——> 出生地 (省/市)
infoDto
.
setBirthplace
(
dto
.
getPolicyholderBirthplace
());
//国籍
infoDto
.
setNationality
(
dto
.
getPolicyholderNationality
());
//通行证号码->港澳通行证号码(投保人信息表:通行证号码)
// infoDto.setPassNo(dto.getPolicyholderPassNo());
// infoDto.setPassportNo(dto.getPolicyholderPassportNo());
//职位
infoDto
.
setPosition
(
dto
.
getPolicyholderPosition
());
//证件号码->身份证号码
infoDto
.
setIdNumber
(
dto
.
getPolicyholderIdNumber
());
//護照號碼 TODO
//通行证号码->港澳通行证号码(投保人信息表:通行证号码)TODO
//infoDto.setPassNo(dto.getPolicyholderPassNo());
//infoDto.setPassportNo(dto.getPolicyholderPassportNo());
//居住地址->永久(住宅)地址(投保人信息表:居住地址)
infoDto
.
setResidentialAddress
(
dto
.
getPolicyholderResidentialAddress
());
//通讯地址
infoDto
.
setMailingAddress
(
dto
.
getPolicyholderMailingAddress
());
//移动电话 -> 聯絡電話(手機)
infoDto
.
setMobile
(
StringUtil
.
getSplitStr
(
dto
.
getPolicyholderMobile
(),
"-"
,
1
));
infoDto
.
setMobileCode
(
StringUtil
.
getSplitStr
(
dto
.
getPolicyholderMobile
(),
"-"
,
0
));
//聯絡電話(住宅) -> 住宅电话
infoDto
.
setResidenceMobile
(
StringUtil
.
getSplitStr
(
dto
.
getPolicyholderResidenceMobile
(),
"-"
,
1
));
infoDto
.
setResidenceMobileCode
(
StringUtil
.
getSplitStr
(
dto
.
getPolicyholderResidenceMobile
(),
"-"
,
0
));
//电邮地址 ——> 邮箱
infoDto
.
setEmail
(
dto
.
getPolicyholderEmail
());
//教育程度(字典)-> 教育程度 (大學或以上/大專/中學/小學或以下)(投保人信息表:教育程度(字典))
infoDto
.
setEducationLevel
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_EDUCATION
.
getItemValue
(),
ChineseTextConverter
.
traditionalToSimplified
(
dto
.
getPolicyholderEducationLevel
())));
//公司/学校名称 ——> 公司名称
infoDto
.
setCsName
(
dto
.
getPolicyholderCompanyName
());
//总工作年期
infoDto
.
setTotalWorkingYears
(
dto
.
getPolicyholderTotalWorkingYears
());
//职位 ——> 职位及日常职务
infoDto
.
setPosition
(
dto
.
getPolicyholderPosition
());
//公司地址
infoDto
.
setCompanyAddress
(
dto
.
getPolicyholderCompanyAddress
());
//现时每月收入->现时每月收入 (HKD)(投保人信息表:现时每月收入)
infoDto
.
setCurrentMonthlyIncome
(
dto
.
getPolicyholderCurrentMonthlyIncome
());
//受雇于现职年期->工作年期(僅限數字)(投保人信息表:总工作年期)
infoDto
.
setCurrentTenure
(
dto
.
getPolicyholderTotalWorkingYears
());
//过往一年是否所属国家以外地区居住超过182日 TODO
// infoDto.setIsExceed();
return
infoDto
;
}
...
...
@@ -645,50 +651,60 @@ public class ApiExcelImportAppointmentDto {
public
static
ApiInsurantInfoDto
buildApiInsurantInfoDto
(
ApiExcelImportAppointmentDto
dto
,
ApiInsurantInfoDto
infoDto
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
//出生日期->出生日期 (西元 年/月/日)(投保人信息表:出生日期)
//与投保人关系 ——> 與投保人關系
infoDto
.
setPolicyholderRel
(
dto
.
getInsurantPolicyholderRel
());
//姓名-中文 -> 中文姓名
infoDto
.
setNameCn
(
dto
.
getInsurantName
());
//姓名-(拼音/英文,通过中文自动加载全部大写的拼音)-> 英文姓名 (同护照)
infoDto
.
setNamePyEn
(
dto
.
getInsurantNameEn
());
//性别(字典)
infoDto
.
setGender
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
SYS_GENDER
.
getItemValue
(),
dto
.
getInsurantGender
()));
//婚姻情况(字典) ——> 婚姻状况 (單身 / 已婚 / 離異/ 喪偶)
infoDto
.
setMaritalStatus
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_MARRIAGE
.
getItemValue
(),
ChineseTextConverter
.
traditionalToSimplified
(
dto
.
getInsurantMaritalStatus
())));
//出生日期 -> 出生日期 (西元 年/月/日)
infoDto
.
setBirthday
(
DateUtil
.
getYMDLocalDateTime
(
dto
.
getInsurantBirthday
()));
//出生地
//出生地
——> 出生地 (省/市)
infoDto
.
setBirthplace
(
dto
.
getInsurantBirthplace
());
//国籍
infoDto
.
setNationality
(
dto
.
getInsurantNationality
());
//证件号码 -> 身份证号码
infoDto
.
setIdNumber
(
dto
.
getInsurantIdNumber
());
//護照號碼 TODO
//通行证号码->港澳通行证号码(投保人信息表:通行证号码)TODO
//infoDto.setPassNo(dto.getInsurantPassNo());
//infoDto.setPassportNo(dto.getInsurantPassportNo());
//永久(住宅)地址-> 永久(住宅)地址(受保人信息表:居住地址)
infoDto
.
setResidentialAddress
(
dto
.
getInsurantResidentialAddress
());
//通讯地址
infoDto
.
setMailingAddress
(
dto
.
getInsurantMailingAddress
());
//移动电话 ——> 聯絡電話(手機)
infoDto
.
setMobile
(
StringUtil
.
getSplitStr
(
dto
.
getInsurantMobile
(),
"-"
,
1
));
infoDto
.
setMobileCode
(
StringUtil
.
getSplitStr
(
dto
.
getInsurantMobile
(),
"-"
,
0
));
//住宅电话 ——> 聯絡電話(住宅)
infoDto
.
setResidenceMobile
(
StringUtil
.
getSplitStr
(
dto
.
getInsurantResidenceMobile
(),
"-"
,
1
));
infoDto
.
setResidenceMobileCode
(
StringUtil
.
getSplitStr
(
dto
.
getInsurantResidenceMobile
(),
"-"
,
0
));
//邮箱 ——> 电邮地址
infoDto
.
setEmail
(
dto
.
getInsurantEmail
());
//教育程度(字典)-> 教育程度 (大學或以上/大專/中學/小學或以下)
infoDto
.
setEducationLevel
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_EDUCATION
.
getItemValue
(),
ChineseTextConverter
.
traditionalToSimplified
(
dto
.
getInsurantEducationLevel
())));
//公司/学校名称 ——> 公司名称
infoDto
.
setCsName
(
dto
.
getInsurantCompanyName
());
//总工作年期 ——> 工作年期(僅限數字)
infoDto
.
setTotalWorkingYears
(
dto
.
getInsurantTotalWorkingYears
());
//职位 ——> 职位及日常职务
infoDto
.
setPosition
(
dto
.
getInsurantPosition
());
//公司业务性质 TODO
//公司地址
infoDto
.
setCompanyAddress
(
dto
.
getInsurantCompanyAddress
());
//现时每月收入->现时每月收入 (HKD)(投保人信息表:现时每月收入)
infoDto
.
setCurrentMonthlyIncome
(
dto
.
getInsurantCurrentMonthlyIncome
());
//受雇于现职年期->工作年期(僅限數字)(投保人信息表:总工作年期)
infoDto
.
setCurrentTenure
(
dto
.
getInsurantTotalWorkingYears
());
//教育程度(字典)-> 教育程度 (大學或以上/大專/中學/小學或以下)(投保人信息表:教育程度(字典))
infoDto
.
setEducationLevel
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_EDUCATION
.
getItemValue
(),
ChineseTextConverter
.
traditionalToSimplified
(
dto
.
getInsurantEducationLevel
())));
//邮箱
infoDto
.
setEmail
(
dto
.
getInsurantEmail
());
//性别(字典)
infoDto
.
setGender
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
SYS_GENDER
.
getItemValue
(),
dto
.
getInsurantGender
()));
//证件号码->身份证号码
infoDto
.
setIdNumber
(
dto
.
getInsurantIdNumber
());
//过往一年是否所属国家以外地区居住超过182日 TODO
// infoDto.setIsExceed();
//通讯地址
infoDto
.
setMailingAddress
(
dto
.
getInsurantMailingAddress
());
//婚姻状况(字典)
infoDto
.
setMaritalStatus
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_MARRIAGE
.
getItemValue
(),
ChineseTextConverter
.
traditionalToSimplified
(
dto
.
getInsurantMaritalStatus
())));
infoDto
.
setMobile
(
StringUtil
.
getSplitStr
(
dto
.
getInsurantMobile
(),
"-"
,
1
));
infoDto
.
setMobileCode
(
StringUtil
.
getSplitStr
(
dto
.
getInsurantMobile
(),
"-"
,
0
));
//名字->中文姓名(投保人信息表:名字)
infoDto
.
setNameCn
(
dto
.
getInsurantName
());
//名字-英文->英文姓名 (同护照)(投保人信息表:名字-英文)
infoDto
.
setNamePyEn
(
dto
.
getInsurantNameEn
());
//国籍
infoDto
.
setNationality
(
dto
.
getInsurantNationality
());
//通行证号码->港澳通行证号码(投保人信息表:通行证号码)
// infoDto.setPassNo(dto.getInsurantPassNo());
// infoDto.setPassportNo(dto.getInsurantPassportNo());
//职位
infoDto
.
setPosition
(
dto
.
getInsurantPosition
());
//居住地址->永久(住宅)地址(投保人信息表:居住地址)
infoDto
.
setResidentialAddress
(
dto
.
getInsurantResidentialAddress
());
//总工作年期
infoDto
.
setTotalWorkingYears
(
dto
.
getInsurantTotalWorkingYears
());
return
infoDto
;
}
...
...
@@ -701,20 +717,20 @@ public class ApiExcelImportAppointmentDto {
public
static
ApiSecondHolderInfoDto
buildApiSecondHolderInfoDto
(
ApiExcelImportAppointmentDto
dto
,
ApiSecondHolderInfoDto
infoDto
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
//出生日期
//姓名-中文 ——> 中文姓名
infoDto
.
setNameCn
(
dto
.
getSecondHolderName
());
//姓名-(拼音/英文,通过中文自动加载全部大写的拼音) ——> 英文姓名 (同护照)
infoDto
.
setNamePyEn
(
dto
.
getSecondHolderNameEn
());
//出生日期 ——> 出生日期 (西元 年/月/日)
infoDto
.
setBirthday
(
DateUtil
.
getYMDLocalDateTime
(
dto
.
getSecondHolderBirthTime
()));
//身份证号码
infoDto
.
setIdNumber
(
dto
.
getSecondHolderIdNumber
());
//性别(字典)
infoDto
.
setGender
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
SYS_GENDER
.
getItemValue
(),
dto
.
getSecondHolderGender
()));
//身份证号码
infoDto
.
setIdNumber
(
dto
.
getSecondHolderIdNumber
());
//与受保人关系(字典)
infoDto
.
setInsurantRel
(
GetDictItemListByDictTypeResponse
.
getItemValue
(
dictTypeResponses
,
DictTypeEnum
.
CSF_AP_REL
.
getItemValue
(),
ChineseTextConverter
.
traditionalToSimplified
(
dto
.
getSecondHolderInsurantRel
())));
//名字
infoDto
.
setNameCn
(
dto
.
getSecondHolderName
());
//名字-英文
infoDto
.
setNamePyEn
(
dto
.
getSecondHolderNameEn
());
return
infoDto
;
}
...
...
@@ -725,14 +741,11 @@ public class ApiExcelImportAppointmentDto {
* @return
*/
public
static
List
<
ApiBeneficiaryInfoDto
>
buildApiBeneficiaryInfoDtoList
(
List
<
ApiExcelImportBeneficiaryDto
>
dtoList
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
,
String
appointmentBizId
)
{
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
List
<
ApiBeneficiaryInfoDto
>
infoDtoList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
dtoList
))
{
infoDtoList
=
dtoList
.
stream
().
map
(
dto
->
{
ApiBeneficiaryInfoDto
infoDto
=
new
ApiBeneficiaryInfoDto
();
infoDto
.
setBeneficiaryBizId
(
RandomStringGenerator
.
generateBizId16
(
CommonEnum
.
UID_TYPE_BENEFICIARY
.
getCode
()));
infoDto
.
setAppointmentBizId
(
appointmentBizId
);
//受益比例
infoDto
.
setBenefitRatio
(
dto
.
getBeneficiaryBenefitRatio
());
//出生日期
...
...
@@ -756,18 +769,15 @@ public class ApiExcelImportAppointmentDto {
* 构造附加计划(附加险)列表
* @param dtoList
* @param dictTypeResponses
* @param planBizId
* @return
*/
public
static
List
<
ApiProductPlanAdditionalInfoDto
>
buildApiProductPlanAdditionalInfoDto
(
List
<
ApiExcelImportAdditionalDto
>
dtoList
,
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
,
String
planBizId
)
{
List
<
GetDictItemListByDictTypeResponse
>
dictTypeResponses
)
{
List
<
ApiProductPlanAdditionalInfoDto
>
infoDtoList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
dtoList
))
{
infoDtoList
=
dtoList
.
stream
().
map
(
dto
->
{
ApiProductPlanAdditionalInfoDto
infoDto
=
new
ApiProductPlanAdditionalInfoDto
();
infoDto
.
setAdditionalBizId
(
RandomStringGenerator
.
generateBizId16
(
CommonEnum
.
UID_TYPE_ADDITIONAL
.
getCode
()));
infoDto
.
setPlanBizId
(
planBizId
);
//产品上架信息表唯一业务ID TODO
//保险附加产品名称
infoDto
.
setProductLaunchName
(
dto
.
getAddProductName
());
//保费
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/response/appointmentfile/ApiAppointmentImportExcelResponse.java
View file @
e0a896ec
package
com
.
yd
.
csf
.
feign
.
response
.
appointmentfile
;
import
com.yd.csf.feign.dto.appointment.*
;
import
lombok.Data
;
@Data
public
class
ApiAppointmentImportExcelResponse
{
/**
* 预约信息(包含签约信息)
*/
private
ApiAppointmentInfoDto
apiAppointmentInfoDto
;
/**
* 产品计划信息
*/
private
ApiProductPlanInfoDto
apiProductPlanInfoDto
;
/**
* 投保人信息
*/
private
ApiPolicyholderInfoDto
apiPolicyholderInfoDto
;
/**
* 受保人信息
*/
private
ApiInsurantInfoDto
apiInsurantInfoDto
;
/**
* 受益人封装对象
*/
private
ApiBeneficiaryInfoFzDto
apiBeneficiaryInfoFzDto
;
/**
* 第二持有人信息
*/
private
ApiSecondHolderInfoDto
apiSecondHolderInfoDto
;
}
yd-csf-service/src/main/java/com/yd/csf/service/dto/CommissionAddRequest.java
View file @
e0a896ec
...
...
@@ -75,7 +75,7 @@ public class CommissionAddRequest implements Serializable {
private
String
currency
;
/**
*
结算
汇率
*
页面输入的结算汇率:保费币种对实际结算币种的
汇率
*/
@Schema
(
description
=
"结算汇率"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
private
BigDecimal
exchangeRate
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/enums/PolicyFollowStatusEnum.java
View file @
e0a896ec
...
...
@@ -17,6 +17,7 @@ public enum PolicyFollowStatusEnum {
DELAYED_UNDERWRITING
(
"延缓承保"
,
"DELAY_UNDERWRITING"
),
LAPSED
(
"失效"
,
"FAILURE"
),
CLOSED
(
"关闭"
,
"CLOSE"
),
QX_YY
(
"取消预约"
,
"QX_YY"
),
;
//字典项标签(名称)
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/CommissionExpected.java
View file @
e0a896ec
...
...
@@ -131,7 +131,7 @@ public class CommissionExpected implements Serializable {
private
String
statusDesc
;
/**
*
默认结算
汇率
*
保单币种对结算币种的
汇率
*/
private
BigDecimal
defaultExchangeRate
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/ProductPlan.java
View file @
e0a896ec
...
...
@@ -57,6 +57,18 @@ public class ProductPlan implements Serializable {
private
String
companyName
;
/**
* 出单经纪公司(对账公司)ID
*/
@TableField
(
"reconciliation_company_id"
)
private
String
reconciliationCompanyId
;
/**
* 出单经纪公司(对账公司)名称
*/
@TableField
(
"reconciliation_company_name"
)
private
String
reconciliationCompanyName
;
/**
* 保险险种ID(产品上架信息绑定的保险险种参数)
*/
@TableField
(
"insurance_type_id"
)
...
...
@@ -141,6 +153,12 @@ public class ProductPlan implements Serializable {
private
Integer
isPrepay
;
/**
* 预缴年期
*/
@TableField
(
"prepayment_period"
)
private
Integer
prepaymentPeriod
;
/**
* 是否追溯: 0-否, 1-是(字典)
*/
@TableField
(
"is_traceable"
)
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/PolicyFollowService.java
View file @
e0a896ec
...
...
@@ -88,4 +88,6 @@ public interface PolicyFollowService extends IService<PolicyFollow> {
Page
<
PolicyNumberResponseVO
>
queryPolicyNumbers
(
PolicyNosQueryRequest
policyNosQueryRequest
);
List
<
PolicyFollow
>
queryList
(
List
<
String
>
policyNoList
);
List
<
PolicyFollow
>
queryListByAppointmentBizId
(
String
appointmentBizId
);
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
View file @
e0a896ec
...
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yd.base.feign.client.exchangerate.ApiExchangeRateFeignClient
;
import
com.yd.common.constant.CommonConstant
;
import
com.yd.common.constant.RedisConstants
;
import
com.yd.common.enums.ResultCode
;
...
...
@@ -42,6 +43,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.time.LocalDate
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
@@ -72,6 +74,8 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
private
ApiAnnouncementCommissionRatioFeignClient
apiAnnouncementCommissionRatioFeignClient
;
@Resource
private
RedisUtil
redisUtil
;
@Resource
private
ApiExchangeRateFeignClient
apiExchangeRateFeignClient
;
@Override
...
...
@@ -531,13 +535,14 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
commissionExpected
.
setCommissionDate
(
calculateCommissionDate
(
item
.
getEndPeriod
(),
effectiveDate
));
commissionExpected
.
setStatus
(
CommissionExpectedStatusEnum
.
PENDING
.
getItemValue
());
commissionExpected
.
setStatusDesc
(
null
);
commissionExpected
.
setDefaultExchangeRate
(
query
DefaultExchangeRate
(
item
.
getCurrency
()));
commissionExpected
.
setDefaultExchangeRate
(
query
ExchangeRateByFeign
(
policy
.
getCurrency
(),
item
.
getCurrency
()));
commissionExpected
.
setExpectedAmount
(
calculateExpectedAmount
(
paymentPremium
,
item
.
getCommissionRate
(),
"R"
,
null
,
item
.
getCurrency
(),
policy
.
getCurrency
(),
commissionExpected
.
getDefaultExchangeRate
()));
commissionExpected
.
setPaidAmount
(
BigDecimal
.
ZERO
);
commissionExpected
.
setPaidRatio
(
BigDecimal
.
ZERO
);
...
...
@@ -579,17 +584,31 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
return
false
;
}
/**
* 计算预计来佣港币金额
* @param premium 保费
* @param commissionRatio 佣金比例
* @param commissionBizType 佣金业务类型
* @param amount 金额
* @param currency 预计来佣的结算币种=产品绑定的来佣结算币种
* @param policyCurrency 保单币种
* @param defaultExchangeRate 默认结算汇率
* @return 预计来佣金额
*/
private
BigDecimal
calculateExpectedAmount
(
BigDecimal
premium
,
BigDecimal
commissionRatio
,
String
commissionBizType
,
BigDecimal
amount
,
String
currency
,
BigDecimal
defaultExchangeRate
)
{
BigDecimal
amount
,
String
currency
,
String
policyCurrency
,
BigDecimal
defaultExchangeRate
)
{
if
(
"R"
.
equals
(
commissionBizType
))
{
// 关联保单应收单:保费 × 佣金比例 × 默认结算汇率 ÷ 100
BigDecimal
exchangeRate
=
defaultExchangeRate
;
BigDecimal
exchangeRateHkd
=
queryDefaultExchangeRate
(
currency
);
if
(
exchangeRate
==
null
)
{
exchangeRate
=
queryDefaultExchangeRate
(
currency
);
// 这里获取保单币种对预计来佣的结算币种的默认汇率
exchangeRate
=
queryExchangeRateByFeign
(
policyCurrency
,
currency
);
}
return
premium
.
multiply
(
commissionRatio
)
.
multiply
(
exchangeRate
)
.
multiply
(
exchangeRateHkd
)
.
divide
(
BigDecimal
.
valueOf
(
100
),
4
,
RoundingMode
.
HALF_UP
);
}
else
{
// 非关联保单应收单:金额 × 默认结算汇率
...
...
@@ -602,6 +621,21 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
}
/**
* 保单币种对预计来佣的结算币种的默认汇率
* @param policyCurrency 保单币种
* @param currency 预计来佣的结算币种
* @return 汇率
*/
private
BigDecimal
queryExchangeRateByFeign
(
String
policyCurrency
,
String
currency
)
{
// 调用Feign客户端查询汇率
Result
<
BigDecimal
>
result
=
apiExchangeRateFeignClient
.
getExchangeRate
(
policyCurrency
,
currency
,
""
);
if
(
result
!=
null
&&
result
.
getData
()
!=
null
)
{
return
result
.
getData
();
}
return
null
;
}
/**
* 根据保单生效日期和佣金期数计算预计来佣日期,首期为保单生效日次月,后续期数为首期的次年
* @param endPeriod 佣金期数
* @param effectiveDate 保单生效日期
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
View file @
e0a896ec
...
...
@@ -859,6 +859,14 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
return
list
;
}
@Override
public
List
<
PolicyFollow
>
queryListByAppointmentBizId
(
String
appointmentBizId
)
{
List
<
PolicyFollow
>
list
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
PolicyFollow
>()
.
eq
(
StringUtils
.
isNotBlank
(
appointmentBizId
),
PolicyFollow:
:
getAppointmentBizId
,
appointmentBizId
)
);
return
list
;
}
/**
* 转换为保单号查询响应视图
*
...
...
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