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
aef66dfa
Commit
aef66dfa
authored
Mar 18, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into prod
parents
3ea990f6
bf4d74a1
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
167 additions
and
106 deletions
+167
-106
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiCustomerController.java
+3
-2
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiFortuneController.java
+2
-6
yd-csf-api/src/main/java/com/yd/csf/api/dto/GenerateExpectedFortuneDto.java
+5
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
+2
-2
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiCsfCommonServiceImpl.java
+25
-2
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
+5
-2
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiInsurantServiceImpl.java
+6
-1
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiPremiumReconciliationServiceImpl.java
+2
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiAppointmentInfoDto.java
+5
-5
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiBeneficiaryInfoDto.java
+1
-1
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiInsurantInfoDto.java
+14
-14
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiPolicyholderInfoDto.java
+3
-3
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiProductPlanMainInfoDto.java
+1
-1
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiSecondHolderInfoDto.java
+1
-1
yd-csf-feign/src/main/java/com/yd/csf/feign/request/appointment/ApiAppointmentEditConfirmTimeRequest.java
+1
-1
yd-csf-feign/src/main/java/com/yd/csf/feign/request/appointment/ApiAppointmentPageRequest.java
+2
-2
yd-csf-feign/src/main/java/com/yd/csf/feign/request/commissionruleconfig/ApiCommissionRuleConfigAddRequest.java
+2
-2
yd-csf-feign/src/main/java/com/yd/csf/feign/request/commissionruleconfig/ApiCommissionRuleConfigEditRequest.java
+2
-2
yd-csf-feign/src/main/java/com/yd/csf/feign/request/policyreceipt/ApiPolicyReceiptAddRequest.java
+1
-1
yd-csf-feign/src/main/java/com/yd/csf/feign/request/policyreceipt/ApiPolicyReceiptEditRequest.java
+1
-1
yd-csf-feign/src/main/java/com/yd/csf/feign/request/premiumreconciliation/ApiPremiumReconciliationResultEditRequest.java
+4
-4
yd-csf-service/src/main/java/com/yd/csf/service/dto/CustomerAddRequest.java
+7
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/CustomerUpdateRequest.java
+2
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/PolicyFollowDto.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/service/CustomerService.java
+2
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
+4
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionServiceImpl.java
+5
-1
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerServiceImpl.java
+21
-6
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneAccountServiceImpl.java
+3
-2
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
+27
-30
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
+1
-3
yd-csf-service/src/main/java/com/yd/csf/service/vo/CommissionVO.java
+4
-4
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
+2
-6
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiCustomerController.java
View file @
aef66dfa
...
@@ -23,6 +23,7 @@ import io.swagger.v3.oas.annotations.Operation;
...
@@ -23,6 +23,7 @@ import io.swagger.v3.oas.annotations.Operation;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -58,7 +59,7 @@ public class ApiCustomerController {
...
@@ -58,7 +59,7 @@ public class ApiCustomerController {
*/
*/
@Operation
(
summary
=
"创建客户"
)
@Operation
(
summary
=
"创建客户"
)
@PostMapping
(
"/add"
)
@PostMapping
(
"/add"
)
public
Result
<
Map
<
String
,
Object
>>
addCustomer
(
@RequestBody
CustomerAddRequest
customerAddRequest
,
HttpServletRequest
request
)
{
public
Result
<
Map
<
String
,
Object
>>
addCustomer
(
@
Validated
@
RequestBody
CustomerAddRequest
customerAddRequest
,
HttpServletRequest
request
)
{
if
(
customerAddRequest
==
null
)
{
if
(
customerAddRequest
==
null
)
{
return
Result
.
fail
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
ResultCode
.
PARAMS_ERROR
.
getMessage
());
return
Result
.
fail
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
ResultCode
.
PARAMS_ERROR
.
getMessage
());
}
}
...
@@ -134,7 +135,7 @@ public class ApiCustomerController {
...
@@ -134,7 +135,7 @@ public class ApiCustomerController {
*/
*/
@PostMapping
(
"/update"
)
@PostMapping
(
"/update"
)
@Operation
(
summary
=
"更新客户信息"
)
@Operation
(
summary
=
"更新客户信息"
)
public
Result
<
Boolean
>
updateCustomer
(
@RequestBody
CustomerUpdateRequest
customerUpdateRequest
)
{
public
Result
<
Boolean
>
updateCustomer
(
@
Validated
@
RequestBody
CustomerUpdateRequest
customerUpdateRequest
)
{
String
customerBizId
=
customerUpdateRequest
.
getCustomerBizId
();
String
customerBizId
=
customerUpdateRequest
.
getCustomerBizId
();
if
(
ObjectUtils
.
isEmpty
(
customerBizId
))
{
if
(
ObjectUtils
.
isEmpty
(
customerBizId
))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"customerBizId不能为空"
);
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"customerBizId不能为空"
);
...
...
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiFortuneController.java
View file @
aef66dfa
...
@@ -37,10 +37,7 @@ import javax.annotation.Resource;
...
@@ -37,10 +37,7 @@ import javax.annotation.Resource;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -529,8 +526,7 @@ public class ApiFortuneController {
...
@@ -529,8 +526,7 @@ public class ApiFortuneController {
// 查询列表数据
// 查询列表数据
QueryWrapper
<
Fortune
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
Fortune
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"expected_fortune_biz_id"
,
fortuneQueryRequest
.
getExpectedFortuneBizId
());
queryWrapper
.
eq
(
"expected_fortune_biz_id"
,
fortuneQueryRequest
.
getExpectedFortuneBizId
());
queryWrapper
.
eq
(
"status"
,
FortuneStatusEnum
.
SENT
.
getItemValue
());
queryWrapper
.
in
(
"status"
,
Arrays
.
asList
(
FortuneStatusEnum
.
CHECKED
.
getItemValue
(),
FortuneStatusEnum
.
SENT
.
getItemValue
()));
queryWrapper
.
or
().
eq
(
"status"
,
FortuneStatusEnum
.
CHECKED
.
getItemValue
());
Page
<
Fortune
>
fortunePage
=
fortuneService
.
page
(
new
Page
<>(
current
,
size
),
Page
<
Fortune
>
fortunePage
=
fortuneService
.
page
(
new
Page
<>(
current
,
size
),
queryWrapper
);
queryWrapper
);
// 组装返回值
// 组装返回值
...
...
yd-csf-api/src/main/java/com/yd/csf/api/dto/GenerateExpectedFortuneDto.java
View file @
aef66dfa
...
@@ -16,6 +16,11 @@ import java.util.List;
...
@@ -16,6 +16,11 @@ import java.util.List;
public
class
GenerateExpectedFortuneDto
{
public
class
GenerateExpectedFortuneDto
{
/**
/**
* 来源 1-销售佣金 2-非销售佣金
*/
private
Integer
source
;
/**
* 保单发佣批次ID
* 保单发佣批次ID
*/
*/
private
String
batchBizId
;
private
String
batchBizId
;
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAppointmentServiceImpl.java
View file @
aef66dfa
...
@@ -679,13 +679,13 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
...
@@ -679,13 +679,13 @@ public class ApiAppointmentServiceImpl implements ApiAppointmentService {
// 保單持有人
// 保單持有人
if
(
apiPolicyholderInfoDto
!=
null
)
{
if
(
apiPolicyholderInfoDto
!=
null
)
{
follow
.
setPolicyHolder
(
apiPolicyholderInfoDto
.
getNameC
n
());
follow
.
setPolicyHolder
(
StringUtils
.
isNotBlank
(
apiPolicyholderInfoDto
.
getNameCn
())
?
apiPolicyholderInfoDto
.
getNameCn
()
:
apiPolicyholderInfoDto
.
getNamePyE
n
());
}
}
// 受保人信息
// 受保人信息
if
(!
Objects
.
isNull
(
apiInsurantInfoDto
))
{
if
(!
Objects
.
isNull
(
apiInsurantInfoDto
))
{
// 受保人
// 受保人
follow
.
setInsured
(
apiInsurantInfoDto
.
getNameC
n
());
follow
.
setInsured
(
StringUtils
.
isNotBlank
(
apiInsurantInfoDto
.
getNameCn
())
?
apiInsurantInfoDto
.
getNameCn
()
:
apiInsurantInfoDto
.
getNamePyE
n
());
// 受保人业务id
// 受保人业务id
follow
.
setInsuredBizId
(
apiInsurantInfoDto
.
getInsurantBizId
());
follow
.
setInsuredBizId
(
apiInsurantInfoDto
.
getInsurantBizId
());
// 受保人与保單持有人关系
// 受保人与保單持有人关系
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiCsfCommonServiceImpl.java
View file @
aef66dfa
...
@@ -229,16 +229,26 @@ public class ApiCsfCommonServiceImpl implements ApiCsfCommonService {
...
@@ -229,16 +229,26 @@ public class ApiCsfCommonServiceImpl implements ApiCsfCommonService {
LocalDate
currentDate
=
LocalDate
.
now
();
LocalDate
currentDate
=
LocalDate
.
now
();
if
(
birthDate
.
isAfter
(
currentDate
))
{
if
(
birthDate
.
isAfter
(
currentDate
))
{
throw
new
IllegalArgumentException
(
"生日日期不能
晚
于当前日期"
);
throw
new
IllegalArgumentException
(
"生日日期不能
大
于当前日期"
);
}
}
Period
period
=
Period
.
between
(
birthDate
,
currentDate
);
Period
period
=
Period
.
between
(
birthDate
,
currentDate
);
return
String
.
valueOf
(
period
.
getYears
());
return
String
.
valueOf
(
period
.
getYears
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
IllegalArgumentException
(
"生日格式不正确,应为yyyy-MM-dd格式"
);
// throw new IllegalArgumentException("生日格式不正确,应为yyyy-MM-dd格式");
throw
new
IllegalArgumentException
(
e
.
getMessage
());
}
}
}
}
public
static
void
main
(
String
[]
args
)
{
ApiCsfCommonServiceImpl
commonService
=
new
ApiCsfCommonServiceImpl
();
ApiCsfCalculateRequest
request
=
new
ApiCsfCalculateRequest
();
request
.
setRequestValue
(
"310111202603191111"
);
request
.
setCalculateType
(
6
);
Result
<
List
<
ApiCsfCalculateResponse
>>
result
=
commonService
.
calculate
(
request
);
System
.
out
.
println
(
result
);
}
/**
/**
* 身高和体重计算BMI指数
* 身高和体重计算BMI指数
* @param requestValueList
* @param requestValueList
...
@@ -283,18 +293,31 @@ public class ApiCsfCommonServiceImpl implements ApiCsfCommonService {
...
@@ -283,18 +293,31 @@ public class ApiCsfCommonServiceImpl implements ApiCsfCommonService {
format
.
setToneType
(
HanyuPinyinToneType
.
WITHOUT_TONE
);
format
.
setToneType
(
HanyuPinyinToneType
.
WITHOUT_TONE
);
StringBuilder
pinyin
=
new
StringBuilder
();
StringBuilder
pinyin
=
new
StringBuilder
();
boolean
lastIsChinese
=
false
;
// 标记上一个字符是否为汉字,用于控制空格添加
for
(
char
c
:
chinese
.
toCharArray
())
{
for
(
char
c
:
chinese
.
toCharArray
())
{
if
(
Character
.
toString
(
c
).
matches
(
"[\\u4E00-\\u9FA5]"
))
{
if
(
Character
.
toString
(
c
).
matches
(
"[\\u4E00-\\u9FA5]"
))
{
try
{
try
{
String
[]
pinyinArray
=
PinyinHelper
.
toHanyuPinyinStringArray
(
c
,
format
);
String
[]
pinyinArray
=
PinyinHelper
.
toHanyuPinyinStringArray
(
c
,
format
);
if
(
pinyinArray
!=
null
&&
pinyinArray
.
length
>
0
)
{
if
(
pinyinArray
!=
null
&&
pinyinArray
.
length
>
0
)
{
// 如果上一个字符是汉字且当前也是汉字,则先加空格(避免开头空格)
if
(
lastIsChinese
)
{
pinyin
.
append
(
' '
);
}
pinyin
.
append
(
pinyinArray
[
0
]);
pinyin
.
append
(
pinyinArray
[
0
]);
lastIsChinese
=
true
;
}
else
{
// 如果没有拼音,原样追加
pinyin
.
append
(
c
);
lastIsChinese
=
false
;
}
}
}
catch
(
BadHanyuPinyinOutputFormatCombination
e
)
{
}
catch
(
BadHanyuPinyinOutputFormatCombination
e
)
{
pinyin
.
append
(
c
);
pinyin
.
append
(
c
);
lastIsChinese
=
false
;
}
}
}
else
{
}
else
{
pinyin
.
append
(
c
);
pinyin
.
append
(
c
);
lastIsChinese
=
false
;
}
}
}
}
return
pinyin
.
toString
();
return
pinyin
.
toString
();
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
View file @
aef66dfa
...
@@ -643,6 +643,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -643,6 +643,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
.
productLaunchBizId
(
brokerDto
.
getPlanBizId
())
.
productLaunchBizId
(
brokerDto
.
getPlanBizId
())
//保险公司业务id
//保险公司业务id
.
insuranceCompanyBizId
(
brokerDto
.
getInsuranceCompanyBizId
())
.
insuranceCompanyBizId
(
brokerDto
.
getInsuranceCompanyBizId
())
.
source
(
2
)
.
build
());
.
build
());
return
Result
.
success
();
return
Result
.
success
();
...
@@ -717,6 +718,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -717,6 +718,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
.
productLaunchBizId
(
brokerDto
.
getPlanBizId
())
.
productLaunchBizId
(
brokerDto
.
getPlanBizId
())
//保险公司业务id
//保险公司业务id
.
insuranceCompanyBizId
(
brokerDto
.
getInsuranceCompanyBizId
())
.
insuranceCompanyBizId
(
brokerDto
.
getInsuranceCompanyBizId
())
.
source
(
1
)
.
build
());
.
build
());
return
Result
.
success
();
return
Result
.
success
();
...
@@ -734,8 +736,9 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -734,8 +736,9 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
if
(!
CollectionUtils
.
isEmpty
(
fortuneDto
.
getAlgorithmResDtoList
()))
{
if
(!
CollectionUtils
.
isEmpty
(
fortuneDto
.
getAlgorithmResDtoList
()))
{
//获得积分业务员绑定的基本法列表对应计算值结果集合
//获得积分业务员绑定的基本法列表对应计算值结果集合
for
(
AlgorithmResDto
algorithmResDto
:
fortuneDto
.
getAlgorithmResDtoList
())
{
for
(
AlgorithmResDto
algorithmResDto
:
fortuneDto
.
getAlgorithmResDtoList
())
{
if
(
Objects
.
isNull
(
algorithmResDto
.
getCalculatedValue
())
if
(
fortuneDto
.
getSource
()
==
2
&&
(
Objects
.
isNull
(
algorithmResDto
.
getCalculatedValue
())
||
algorithmResDto
.
getCalculatedValue
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
||
algorithmResDto
.
getCalculatedValue
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
))
{
//2-非销售佣金并且计算金额为0,走这里
//判空判0
//判空判0
continue
;
continue
;
}
}
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiInsurantServiceImpl.java
View file @
aef66dfa
package
com
.
yd
.
csf
.
api
.
service
.
impl
;
package
com
.
yd
.
csf
.
api
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.yd.base.feign.client.relobjectcertificate.ApiRelObjectCertificateFeignClient
;
import
com.yd.base.feign.client.relobjectcertificate.ApiRelObjectCertificateFeignClient
;
import
com.yd.base.feign.dto.ApiCertificateDto
;
import
com.yd.base.feign.dto.ApiCertificateDto
;
import
com.yd.base.feign.request.relobjectcertificate.ApiRelObjectCertificateListAddRequest
;
import
com.yd.base.feign.request.relobjectcertificate.ApiRelObjectCertificateListAddRequest
;
...
@@ -235,15 +236,19 @@ public class ApiInsurantServiceImpl implements ApiInsurantService {
...
@@ -235,15 +236,19 @@ public class ApiInsurantServiceImpl implements ApiInsurantService {
Result
<
Insurant
>
result
=
checkInsurantIsExist
(
dto
.
getInsurantBizId
());
Result
<
Insurant
>
result
=
checkInsurantIsExist
(
dto
.
getInsurantBizId
());
//受保人信息信息
//受保人信息信息
Insurant
insurant
=
result
.
getData
();
Insurant
insurant
=
result
.
getData
();
Long
insurantId
=
insurant
.
getId
();
//与投保人关系
//与投保人关系
if
(
RelTypeEnum
.
MYSELF
.
getItemValue
().
equals
(
dto
.
getPolicyholderRel
()))
{
if
(
RelTypeEnum
.
MYSELF
.
getItemValue
().
equals
(
dto
.
getPolicyholderRel
()))
{
//与投保人关系如果是本人,直接查询投保人信息表更新数据到受保人信息表中
//与投保人关系如果是本人,直接查询投保人信息表更新数据到受保人信息表中
Policyholder
policyholder
=
iPolicyholderService
.
queryOne
(
appointmentBizId
,
""
);
Policyholder
policyholder
=
iPolicyholderService
.
queryOne
(
appointmentBizId
,
""
);
if
(!
Objects
.
isNull
(
policyholder
))
{
if
(!
Objects
.
isNull
(
policyholder
))
{
log
.
info
(
"与投保人关系如果是本人,直接查询投保人信息表更新数据到受保人信息表中之前result.getData(),{}"
,
JSON
.
toJSONString
(
result
));
log
.
info
(
"与投保人关系如果是本人,直接查询投保人信息表更新数据到受保人信息表中之前,{}"
,
JSON
.
toJSONString
(
insurant
));
BeanUtils
.
copyProperties
(
policyholder
,
insurant
);
BeanUtils
.
copyProperties
(
policyholder
,
insurant
);
insurant
.
setId
(
result
.
getData
().
getId
()
);
insurant
.
setId
(
insurantId
);
insurant
.
setAppointmentBizId
(
appointmentBizId
);
insurant
.
setAppointmentBizId
(
appointmentBizId
);
log
.
info
(
"与投保人关系如果是本人,直接查询投保人信息表更新数据到受保人信息表中之后,{}"
,
JSON
.
toJSONString
(
insurant
));
iInsurantService
.
saveOrUpdate
(
insurant
);
iInsurantService
.
saveOrUpdate
(
insurant
);
//查询投保人税务列表信息
//查询投保人税务列表信息
...
...
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiPremiumReconciliationServiceImpl.java
View file @
aef66dfa
...
@@ -1171,6 +1171,7 @@ public class ApiPremiumReconciliationServiceImpl implements ApiPremiumReconcilia
...
@@ -1171,6 +1171,7 @@ public class ApiPremiumReconciliationServiceImpl implements ApiPremiumReconcilia
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
editResult
(
ApiPremiumReconciliationResultEditRequest
request
)
{
public
Result
editResult
(
ApiPremiumReconciliationResultEditRequest
request
)
{
log
.
info
(
"设置认定结果-保费对账记录信息前effectiveDate生效日期:{}"
,
request
.
getEffectiveDate
());
// 通过 RequestContextHolder 获取 HttpServletRequest
// 通过 RequestContextHolder 获取 HttpServletRequest
HttpServletRequest
httpServletRequest
=
((
ServletRequestAttributes
)
HttpServletRequest
httpServletRequest
=
((
ServletRequestAttributes
)
RequestContextHolder
.
currentRequestAttributes
()).
getRequest
();
RequestContextHolder
.
currentRequestAttributes
()).
getRequest
();
...
@@ -1212,6 +1213,7 @@ public class ApiPremiumReconciliationServiceImpl implements ApiPremiumReconcilia
...
@@ -1212,6 +1213,7 @@ public class ApiPremiumReconciliationServiceImpl implements ApiPremiumReconcilia
//遍历保单转介人列表信息 -> 调用基本法算出预计发佣列表
//遍历保单转介人列表信息 -> 调用基本法算出预计发佣列表
// 通过代理对象调用
// 通过代理对象调用
// getSelf().execute(statusRequest,token);
// getSelf().execute(statusRequest,token);
log
.
info
(
"changePolicyFollowStatus前effectiveDate生效日期:{}"
,
statusRequest
.
getEffectiveDate
());
Result
<
Boolean
>
result1
=
changePolicyFollowStatus
(
statusRequest
,
token
);
Result
<
Boolean
>
result1
=
changePolicyFollowStatus
(
statusRequest
,
token
);
if
(
result1
.
getCode
()
!=
200
)
{
if
(
result1
.
getCode
()
!=
200
)
{
throw
new
BusinessException
(
result1
.
getMsg
());
throw
new
BusinessException
(
result1
.
getMsg
());
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiAppointmentInfoDto.java
View file @
aef66dfa
...
@@ -68,19 +68,19 @@ public class ApiAppointmentInfoDto {
...
@@ -68,19 +68,19 @@ public class ApiAppointmentInfoDto {
* 签单日
* 签单日
*/
*/
@NotNull
(
message
=
"签约信息-签单日不能为空"
)
@NotNull
(
message
=
"签约信息-签单日不能为空"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
signDate
;
private
LocalDateTime
signDate
;
/**
/**
* 到港时间
* 到港时间
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
arrivalTime
;
private
LocalDateTime
arrivalTime
;
/**
/**
* 离港时间
* 离港时间
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
departureTime
;
private
LocalDateTime
departureTime
;
/**
/**
...
@@ -126,13 +126,13 @@ public class ApiAppointmentInfoDto {
...
@@ -126,13 +126,13 @@ public class ApiAppointmentInfoDto {
/**
/**
* 开户时间段(开始)
* 开户时间段(开始)
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
openAccountStartTime
;
private
LocalDateTime
openAccountStartTime
;
/**
/**
* 开户时间段(结束)
* 开户时间段(结束)
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
openAccountEndTime
;
private
LocalDateTime
openAccountEndTime
;
/**
/**
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiBeneficiaryInfoDto.java
View file @
aef66dfa
...
@@ -59,7 +59,7 @@ public class ApiBeneficiaryInfoDto {
...
@@ -59,7 +59,7 @@ public class ApiBeneficiaryInfoDto {
/**
/**
* 出生日期(生日,如果是身份证,自动获取性别和生日)
* 出生日期(生日,如果是身份证,自动获取性别和生日)
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
birthday
;
private
LocalDateTime
birthday
;
/**
/**
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiInsurantInfoDto.java
View file @
aef66dfa
...
@@ -49,8 +49,8 @@ public class ApiInsurantInfoDto {
...
@@ -49,8 +49,8 @@ public class ApiInsurantInfoDto {
/**
/**
* 姓名-中文
* 姓名-中文
*/
*/
@NotBlank
(
message
=
"受保人-姓名(中文)不能为空"
,
groups
=
GroupValid
.
NotSelf
.
class
)
//
@NotBlank(message = "受保人-姓名(中文)不能为空", groups = GroupValid.NotSelf.class)
@Pattern
(
regexp
=
"^
[\u4e00-\u9fa5]{2,6}
$"
,
message
=
"受保人-姓名(中文)必须为2-6位汉字"
,
groups
=
GroupValid
.
NotSelf
.
class
)
@Pattern
(
regexp
=
"^
(|[\u4e00-\u9fa5]{2,6})
$"
,
message
=
"受保人-姓名(中文)必须为2-6位汉字"
,
groups
=
GroupValid
.
NotSelf
.
class
)
private
String
nameCn
;
private
String
nameCn
;
/**
/**
...
@@ -79,19 +79,19 @@ public class ApiInsurantInfoDto {
...
@@ -79,19 +79,19 @@ public class ApiInsurantInfoDto {
* 出生日期(生日,如果是身份证,自动获取性别和生日)
* 出生日期(生日,如果是身份证,自动获取性别和生日)
*/
*/
@NotNull
(
message
=
"受保人-生日不能为空"
,
groups
=
GroupValid
.
NotSelf
.
class
)
@NotNull
(
message
=
"受保人-生日不能为空"
,
groups
=
GroupValid
.
NotSelf
.
class
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
birthday
;
private
LocalDateTime
birthday
;
@AssertTrue
(
message
=
"受保人-必须大于18周岁"
,
groups
=
GroupValid
.
NotSelf
.
class
)
//
@AssertTrue(message = "受保人-必须大于18周岁", groups = GroupValid.NotSelf.class)
public
boolean
isBirthdayValid
()
{
//
public boolean isBirthdayValid() {
if
(
birthday
==
null
)
{
//
if (birthday == null) {
// @NotNull 会处理空值
//
// @NotNull 会处理空值
return
true
;
//
return true;
}
//
}
LocalDateTime
now
=
LocalDateTime
.
now
();
//
LocalDateTime now = LocalDateTime.now();
// 计算年龄
//
// 计算年龄
int
age
=
Period
.
between
(
birthday
.
toLocalDate
(),
now
.
toLocalDate
()).
getYears
();
//
int age = Period.between(birthday.toLocalDate(), now.toLocalDate()).getYears();
return
age
>
18
;
//
return age > 18;
}
//
}
/**
/**
* 年龄(通过生日自动获取年龄)
* 年龄(通过生日自动获取年龄)
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiPolicyholderInfoDto.java
View file @
aef66dfa
...
@@ -42,8 +42,8 @@ public class ApiPolicyholderInfoDto {
...
@@ -42,8 +42,8 @@ public class ApiPolicyholderInfoDto {
/**
/**
* 姓名-中文
* 姓名-中文
*/
*/
@NotBlank
(
message
=
"投保人-姓名(中文)不能为空"
)
//
@NotBlank(message = "投保人-姓名(中文)不能为空")
@Pattern
(
regexp
=
"^
[\u4e00-\u9fa5]{2,6}$"
,
message
=
"投保人-姓名(中文)必须为2-6位汉字"
)
@Pattern
(
regexp
=
"^
(|[\u4e00-\u9fa5]{2,6})$"
,
message
=
"投保人-姓名(中文)必须为2-6位汉字"
)
private
String
nameCn
;
private
String
nameCn
;
/**
/**
...
@@ -72,7 +72,7 @@ public class ApiPolicyholderInfoDto {
...
@@ -72,7 +72,7 @@ public class ApiPolicyholderInfoDto {
* 出生日期(生日,如果是身份证,自动获取性别和生日)
* 出生日期(生日,如果是身份证,自动获取性别和生日)
*/
*/
@NotNull
(
message
=
"投保人-生日不能为空"
)
@NotNull
(
message
=
"投保人-生日不能为空"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
birthday
;
private
LocalDateTime
birthday
;
@AssertTrue
(
message
=
"投保人-必须大于18周岁"
)
@AssertTrue
(
message
=
"投保人-必须大于18周岁"
)
public
boolean
isBirthdayValid
()
{
public
boolean
isBirthdayValid
()
{
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiProductPlanMainInfoDto.java
View file @
aef66dfa
...
@@ -127,7 +127,7 @@ public class ApiProductPlanMainInfoDto {
...
@@ -127,7 +127,7 @@ public class ApiProductPlanMainInfoDto {
/**
/**
* 回溯日期
* 回溯日期
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
backtrackDate
;
private
LocalDateTime
backtrackDate
;
/**
/**
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/dto/appointment/ApiSecondHolderInfoDto.java
View file @
aef66dfa
...
@@ -48,6 +48,6 @@ public class ApiSecondHolderInfoDto {
...
@@ -48,6 +48,6 @@ public class ApiSecondHolderInfoDto {
/**
/**
* 出生日期(生日,如果是身份证,自动获取性别和生日)
* 出生日期(生日,如果是身份证,自动获取性别和生日)
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
birthday
;
private
LocalDateTime
birthday
;
}
}
yd-csf-feign/src/main/java/com/yd/csf/feign/request/appointment/ApiAppointmentEditConfirmTimeRequest.java
View file @
aef66dfa
...
@@ -19,6 +19,6 @@ public class ApiAppointmentEditConfirmTimeRequest {
...
@@ -19,6 +19,6 @@ public class ApiAppointmentEditConfirmTimeRequest {
* 确定预约时间
* 确定预约时间
*/
*/
@NotNull
(
message
=
"确定预约时间不能为空"
)
@NotNull
(
message
=
"确定预约时间不能为空"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
confirmAppointmentTime
;
private
LocalDateTime
confirmAppointmentTime
;
}
}
yd-csf-feign/src/main/java/com/yd/csf/feign/request/appointment/ApiAppointmentPageRequest.java
View file @
aef66dfa
...
@@ -39,12 +39,12 @@ public class ApiAppointmentPageRequest extends PageDto {
...
@@ -39,12 +39,12 @@ public class ApiAppointmentPageRequest extends PageDto {
/**
/**
* 确定预约开始时间
* 确定预约开始时间
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
startTime
;
private
LocalDateTime
startTime
;
/**
/**
* 确定预约结束时间
* 确定预约结束时间
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
endTime
;
private
LocalDateTime
endTime
;
}
}
yd-csf-feign/src/main/java/com/yd/csf/feign/request/commissionruleconfig/ApiCommissionRuleConfigAddRequest.java
View file @
aef66dfa
...
@@ -24,13 +24,13 @@ public class ApiCommissionRuleConfigAddRequest {
...
@@ -24,13 +24,13 @@ public class ApiCommissionRuleConfigAddRequest {
/**
/**
* 生效开始日期
* 生效开始日期
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
effectiveStart
;
private
LocalDateTime
effectiveStart
;
/**
/**
* 生效结束日期
* 生效结束日期
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
effectiveEnd
;
private
LocalDateTime
effectiveEnd
;
/**
/**
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/request/commissionruleconfig/ApiCommissionRuleConfigEditRequest.java
View file @
aef66dfa
...
@@ -29,13 +29,13 @@ public class ApiCommissionRuleConfigEditRequest {
...
@@ -29,13 +29,13 @@ public class ApiCommissionRuleConfigEditRequest {
/**
/**
* 生效开始日期
* 生效开始日期
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
effectiveStart
;
private
LocalDateTime
effectiveStart
;
/**
/**
* 生效结束日期
* 生效结束日期
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
effectiveEnd
;
private
LocalDateTime
effectiveEnd
;
/**
/**
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/request/policyreceipt/ApiPolicyReceiptAddRequest.java
View file @
aef66dfa
...
@@ -21,7 +21,7 @@ public class ApiPolicyReceiptAddRequest {
...
@@ -21,7 +21,7 @@ public class ApiPolicyReceiptAddRequest {
* 回执日期
* 回执日期
*/
*/
@NotNull
(
message
=
"回执日期不能为空"
)
@NotNull
(
message
=
"回执日期不能为空"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
receiptDate
;
private
LocalDateTime
receiptDate
;
/**
/**
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/request/policyreceipt/ApiPolicyReceiptEditRequest.java
View file @
aef66dfa
...
@@ -27,7 +27,7 @@ public class ApiPolicyReceiptEditRequest {
...
@@ -27,7 +27,7 @@ public class ApiPolicyReceiptEditRequest {
* 回执日期
* 回执日期
*/
*/
@NotNull
(
message
=
"回执日期不能为空"
)
@NotNull
(
message
=
"回执日期不能为空"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
receiptDate
;
private
LocalDateTime
receiptDate
;
/**
/**
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/request/premiumreconciliation/ApiPremiumReconciliationResultEditRequest.java
View file @
aef66dfa
...
@@ -46,13 +46,13 @@ public class ApiPremiumReconciliationResultEditRequest {
...
@@ -46,13 +46,13 @@ public class ApiPremiumReconciliationResultEditRequest {
/**
/**
* 生效日期(保单生效日)
* 生效日期(保单生效日)
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
effectiveDate
;
private
Date
effectiveDate
;
/**
/**
* 保单核保日
* 保单核保日
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
underwritingDate
;
private
Date
underwritingDate
;
/**
/**
...
@@ -63,13 +63,13 @@ public class ApiPremiumReconciliationResultEditRequest {
...
@@ -63,13 +63,13 @@ public class ApiPremiumReconciliationResultEditRequest {
/**
/**
* 冷静期结束日期
* 冷静期结束日期
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
coolingOffEndDate
;
private
Date
coolingOffEndDate
;
/**
/**
* 保单截止日期
* 保单截止日期
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
policyExpirationDate
;
private
Date
policyExpirationDate
;
}
}
yd-csf-service/src/main/java/com/yd/csf/service/dto/CustomerAddRequest.java
View file @
aef66dfa
...
@@ -5,6 +5,7 @@ import com.yd.csf.service.vo.AddressVO;
...
@@ -5,6 +5,7 @@ import com.yd.csf.service.vo.AddressVO;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.validation.constraints.Pattern
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -22,9 +23,15 @@ public class CustomerAddRequest implements Serializable {
...
@@ -22,9 +23,15 @@ public class CustomerAddRequest implements Serializable {
private
String
fnaBizId
;
private
String
fnaBizId
;
/**
/**
* 客户ID
*/
private
String
customerBizId
;
/**
* 姓名-中文
* 姓名-中文
*/
*/
@Schema
(
description
=
"姓名-中文"
)
@Schema
(
description
=
"姓名-中文"
)
@Pattern
(
regexp
=
"^(|[\u4e00-\u9fa5]{2,6})$"
,
message
=
"投保人-姓名(中文)必须为2-6位汉字"
)
private
String
nameCn
;
private
String
nameCn
;
/**
/**
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/CustomerUpdateRequest.java
View file @
aef66dfa
...
@@ -5,6 +5,7 @@ import com.yd.csf.service.vo.AddressVO;
...
@@ -5,6 +5,7 @@ import com.yd.csf.service.vo.AddressVO;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.validation.constraints.Pattern
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -32,6 +33,7 @@ public class CustomerUpdateRequest implements Serializable {
...
@@ -32,6 +33,7 @@ public class CustomerUpdateRequest implements Serializable {
* 姓名-中文
* 姓名-中文
*/
*/
@Schema
(
description
=
"姓名-中文"
)
@Schema
(
description
=
"姓名-中文"
)
@Pattern
(
regexp
=
"^(|[\u4e00-\u9fa5]{2,6})$"
,
message
=
"投保人-姓名(中文)必须为2-6位汉字"
)
private
String
nameCn
;
private
String
nameCn
;
/**
/**
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/PolicyFollowDto.java
View file @
aef66dfa
...
@@ -150,7 +150,7 @@ public class PolicyFollowDto implements Serializable {
...
@@ -150,7 +150,7 @@ public class PolicyFollowDto implements Serializable {
private
String
insuranceCompanyBizId
;
private
String
insuranceCompanyBizId
;
@Schema
(
description
=
"对账公司"
)
@Schema
(
description
=
"对账公司"
)
private
String
reconciliationCompany
Name
;
private
String
reconciliationCompany
;
@Schema
(
description
=
"对账公司编码"
)
@Schema
(
description
=
"对账公司编码"
)
private
String
reconciliationCode
;
private
String
reconciliationCode
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/CustomerService.java
View file @
aef66dfa
...
@@ -34,4 +34,6 @@ public interface CustomerService extends IService<Customer> {
...
@@ -34,4 +34,6 @@ public interface CustomerService extends IService<Customer> {
Boolean
updateCustomer
(
CustomerUpdateRequest
customerUpdateRequest
);
Boolean
updateCustomer
(
CustomerUpdateRequest
customerUpdateRequest
);
void
queryDependentsNum
(
Customer
customer
);
void
queryDependentsNum
(
Customer
customer
);
Customer
queryOneByCustomerBizId
(
String
customerBizId
);
}
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionExpectedServiceImpl.java
View file @
aef66dfa
...
@@ -611,6 +611,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -611,6 +611,7 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
throw
new
BusinessException
(
"保單持有人年齡不能为空"
);
throw
new
BusinessException
(
"保單持有人年齡不能为空"
);
}
}
Date
effectiveDate
=
policy
.
getEffectiveDate
();
Date
effectiveDate
=
policy
.
getEffectiveDate
();
log
.
info
(
"getExpectedCommissionByProductlaunchId的effectiveDate生效日期:{}"
,
effectiveDate
);
if
(
effectiveDate
==
null
)
{
if
(
effectiveDate
==
null
)
{
throw
new
BusinessException
(
"保单生效日期不能为空"
);
throw
new
BusinessException
(
"保单生效日期不能为空"
);
}
}
...
@@ -768,9 +769,12 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
...
@@ -768,9 +769,12 @@ public class CommissionExpectedServiceImpl extends ServiceImpl<CommissionExpecte
unmatchedConditions
,
"保费["
+
paymentPremium
+
"]"
);
unmatchedConditions
,
"保费["
+
paymentPremium
+
"]"
);
// 检查生效日期
// 检查生效日期
log
.
info
(
"检查生效日期的effectiveDate生效日期:{}"
,
effectiveDate
);
currentList
=
filterAndCheck
(
currentList
,
currentList
=
filterAndCheck
(
currentList
,
i
->
isEffective
(
i
.
getEffectiveStart
(),
i
.
getEffectiveEnd
(),
effectiveDate
),
i
->
isEffective
(
i
.
getEffectiveStart
(),
i
.
getEffectiveEnd
(),
effectiveDate
),
unmatchedConditions
,
"生效日期["
+
DateUtil
.
format
(
effectiveDate
,
"yyyy-MM-dd"
)
+
"]"
);
unmatchedConditions
,
"生效日期["
+
DateUtil
.
format
(
effectiveDate
,
"yyyy-MM-dd"
)
+
"]"
);
log
.
info
(
"检查生效日期的currentList:{}"
,
JSON
.
toJSONString
(
currentList
));
log
.
info
(
"检查生效日期的unmatchedConditions:{}"
,
JSON
.
toJSONString
(
unmatchedConditions
));
if
(
unmatchedConditions
.
size
()
>
0
)
{
if
(
unmatchedConditions
.
size
()
>
0
)
{
return
new
MatchResult
(
Collections
.
emptyList
(),
unmatchedConditions
);
return
new
MatchResult
(
Collections
.
emptyList
(),
unmatchedConditions
);
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionServiceImpl.java
View file @
aef66dfa
...
@@ -169,7 +169,11 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -169,7 +169,11 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
if
(
commissionExpected
.
getCommissionRatio
()
!=
null
)
{
if
(
commissionExpected
.
getCommissionRatio
()
!=
null
)
{
BigDecimal
paidRatio
=
commissionExpected
.
getPaidRatio
()
!=
null
?
commissionExpected
.
getPaidRatio
()
:
BigDecimal
.
ZERO
;
BigDecimal
paidRatio
=
commissionExpected
.
getPaidRatio
()
!=
null
?
commissionExpected
.
getPaidRatio
()
:
BigDecimal
.
ZERO
;
commissionVO
.
setPaidRatio
(
paidRatio
);
commissionVO
.
setPaidRatio
(
paidRatio
);
commissionVO
.
setPendingRatio
(
commissionExpected
.
getCommissionRatio
().
subtract
(
paidRatio
));
commissionVO
.
setPendingRatio
(
BigDecimal
.
ONE
.
subtract
(
paidRatio
.
divide
(
commissionExpected
.
getCommissionRatio
(),
4
,
RoundingMode
.
HALF_UP
))
.
multiply
(
BigDecimal
.
valueOf
(
100
))
);
}
}
commissionVO
.
setCommissionExpectedStatus
(
commissionExpected
.
getStatus
());
commissionVO
.
setCommissionExpectedStatus
(
commissionExpected
.
getStatus
());
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerServiceImpl.java
View file @
aef66dfa
...
@@ -104,11 +104,21 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
...
@@ -104,11 +104,21 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
if
(
ValidateUtil
.
isAllFieldsNull
(
customerAddRequest
))
{
if
(
ValidateUtil
.
isAllFieldsNull
(
customerAddRequest
))
{
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
ErrorCode
.
PARAMS_ERROR
.
getMessage
());
throw
new
BusinessException
(
ErrorCode
.
PARAMS_ERROR
.
getCode
(),
ErrorCode
.
PARAMS_ERROR
.
getMessage
());
}
}
String
customerBizId
=
customerAddRequest
.
getCustomerBizId
();
// 检查字段 certificate_list,根据证件类型、证件号码查询客户是否存在
Customer
customer
=
null
;
Customer
customer
=
queryByCertificate
(
customerAddRequest
.
getApiCertificateDtoList
());
if
(
StringUtils
.
isNotBlank
(
customerAddRequest
.
getCustomerBizId
()))
{
customer
=
customerService
.
queryOneByCustomerBizId
(
customerAddRequest
.
getCustomerBizId
());
}
if
(
customer
==
null
)
{
if
(
customer
==
null
)
{
customer
=
new
Customer
();
// 检查字段 certificate_list,根据证件类型、证件号码查询客户是否存在
customer
=
queryByCertificate
(
customerAddRequest
.
getApiCertificateDtoList
());
if
(
customer
==
null
)
{
customer
=
new
Customer
();
// 客户主表业务唯一id
customerBizId
=
RandomStringGenerator
.
generateBizId16
(
CommonEnum
.
UID_TYPE_CUSTOMER
.
getCode
());
}
else
{
customerBizId
=
customer
.
getCustomerBizId
();
}
}
}
// 客户主表信息
// 客户主表信息
...
@@ -128,8 +138,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
...
@@ -128,8 +138,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
// 校验客户主表信息
// 校验客户主表信息
validCustomer
(
customer
);
validCustomer
(
customer
);
// 客户主表业务唯一id
customer
.
setCustomerBizId
(
customerBizId
);
customer
.
setCustomerBizId
(
RandomStringGenerator
.
generateBizId16
(
CommonEnum
.
UID_TYPE_CUSTOMER
.
getCode
()));
boolean
result
=
customerService
.
saveOrUpdate
(
customer
);
boolean
result
=
customerService
.
saveOrUpdate
(
customer
);
if
(!
result
)
{
if
(!
result
)
{
throw
new
BusinessException
(
ErrorCode
.
OPERATION_ERROR
.
getCode
(),
ErrorCode
.
OPERATION_ERROR
.
getMessage
());
throw
new
BusinessException
(
ErrorCode
.
OPERATION_ERROR
.
getCode
(),
ErrorCode
.
OPERATION_ERROR
.
getMessage
());
...
@@ -269,6 +278,12 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
...
@@ -269,6 +278,12 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
}
}
}
}
@Override
public
Customer
queryOneByCustomerBizId
(
String
customerBizId
)
{
return
this
.
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
Customer
>()
.
eq
(
Customer:
:
getCustomerBizId
,
customerBizId
).
last
(
" limit 1 "
));
}
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneAccountServiceImpl.java
View file @
aef66dfa
...
@@ -164,8 +164,9 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
...
@@ -164,8 +164,9 @@ public class FortuneAccountServiceImpl extends ServiceImpl<FortuneAccountMapper,
updateFortune
.
setFortuneAccountBizId
(
fortuneAccountBizId
);
updateFortune
.
setFortuneAccountBizId
(
fortuneAccountBizId
);
updateFortune
.
setStatus
(
FortuneStatusEnum
.
CHECKED
.
getItemValue
());
updateFortune
.
setStatus
(
FortuneStatusEnum
.
CHECKED
.
getItemValue
());
// 处理金额字段
// 处理金额字段
updateFortune
.
setCurrentPaymentHkdAmount
(
item
.
getHkdAmount
());
updateFortune
.
setCurrentPaymentHkdAmount
(
item
.
getCurrentPaymentHkdAmount
());
updateFortune
.
setCurrentPaymentRatio
(
BigDecimal
.
valueOf
(
100
));
updateFortune
.
setCurrentPaymentRatio
(
item
.
getCurrentPaymentHkdAmount
()
.
divide
(
item
.
getHkdAmount
(),
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)));
updateFortune
.
setReconciliationOperator
(
currentLoginUser
.
getUsername
());
updateFortune
.
setReconciliationOperator
(
currentLoginUser
.
getUsername
());
updateFortuneList
.
add
(
updateFortune
);
updateFortuneList
.
add
(
updateFortune
);
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/FortuneServiceImpl.java
View file @
aef66dfa
...
@@ -234,14 +234,14 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -234,14 +234,14 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
// 2. 更新expected_fortune记录为已全额发放状态
// 2. 更新expected_fortune记录为已全额发放状态
// 统一使用港币金额
// 统一使用港币金额
expectedFortune
.
setPaidAmount
(
expectedFortune
.
getHkdAmount
());
//
expectedFortune.setPaidAmount(expectedFortune.getHkdAmount());
expectedFortune
.
setUnpaidAmount
(
BigDecimal
.
ZERO
);
//
expectedFortune.setUnpaidAmount(BigDecimal.ZERO);
expectedFortune
.
setPaidRatio
(
BigDecimal
.
valueOf
(
100
));
//
expectedFortune.setPaidRatio(BigDecimal.valueOf(100));
expectedFortune
.
setUnpaidRatio
(
BigDecimal
.
ZERO
);
//
expectedFortune.setUnpaidRatio(BigDecimal.ZERO);
expectedFortune
.
setStatus
(
"6"
);
// 全额发放完成状态
//
expectedFortune.setStatus("6"); // 全额发放完成状态
expectedFortune
.
setActualPayoutDate
(
LocalDate
.
now
());
//
expectedFortune.setActualPayoutDate(LocalDate.now());
//
expectedFortuneService
.
updateById
(
expectedFortune
);
//
expectedFortuneService.updateById(expectedFortune);
}
}
private
BigDecimal
queryDefaultExchangeRate
(
String
currency
)
{
private
BigDecimal
queryDefaultExchangeRate
(
String
currency
)
{
...
@@ -287,10 +287,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -287,10 +287,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
main
.
setReconciliationOperator
(
currentLoginUser
.
getUsername
());
main
.
setReconciliationOperator
(
currentLoginUser
.
getUsername
());
main
.
setUpdaterId
(
loginUserId
);
main
.
setUpdaterId
(
loginUserId
);
main
.
setUpdateTime
(
new
Date
());
main
.
setUpdateTime
(
new
Date
());
// 其他字段更新
if
(
StringUtils
.
isNotBlank
(
fortuneUpdateRequest
.
getCurrency
()))
{
main
.
setCurrency
(
fortuneUpdateRequest
.
getCurrency
());
}
this
.
updateById
(
main
);
this
.
updateById
(
main
);
// 2. 剩余金额生成新行
// 2. 剩余金额生成新行
...
@@ -303,7 +300,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -303,7 +300,7 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
part
.
setCurrentPaymentHkdAmount
(
leftAmount
);
part
.
setCurrentPaymentHkdAmount
(
leftAmount
);
part
.
setCurrentPaymentRatio
(
leftAmount
part
.
setCurrentPaymentRatio
(
leftAmount
.
divide
(
expectedFortune
.
getHkdAmount
(),
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)));
.
divide
(
expectedFortune
.
getHkdAmount
(),
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)));
part
.
setStatus
(
FortuneStatusEnum
.
WAIT
.
getItemValue
());
part
.
setStatus
(
FortuneStatusEnum
.
RESERVED
.
getItemValue
());
part
.
setIsPart
(
1
);
part
.
setIsPart
(
1
);
part
.
setPayoutDate
(
LocalDate
.
now
().
plusMonths
(
1
));
// 次月
part
.
setPayoutDate
(
LocalDate
.
now
().
plusMonths
(
1
));
// 次月
part
.
setReconciliationOperator
(
currentLoginUser
.
getUsername
());
part
.
setReconciliationOperator
(
currentLoginUser
.
getUsername
());
...
@@ -314,20 +311,20 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -314,20 +311,20 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
// 3. 同步 expected_fortune
// 3. 同步 expected_fortune
// 统一使用港币金额
// 统一使用港币金额
BigDecimal
newPaid
=
expectedFortune
.
getPaidAmount
()
==
null
?
BigDecimal
.
ZERO
:
expectedFortune
.
getPaidAmount
().
add
(
currentPaymentHkdAmount
);
//
BigDecimal newPaid = expectedFortune.getPaidAmount() == null ? BigDecimal.ZERO : expectedFortune.getPaidAmount().add(currentPaymentHkdAmount);
BigDecimal
newUnpaid
=
expectedFortune
.
getHkdAmount
().
subtract
(
newPaid
);
//
BigDecimal newUnpaid = expectedFortune.getHkdAmount().subtract(newPaid);
String
newStatus
=
newUnpaid
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
"6"
:
"3"
;
//
String newStatus = newUnpaid.compareTo(BigDecimal.ZERO) == 0 ? "6" : "3";
//
expectedFortuneService
.
lambdaUpdate
()
//
expectedFortuneService.lambdaUpdate()
.
set
(
ExpectedFortune:
:
getPaidAmount
,
newPaid
)
//
.set(ExpectedFortune::getPaidAmount, newPaid)
.
set
(
ExpectedFortune:
:
getUnpaidAmount
,
newUnpaid
)
//
.set(ExpectedFortune::getUnpaidAmount, newUnpaid)
.
set
(
ExpectedFortune:
:
getPaidRatio
,
//
.set(ExpectedFortune::getPaidRatio,
newPaid
.
divide
(
expectedFortune
.
getHkdAmount
(),
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)))
//
newPaid.divide(expectedFortune.getHkdAmount(), 4, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100)))
.
set
(
ExpectedFortune:
:
getUnpaidRatio
,
//
.set(ExpectedFortune::getUnpaidRatio,
newUnpaid
.
divide
(
expectedFortune
.
getHkdAmount
(),
4
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)))
//
newUnpaid.divide(expectedFortune.getHkdAmount(), 4, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100)))
.
set
(
ExpectedFortune:
:
getStatus
,
newStatus
)
//
.set(ExpectedFortune::getStatus, newStatus)
.
eq
(
ExpectedFortune:
:
getId
,
expectedFortune
.
getId
())
//
.eq(ExpectedFortune::getId, expectedFortune.getId())
.
update
();
//
.update();
}
}
@Override
@Override
...
@@ -368,9 +365,9 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
...
@@ -368,9 +365,9 @@ public class FortuneServiceImpl extends ServiceImpl<FortuneMapper, Fortune>
// 校验发佣记录状态
// 校验发佣记录状态
StringBuilder
validateMsg
=
new
StringBuilder
();
StringBuilder
validateMsg
=
new
StringBuilder
();
for
(
Fortune
fortune
:
fortuneList
)
{
for
(
Fortune
fortune
:
fortuneList
)
{
// if (
StringUtils.equals(fortune.getStatus(), FortuneStatusEnum.CAN_SEND.getItemValue())) {
if
(!
StringUtils
.
equals
(
fortune
.
getStatus
(),
FortuneStatusEnum
.
CAN_SEND
.
getItemValue
()))
{
// validateMsg.append(fortune.getPolicyNo()).append("-").append(fortune.getBroker()).append("当前未检核,请检核后再
生成出账记录; ");
validateMsg
.
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
()).
append
(
"当前状态不是'可出账, 待检核',不能
生成出账记录; "
);
//
}
}
if
(
StringUtils
.
equals
(
fortune
.
getStatus
(),
FortuneStatusEnum
.
SENT
.
getItemValue
()))
{
if
(
StringUtils
.
equals
(
fortune
.
getStatus
(),
FortuneStatusEnum
.
SENT
.
getItemValue
()))
{
validateMsg
.
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
()).
append
(
"已完成出账,不能生成出账记录; "
);
validateMsg
.
append
(
fortune
.
getPolicyNo
()).
append
(
"-"
).
append
(
fortune
.
getBroker
()).
append
(
"已完成出账,不能生成出账记录; "
);
}
}
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/PolicyFollowServiceImpl.java
View file @
aef66dfa
...
@@ -207,9 +207,6 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
...
@@ -207,9 +207,6 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
if
(
StringUtils
.
isNotBlank
(
policyFollowDto
.
getReconciliationCode
()))
{
if
(
StringUtils
.
isNotBlank
(
policyFollowDto
.
getReconciliationCode
()))
{
policyFollow
.
setReconciliationCompanyCode
(
policyFollowDto
.
getReconciliationCode
());
policyFollow
.
setReconciliationCompanyCode
(
policyFollowDto
.
getReconciliationCode
());
}
}
if
(
StringUtils
.
isNotBlank
(
policyFollowDto
.
getReconciliationCompanyName
()))
{
policyFollow
.
setReconciliationCompany
(
policyFollowDto
.
getReconciliationCompanyName
());
}
// 检查保单号是否从空变为有值
// 检查保单号是否从空变为有值
String
oldPolicyNo
=
policyFollow
.
getPolicyNo
();
String
oldPolicyNo
=
policyFollow
.
getPolicyNo
();
...
@@ -556,6 +553,7 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
...
@@ -556,6 +553,7 @@ public class PolicyFollowServiceImpl extends ServiceImpl<PolicyFollowMapper, Pol
updatePolicyBrokerPolicyNo
(
policyBizId
,
policy
.
getPolicyNo
());
updatePolicyBrokerPolicyNo
(
policyBizId
,
policy
.
getPolicyNo
());
// 根据保单生成预计入账记录
// 根据保单生成预计入账记录
log
.
info
(
"根据保单生成预计入账记录前effectiveDate生效日期:{}"
,
policy
.
getEffectiveDate
());
generateExpectedCommission
(
policyFollow
,
policy
);
generateExpectedCommission
(
policyFollow
,
policy
);
// 更新FNA状态为 "签单完成"
// 更新FNA状态为 "签单完成"
...
...
yd-csf-service/src/main/java/com/yd/csf/service/vo/CommissionVO.java
View file @
aef66dfa
...
@@ -154,9 +154,9 @@ public class CommissionVO implements Serializable {
...
@@ -154,9 +154,9 @@ public class CommissionVO implements Serializable {
private
Date
commissionDate
;
private
Date
commissionDate
;
/**
/**
* 当前来佣比例
* 当前来佣比例
(实佣率=实际入账金额/结算汇率/每期保费)
*/
*/
@Schema
(
description
=
"当前来佣比例"
)
@Schema
(
description
=
"当前来佣比例
(实佣率=实际入账金额/结算汇率/每期保费)
"
)
private
BigDecimal
currentCommissionRatio
;
private
BigDecimal
currentCommissionRatio
;
/**
/**
...
@@ -196,9 +196,9 @@ public class CommissionVO implements Serializable {
...
@@ -196,9 +196,9 @@ public class CommissionVO implements Serializable {
private
BigDecimal
paidRatio
;
private
BigDecimal
paidRatio
;
/**
/**
*
待入账比例
*
达成率缺口= 1 - 本期实佣率/产品本期来佣率
*/
*/
@Schema
(
description
=
"
待入账比例
"
)
@Schema
(
description
=
"
达成率缺口= 1 - 累积实佣率/产品本期来佣率
"
)
private
BigDecimal
pendingRatio
;
private
BigDecimal
pendingRatio
;
/**
/**
...
...
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
View file @
aef66dfa
...
@@ -29,14 +29,10 @@
...
@@ -29,14 +29,10 @@
ifnull(sum(ef.hkd_amount),0) as totalExpectedAmount,
ifnull(sum(ef.hkd_amount),0) as totalExpectedAmount,
ifnull(sum(ef.paid_amount),0) as totalPaidAmount,
ifnull(sum(ef.paid_amount),0) as totalPaidAmount,
ifnull(sum(ef.unpaid_amount),0) as totalUnpaidAmount,
ifnull(sum(ef.unpaid_amount),0) as totalUnpaidAmount,
MAX(
e
.total_payment_premium) * MAX(ef.default_exchange_rate) as totalPremiumAmount,
MAX(
p
.total_payment_premium) * MAX(ef.default_exchange_rate) as totalPremiumAmount,
count(distinct ef.policy_no) as totalPolicyCount
count(distinct ef.policy_no) as totalPolicyCount
from expected_fortune ef
from expected_fortune ef
LEFT JOIN (
LEFT JOIN policy p ON ef.policy_no = p.policy_no
SELECT p.policy_no, p.total_payment_premium
FROM policy p
GROUP BY policy_no
) e ON ef.policy_no = e.policy_no
<where>
<where>
<if
test=
"expectedFortuneIds != null and expectedFortuneIds.size > 0"
>
<if
test=
"expectedFortuneIds != null and expectedFortuneIds.size > 0"
>
ef.id in
ef.id in
...
...
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