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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
417 additions
and
45 deletions
+417
-45
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
+0
-0
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
+0
-0
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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
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