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
ab2d26fd
Commit
ab2d26fd
authored
Feb 16, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商险优化修改
parent
6e9c0083
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
48 deletions
+50
-48
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+50
-48
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
ab2d26fd
...
...
@@ -1292,7 +1292,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//获取成功数据的remark
paramList
.
stream
().
forEach
(
e
->{
paramList
.
forEach
(
e
->{
if
(
detail
.
getId
().
equals
(
e
.
getId
())){
operateList
.
add
(
e
);
}
...
...
@@ -1334,7 +1334,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//投保成功
if
(
CollectionUtils
.
isNotEmpty
(
collectSuccess
)){
List
<
InsuranceHandleParam
>
list
=
new
ArrayList
<>();
collectSuccess
.
stream
().
forEach
(
e
->{
collectSuccess
.
forEach
(
e
->{
InsuranceHandleParam
handleParam
=
new
InsuranceHandleParam
();
handleParam
.
setId
(
e
.
getId
());
handleParam
.
setRemark
(
e
.
getRemark
());
...
...
@@ -1347,7 +1347,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//投保退回
if
(
CollectionUtils
.
isNotEmpty
(
collectRollBack
)){
List
<
InsuranceHandleParam
>
list
=
new
ArrayList
<>();
collectRollBack
.
stream
().
forEach
(
e
->{
collectRollBack
.
forEach
(
e
->{
InsuranceHandleParam
handleParam
=
new
InsuranceHandleParam
();
handleParam
.
setId
(
e
.
getId
());
handleParam
.
setRemark
(
e
.
getRemark
());
...
...
@@ -1376,7 +1376,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public
R
<
List
<
InsuranceListVO
>>
successfulInsurance
(
YifuUser
user
,
List
<
InsuranceHandleParam
>
paramList
)
{
ThreadPoolExecutor
threadPool
=
new
ThreadPoolExecutor
(
50
,
50
,
100
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(
10
));
//解析参数里的商险id
List
<
String
>
idList
=
paramList
.
stream
().
map
(
e
->
e
.
getId
()
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
idList
=
paramList
.
stream
().
map
(
InsuranceHandleParam:
:
getId
).
distinct
().
collect
(
Collectors
.
toList
());
//操作日志对象
List
<
InsuranceHandleParam
>
operateList
=
new
ArrayList
<>();
...
...
@@ -1552,7 +1552,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
for
(
TInsuranceDetail
detail
:
successList
)
{
//获取成功数据的remark
paramList
.
stream
().
forEach
(
e
->{
paramList
.
forEach
(
e
->{
if
(
detail
.
getId
().
equals
(
e
.
getId
())){
operateList
.
add
(
e
);
}
...
...
@@ -6150,11 +6150,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private
List
<
InsuranceHandleImportParam
>
insuranceChangeCheck
(
List
<
InsuranceHandleImportParam
>
checkList
,
boolean
flag
)
{
List
<
InsuranceHandleImportParam
>
distinctList
=
checkList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
//定义外层循环标识,方便去重的时候跳出
outer:
Map
<
String
,
String
>
map
=
new
HashMap
<>();
InsuranceHandleImportParam
param
;
String
handType
;
String
remark
;
TInsuranceDetail
insuranceDetail
;
for
(
int
i
=
0
;
i
<
distinctList
.
size
();
i
++)
{
InsuranceHandleImportParam
param
=
distinctList
.
get
(
i
);
param
=
distinctList
.
get
(
i
);
//办理结果
String
handType
=
param
.
getHandType
();
handType
=
param
.
getHandType
();
if
(
StringUtils
.
isBlank
(
handType
)){
param
.
setErrorMessage
(
InsurancesConstants
.
HAND_RESULT_IS_EMPTY
);
continue
;
...
...
@@ -6164,7 +6168,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//办理意见
String
remark
=
param
.
getRemark
();
remark
=
param
.
getRemark
();
if
(
InsurancesConstants
.
FAILED
.
equals
(
handType
)
&&
StringUtils
.
isBlank
(
remark
)){
param
.
setErrorMessage
(
InsurancesConstants
.
ROLLBACK_MESSAGE_IS_EMPTY
);
continue
;
...
...
@@ -6174,44 +6178,37 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//员工姓名
String
empName
=
param
.
getEmpName
();
if
(
StringUtils
.
isBlank
(
empName
)){
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
continue
;
}
//员工身份证
String
empIdCardNo
=
param
.
getEmpIdcardNo
();
if
(
StringUtils
.
isBlank
(
empIdCardNo
)){
if
(
StringUtils
.
isBlank
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
continue
;
}
//保险公司名称
String
insuranceCompanyName
=
param
.
getInsuranceCompanyName
();
if
(
StringUtils
.
isBlank
(
insuranceCompanyName
)){
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceCompanyName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EMPTY
);
continue
;
}
//险种名称
String
insuranceTypeName
=
param
.
getInsuranceTypeName
();
if
(
StringUtils
.
isBlank
(
insuranceTypeName
)){
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceTypeName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EMPTY
);
continue
;
}
//购买标准
String
buyStandard
=
param
.
getBuyStandard
();
if
(
StringUtils
.
isBlank
(
buyStandard
)){
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EMPTY
);
continue
;
}
//保单开始日期
String
policyStart
=
param
.
getPolicyStart
();
if
(
StringUtils
.
isBlank
(
policyStart
)){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NOT_EMPTY
);
continue
;
}
//保单结束日期
String
policyEnd
=
param
.
getPolicyEnd
();
if
(
StringUtils
.
isBlank
(
policyEnd
)){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_NOT_EMPTY
);
continue
;
}
...
...
@@ -6221,50 +6218,55 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
// 保单开始日期格式校验
if
(!
LocalDateUtil
.
isDate
(
p
olicyStart
,
LocalDateUtil
.
NORM_DATE_PATTERN
)){
if
(!
LocalDateUtil
.
isDate
(
p
aram
.
getPolicyStart
()
,
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
continue
;
}
// 保单结束日期格式校验
if
(!
LocalDateUtil
.
isDate
(
p
olicyEnd
,
LocalDateUtil
.
NORM_DATE_PATTERN
)){
if
(!
LocalDateUtil
.
isDate
(
p
aram
.
getPolicyEnd
()
,
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_PARSE_ERROR
);
continue
;
}
//表内数据重复 员工姓名、员工身份证号码、保险公司名称、险种名称、保单开始日期、保单结束日期、购买标准 去重
for
(
int
j
=
0
;
j
<
distinctList
.
size
();
j
++)
{
InsuranceHandleImportParam
repeat
=
distinctList
.
get
(
j
);
if
(
param
.
getEmpName
().
equals
(
repeat
.
getEmpName
())
&&
param
.
getEmpIdcardNo
().
equals
(
repeat
.
getEmpIdcardNo
())
&&
param
.
getInsuranceCompanyName
().
equals
(
repeat
.
getInsuranceCompanyName
())
&&
param
.
getInsuranceTypeName
().
equals
(
repeat
.
getInsuranceTypeName
())
&&
param
.
getPolicyStart
().
equals
(
repeat
.
getPolicyStart
())
&&
param
.
getPolicyEnd
().
equals
(
repeat
.
getPolicyEnd
())
&&
param
.
getBuyStandard
().
equals
(
repeat
.
getBuyStandard
())
&&
i
!=
j
){
StringBuilder
errorTemp
=
new
StringBuilder
();
errorTemp
.
append
(
param
.
getEmpName
());
errorTemp
.
append
(
"_"
);
errorTemp
.
append
(
param
.
getEmpIdcardNo
());
errorTemp
.
append
(
"_"
);
errorTemp
.
append
(
param
.
getInsuranceCompanyName
());
errorTemp
.
append
(
"_"
);
errorTemp
.
append
(
param
.
getInsuranceTypeName
());
errorTemp
.
append
(
"_"
);
errorTemp
.
append
(
param
.
getPolicyStart
());
errorTemp
.
append
(
"_"
);
errorTemp
.
append
(
param
.
getPolicyEnd
());
errorTemp
.
append
(
"_"
);
errorTemp
.
append
(
param
.
getBuyStandard
());
if
(
null
==
map
.
get
(
errorTemp
.
toString
()))
{
map
.
put
(
errorTemp
.
toString
(),
"1"
);
}
else
{
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
continue
outer
;
}
continue
;
}
LambdaQueryWrapper
<
TInsuranceDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getEmpName
,
empName
)
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
empIdCardNo
)
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
insuranceTypeName
)
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
buyStandard
)
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
p
olicyStart
)
)
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
p
olicyEnd
))
.
eq
(
TInsuranceDetail:
:
getEmpName
,
param
.
getEmpName
()
)
.
eq
(
TInsuranceDetail:
:
getEmpIdcardNo
,
param
.
getEmpIdcardNo
()
)
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeName
,
param
.
getInsuranceTypeName
()
)
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
param
.
getInsuranceCompanyName
()
)
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
param
.
getBuyStandard
()
)
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
LocalDateUtil
.
parseLocalDate
(
p
aram
.
getPolicyStart
()
)
)
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
LocalDateUtil
.
parseLocalDate
(
p
aram
.
getPolicyEnd
()
))
.
orderByDesc
(
TInsuranceDetail:
:
getUpdateTime
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
);
TInsuranceDetail
insuranceDetail
=
getOne
(
queryWrapper
);
insuranceDetail
=
getOne
(
queryWrapper
);
//如果保单信息为空
if
(
Common
.
isEmpty
(
insuranceDetail
)){
param
.
setErrorMessage
(
InsurancesConstants
.
USER_DATA_IS_NOT_EXIST
);
continue
;
}
String
detailId
=
insuranceDetail
.
getId
();
if
(
flag
){
//减员办理
//投保办理状态
...
...
@@ -6317,7 +6319,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
}
param
.
setId
(
detailId
);
param
.
setId
(
insuranceDetail
.
getId
()
);
param
.
setErrorMessage
(
CommonConstants
.
RESULT_DATA_SUCESS
);
}
return
distinctList
;
...
...
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