Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
f6762d71
Commit
f6762d71
authored
May 22, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-商险自动化逻辑调整
parent
17033469
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
92 additions
and
42 deletions
+92
-42
InsuranceAddParam.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
+6
-0
InsuranceAutoParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceAutoParam.java
+5
-0
InsuranceBatchParam.java
...cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
+6
-0
InsuranceReplaceParam.java
...oud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
+6
-0
TEmployeeInsurancePreServiceImpl.java
...vice/insurance/impl/TEmployeeInsurancePreServiceImpl.java
+6
-0
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+63
-42
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
View file @
f6762d71
...
...
@@ -124,6 +124,12 @@ public class InsuranceAddParam implements Serializable {
@Schema
(
description
=
"商险待购买id"
)
private
String
insurancePreId
;
/**
* 前端客服姓名
*/
@Schema
(
description
=
"前端客服姓名"
)
private
String
customerUserName
;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAutoParam.java
View file @
f6762d71
...
...
@@ -151,4 +151,9 @@ public class InsuranceAutoParam implements Serializable {
@Schema
(
description
=
"商险待购买id"
)
private
String
insurancePreId
;
/**
* 前端客服姓名
*/
@Schema
(
description
=
"前端客服姓名"
)
private
String
customerUserName
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
View file @
f6762d71
...
...
@@ -119,6 +119,12 @@ public class InsuranceBatchParam implements Serializable {
@Schema
(
description
=
"商险待购买id"
)
private
String
insurancePreId
;
/**
* 前端客服姓名
*/
@Schema
(
description
=
"前端客服姓名"
)
private
String
customerUserName
;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
View file @
f6762d71
...
...
@@ -107,6 +107,12 @@ public class InsuranceReplaceParam implements Serializable {
@Schema
(
description
=
"商险待购买id"
)
private
String
insurancePreId
;
/**
* 前端客服姓名
*/
@Schema
(
description
=
"前端客服姓名"
)
private
String
customerUserName
;
/**
* 数据传递对象
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TEmployeeInsurancePreServiceImpl.java
View file @
f6762d71
...
...
@@ -207,6 +207,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam
.
setPost
(
insurancePre
.
getPosition
());
addParam
.
setRemark
(
CommonConstants
.
EMPTY_STRING
);
addParam
.
setInsurancePreId
(
insurancePre
.
getId
());
addParam
.
setCustomerUserName
(
insurancePre
.
getCustomerUsername
());
addParamList
.
add
(
addParam
);
}
if
(
CommonConstants
.
THREE_INT
==
insurancePre
.
getBuyType
())
{
...
...
@@ -224,6 +225,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam
.
setPost
(
insurancePre
.
getPosition
());
addParam
.
setRemark
(
CommonConstants
.
EMPTY_STRING
);
addParam
.
setInsurancePreId
(
insurancePre
.
getId
());
addParam
.
setCustomerUserName
(
insurancePre
.
getCustomerUsername
());
batchAddParamList
.
add
(
addParam
);
}
if
(
CommonConstants
.
FOUR_INT
==
insurancePre
.
getBuyType
())
{
...
...
@@ -242,6 +244,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam
.
setReplaceEmpIdcardNo
(
insurancePre
.
getEmpIdcard
());
addParam
.
setRemark
(
CommonConstants
.
EMPTY_STRING
);
addParam
.
setInsurancePreId
(
insurancePre
.
getId
());
addParam
.
setCustomerUserName
(
insurancePre
.
getCustomerUsername
());
replaceAddParamList
.
add
(
addParam
);
}
}
...
...
@@ -488,6 +491,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam
.
setRemark
(
addParam
.
getRemark
());
autoParam
.
setErrorMessage
(
addParam
.
getErrorMessage
());
autoParam
.
setInsurancePreId
(
addParam
.
getInsurancePreId
());
autoParam
.
setCustomerUserName
(
addParam
.
getCustomerUserName
());
return
autoParam
;
}
...
...
@@ -508,6 +512,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam
.
setRemark
(
batchParam
.
getRemark
());
autoParam
.
setErrorMessage
(
batchParam
.
getErrorMessage
());
autoParam
.
setInsurancePreId
(
batchParam
.
getInsurancePreId
());
autoParam
.
setCustomerUserName
(
batchParam
.
getCustomerUserName
());
return
autoParam
;
}
...
...
@@ -528,6 +533,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam
.
setReplaceEmpIdcardNo
(
replaceParam
.
getReplaceEmpIdcardNo
());
autoParam
.
setErrorMessage
(
replaceParam
.
getErrorMessage
());
autoParam
.
setInsurancePreId
(
replaceParam
.
getInsurancePreId
());
autoParam
.
setCustomerUserName
(
replaceParam
.
getCustomerUserName
());
return
autoParam
;
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
f6762d71
...
...
@@ -373,7 +373,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setActualPremium
(
new
BigDecimal
(
"0.00"
));
detail
.
setEstimatePremium
(
new
BigDecimal
(
"0.00"
));
detail
.
setCreateBy
(
null
==
user
?
"1"
:
user
.
getId
());
detail
.
setCreateName
(
null
==
user
?
"自动化派单"
:
user
.
getNickname
());
detail
.
setCreateName
(
null
==
user
?
"自动化派单"
+
"-"
+
success
.
getCustomerUserName
()
:
user
.
getNickname
());
detailList
.
add
(
detail
);
sourceIdCardList
.
add
(
detail
.
getEmpIdcardNo
());
baseMapper
.
insert
(
detail
);
...
...
@@ -446,7 +446,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setActualPremium
(
new
BigDecimal
(
"0.00"
));
detail
.
setEstimatePremium
(
new
BigDecimal
(
"0.00"
));
detail
.
setCreateBy
(
null
==
user
?
"1"
:
user
.
getId
());
detail
.
setCreateName
(
null
==
user
?
"自动化派单"
:
user
.
getNickname
());
detail
.
setCreateName
(
null
==
user
?
"自动化派单"
+
"-"
+
success
.
getCustomerUserName
()
:
user
.
getNickname
());
detailList
.
add
(
detail
);
sourceIdCardList
.
add
(
detail
.
getEmpIdcardNo
());
replaceIdList
.
add
(
detail
.
getId
());
...
...
@@ -557,7 +557,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//创建时间是新数据插入时间
newDetail
.
setCreateTime
(
LocalDateTime
.
now
());
newDetail
.
setCreateBy
(
null
==
user
?
"1"
:
user
.
getId
());
newDetail
.
setCreateName
(
null
==
user
?
"自动化派单"
:
user
.
getNickname
());
newDetail
.
setCreateName
(
null
==
user
?
"自动化派单"
+
"-"
+
success
.
getCustomerUserName
()
:
user
.
getNickname
());
//替换不参与结算
newDetail
.
setDefaultSettleId
(
null
);
//替换不继承备注 20250331 fxj 替换模板新增备注字段不用清空
...
...
@@ -585,7 +585,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
replace
.
setReplaceStatus
(
CommonConstants
.
ONE_INT
);
replace
.
setReplaceTime
(
LocalDateTime
.
now
());
replace
.
setCreateBy
(
null
==
user
?
"1"
:
user
.
getId
());
replace
.
setCreateName
(
null
==
user
?
"自动化派单"
:
user
.
getNickname
());
replace
.
setCreateName
(
null
==
user
?
"自动化派单"
+
"-"
+
success
.
getCustomerUserName
()
:
user
.
getNickname
());
replace
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceReplaceService
.
save
(
replace
);
updateEmployeeInsurancePre
(
success
.
getInsurancePreId
(),
newDetail
,
CommonConstants
.
THREE_STRING
);
...
...
@@ -2671,7 +2671,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link Map<String, List<InsuranceAddParam>>}
*/
private
Map
<
String
,
List
<
InsuranceAddParam
>>
addInsuranceCheck
(
List
<
InsuranceAddParam
>
paramList
,
YifuUser
user
){
List
<
String
>
deptNoList
=
getDeptNoList
(
null
==
user
?
"1"
:
user
.
getId
());
//1.9.11超管无需校验项目权限
List
<
String
>
deptNoList
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
user
))
{
deptNoList
=
getDeptNoList
(
user
.
getId
());
}
Map
<
String
,
List
<
InsuranceAddParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceAddParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceAddParam
>
listSuccess
=
new
ArrayList
<>();
...
...
@@ -2886,16 +2890,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//校验当前项目是否在权限范围内
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
//1.9.11超管无需校验项目权限
if
(
Common
.
isEmpty
(
param
.
getCustomerUserName
())
&&
Common
.
isNotNull
(
user
))
{
if
(
CollectionUtils
.
isEmpty
(
deptNoList
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
())))
{
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
())))
{
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
}
//省市区域校验是否正确并设置对应id
String
redisProvinceName
=
getRedisAreaValue
(
param
.
getInsuranceProvinceName
());
if
(
Common
.
isEmpty
(
redisProvinceName
)){
...
...
@@ -3058,7 +3065,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link Map< String, List< InsuranceBatchParam>>}
*/
private
Map
<
String
,
List
<
InsuranceBatchParam
>>
batchInsuranceCheck
(
List
<
InsuranceBatchParam
>
paramList
,
YifuUser
user
){
List
<
String
>
deptNoList
=
getDeptNoList
(
null
==
user
?
"1"
:
user
.
getId
());
//1.9.11超管无需校验项目权限
List
<
String
>
deptNoList
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
user
))
{
deptNoList
=
getDeptNoList
(
user
.
getId
());
}
Map
<
String
,
List
<
InsuranceBatchParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceBatchParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceBatchParam
>
listSuccess
=
new
ArrayList
<>();
...
...
@@ -3234,16 +3245,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//校验当前项目是否在权限范围内
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
//1.9.11超管无需校验项目权限
if
(
Common
.
isEmpty
(
param
.
getCustomerUserName
())
&&
Common
.
isNotNull
(
user
))
{
if
(
CollectionUtils
.
isEmpty
(
deptNoList
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
())))
{
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
())))
{
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
}
//省市区域校验是否正确并设置对应id
String
redisProvinceName
=
getRedisAreaValue
(
param
.
getInsuranceProvinceName
());
if
(
Common
.
isEmpty
(
redisProvinceName
)){
...
...
@@ -3444,7 +3458,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link Map< String, List<InsuranceReplaceParam>>}
*/
private
Map
<
String
,
List
<
InsuranceReplaceParam
>>
replaceInsuranceCheck
(
List
<
InsuranceReplaceParam
>
paramList
,
YifuUser
user
){
List
<
String
>
deptNoList
=
getDeptNoList
(
null
==
user
?
"1"
:
user
.
getId
());
//1.9.11超管无需校验项目权限
List
<
String
>
deptNoList
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
user
))
{
deptNoList
=
getDeptNoList
(
user
.
getId
());
}
Map
<
String
,
List
<
InsuranceReplaceParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceReplaceParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceReplaceParam
>
listSuccess
=
new
ArrayList
<>();
...
...
@@ -3707,22 +3725,25 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
else
{
//校验当前项目是否在权限范围内
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
//1.9.11超管无需校验项目权限
if
(
Common
.
isEmpty
(
param
.
getCustomerUserName
())
&&
Common
.
isNotNull
(
user
))
{
if
(
CollectionUtils
.
isEmpty
(
deptNoList
))
{
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
if
(
deptNoList
.
stream
().
noneMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
())))
{
if
(
deptNoList
.
stream
().
noneMatch
(
u
->
u
.
equals
(
param
.
getDeptNo
())))
{
param
.
setErrorMessage
(
InsurancesConstants
.
OLD_DEPT_NO_NOT_IN_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
//校验当前项目是否在权限范围内
if
(
deptNoList
.
stream
().
noneMatch
(
u
->
u
.
equals
(
param
.
getReplaceDeptNo
())))
{
if
(
deptNoList
.
stream
().
noneMatch
(
u
->
u
.
equals
(
param
.
getReplaceDeptNo
())))
{
param
.
setErrorMessage
(
InsurancesConstants
.
NEW_DEPT_NO_NOT_IN_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
}
// 投保状态 待投保 不能替换
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
ONE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
ONE_REPLACE_IS_NOT_ALLOW
);
...
...
@@ -4343,8 +4364,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
operate
.
setCreateBy
(
user
.
getId
());
operate
.
setCreateName
(
user
.
getNickname
());
}
else
{
operate
.
setCreateBy
(
"1"
);
operate
.
setCreateName
(
"自动化派单"
);
operate
.
setCreateBy
(
detail
.
getCreateBy
()
);
operate
.
setCreateName
(
detail
.
getCreateName
()
);
}
operate
.
setCreateTime
(
LocalDateTime
.
now
());
operateList
.
add
(
operate
);
...
...
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