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
486621a2
Commit
486621a2
authored
Dec 02, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商险导出修改
parent
99e50344
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
138 deletions
+27
-138
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+27
-138
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 @
486621a2
...
@@ -1320,11 +1320,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1320,11 +1320,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
@Override
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
})
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
})
public
R
<
List
<
InsuranceHandleImportParam
>>
insuranceHandleImport
(
YifuUser
user
,
List
<
InsuranceHandleImportParam
>
param
)
{
public
R
<
List
<
InsuranceHandleImportParam
>>
insuranceHandleImport
(
YifuUser
user
,
List
<
InsuranceHandleImportParam
>
param
)
{
Map
<
String
,
List
<
InsuranceHandleImportParam
>>
map
=
insuranceChangeCheck
(
param
,
user
,
false
);
List
<
InsuranceHandleImportParam
>
operateList
=
insuranceChangeCheck
(
param
,
false
);
//检验成功的数据
//检验成功的数据
List
<
InsuranceHandleImportParam
>
successList
=
map
.
get
(
InsurancesConstants
.
SUCCESS_LIST
);
List
<
InsuranceHandleImportParam
>
successList
=
operateList
.
stream
().
filter
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)).
collect
(
Collectors
.
toList
());
//校验失败的数据
List
<
InsuranceHandleImportParam
>
errorList
=
map
.
get
(
InsurancesConstants
.
ERROR_LIST
);
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
//投保成功的数据
//投保成功的数据
List
<
InsuranceHandleImportParam
>
collectSuccess
=
successList
.
stream
().
filter
(
e
->
InsurancesConstants
.
SUCCESS
.
equals
(
e
.
getHandType
())).
collect
(
Collectors
.
toList
());
List
<
InsuranceHandleImportParam
>
collectSuccess
=
successList
.
stream
().
filter
(
e
->
InsurancesConstants
.
SUCCESS
.
equals
(
e
.
getHandType
())).
collect
(
Collectors
.
toList
());
...
@@ -1357,7 +1355,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1357,7 +1355,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
this
.
rollBackInsurance
(
user
,
list
);
this
.
rollBackInsurance
(
user
,
list
);
}
}
}
}
return
R
.
ok
(
errorList
,
InsurancesConstants
.
IMPORT_SUCCESS
);
if
(
operateList
.
stream
().
allMatch
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)))
{
operateList
=
null
;
}
return
R
.
ok
(
operateList
,
InsurancesConstants
.
IMPORT_SUCCESS
);
}
}
/**
/**
...
@@ -1571,7 +1572,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1571,7 +1572,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return: void
* @return: void
**/
**/
private
void
doFailInfo
(
List
<
TInsuranceDetail
>
sourceList
,
List
<
String
>
sourceIdCardList
,
List
<
String
>
replaceIdList
,
String
toStatus
)
{
private
void
doFailInfo
(
List
<
TInsuranceDetail
>
sourceList
,
List
<
String
>
sourceIdCardList
,
List
<
String
>
replaceIdList
,
String
toStatus
)
{
List
<
TInsuranceDetail
>
sourceEmpList
=
baseMapper
.
selectByIdCardList
(
sourceIdCardList
,
replaceIdList
);
List
<
TInsuranceDetail
>
sourceEmpList
=
null
;
if
(
sourceIdCardList
!=
null
&&
!
sourceIdCardList
.
isEmpty
())
{
sourceEmpList
=
baseMapper
.
selectByIdCardList
(
sourceIdCardList
,
replaceIdList
);
}
if
(
sourceEmpList
!=
null
&&
!
sourceEmpList
.
isEmpty
())
{
if
(
sourceEmpList
!=
null
&&
!
sourceEmpList
.
isEmpty
())
{
// 项目档案状态
// 项目档案状态
Map
<
String
,
Integer
>
proStatusMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
proStatusMap
=
new
HashMap
<>();
...
@@ -1721,11 +1725,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1721,11 +1725,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
}
Map
<
String
,
List
<
InsuranceRegisterParam
>>
map
=
registeredPolicyPremiumCheck
(
paramList
,
user
);
List
<
InsuranceRegisterParam
>
operatList
=
registeredPolicyPremiumCheck
(
paramList
);
//返回给前端的结果
List
<
InsuranceRegisterParam
>
listResult
=
map
.
get
(
"listResult"
);
//保存到数据库中的结果
//保存到数据库中的结果
List
<
InsuranceRegisterParam
>
listSuccess
=
map
.
get
(
"listSuccess"
);
List
<
InsuranceRegisterParam
>
listSuccess
=
operatList
.
stream
().
filter
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)).
collect
(
Collectors
.
toList
()
);
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
for
(
InsuranceRegisterParam
success
:
listSuccess
)
{
for
(
InsuranceRegisterParam
success
:
listSuccess
)
{
...
@@ -2043,62 +2045,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -2043,62 +2045,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//操作记录
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REGISTERED
,
null
,
CommonConstants
.
ONE_INT
);
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REGISTERED
,
null
,
CommonConstants
.
ONE_INT
);
return
R
.
ok
(
listResult
,
InsurancesConstants
.
OPERATE_SUCCESS
);
if
(
operatList
.
stream
().
allMatch
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)))
{
}
operatList
=
null
;
/*
* 获取当前保单的结算状态
*
* @author zhaji
* @param
* @return {@link String}
*/
@Override
public
void
pushActualPremium
(){
List
<
TInsuranceDetail
>
list
=
baseMapper
.
selectPushList
();
for
(
TInsuranceDetail
detail:
list
){
//推作废
pushEstimate
(
detail
,
CommonConstants
.
FIVE_INT
);
}
for
(
TInsuranceDetail
detail:
list
){
//单独结算
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())
&&
detail
.
getSettleType
()
==
CommonConstants
.
ONE_INT
)
{
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
TWO_INT
);
//如果推送成功则更改推送状态
if
(
StringUtils
.
isNotBlank
(
s
)
&&
Common
.
isNotNull
(
settle
))
{
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
tInsuranceSettleService
.
updateById
(
settle
);
}
}
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())
&&
detail
.
getSettleType
()
==
CommonConstants
.
ZERO_INT
)
{
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
TInsuranceDetail
t
=
new
TInsuranceDetail
();
BeanUtils
.
copyProperties
(
detail
,
t
);
if
(
Common
.
isEmpty
(
detail
.
getEstimatePremium
()))
{
detail
.
setEstimatePremium
(
detail
.
getActualPremium
());
}
String
s1
=
pushEstimate
(
detail
,
CommonConstants
.
ONE_INT
);
//如果推送成功则更改推送状态
if
(
StringUtils
.
isNotBlank
(
s1
)
&&
Common
.
isNotNull
(
settle
))
{
settle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
settle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
}
if
(
Common
.
isEmpty
(
t
.
getEstimatePremium
()))
{
t
.
setEstimatePremium
(
t
.
getActualPremium
());
}
String
s2
=
pushEstimate
(
t
,
CommonConstants
.
TWO_INT
);
//如果推送成功则更改推送状态
if
(
StringUtils
.
isNotBlank
(
s2
)
&&
Common
.
isNotNull
(
settle
))
{
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
settle
);
}
}
}
}
return
R
.
ok
(
operatList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
}
/**
/**
...
@@ -3156,75 +3106,60 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3156,75 +3106,60 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param paramList
* @param paramList
* @return {@link Map<String, List<InsuranceRegisterParam>>}
* @return {@link Map<String, List<InsuranceRegisterParam>>}
*/
*/
private
Map
<
String
,
List
<
InsuranceRegisterParam
>>
registeredPolicyPremiumCheck
(
List
<
InsuranceRegisterParam
>
paramList
,
YifuUser
user
){
private
List
<
InsuranceRegisterParam
>
registeredPolicyPremiumCheck
(
List
<
InsuranceRegisterParam
>
paramList
){
Map
<
String
,
List
<
InsuranceRegisterParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceRegisterParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceRegisterParam
>
listSuccess
=
new
ArrayList
<>();
for
(
InsuranceRegisterParam
param
:
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
()))
{
for
(
InsuranceRegisterParam
param
:
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
()))
{
// 必填校验
// 必填校验
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getEmpIdcardNo
())){
if
(
StringUtils
.
isBlank
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceCompanyName
())){
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceCompanyName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceTypeName
())){
if
(
StringUtils
.
isBlank
(
param
.
getInsuranceTypeName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
())){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyStart
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyEnd
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyEnd
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_PARSE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
if
(
StringUtils
.
isBlank
(
param
.
getBuyStandard
())){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyNo
())){
if
(
StringUtils
.
isNotBlank
(
param
.
getPolicyNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getPolicyNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getPolicyNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_MORE_THAN_50
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_MORE_THAN_50
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getActualPremium
())){
if
(
StringUtils
.
isNotBlank
(
param
.
getActualPremium
())){
if
(!
ValidityUtil
.
validateMoney
(
param
.
getActualPremium
())){
if
(!
ValidityUtil
.
validateMoney
(
param
.
getActualPremium
())){
param
.
setErrorMessage
(
InsurancesConstants
.
ACTUAL_PREMIUM_PARSE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
ACTUAL_PREMIUM_PARSE_ERROR
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
if
(
StringUtils
.
isNotBlank
(
param
.
getInvoiceNo
())){
if
(
StringUtils
.
isNotBlank
(
param
.
getInvoiceNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getInvoiceNo
())){
if
(!
ValidityUtil
.
validate50
(
param
.
getInvoiceNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
INVOICE_NO_MORE_THAN_50
);
param
.
setErrorMessage
(
InsurancesConstants
.
INVOICE_NO_MORE_THAN_50
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -3243,7 +3178,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3243,7 +3178,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
);
);
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
detail
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
DATA_IS_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
DATA_IS_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
continue
;
}
else
{
}
else
{
LambdaQueryWrapper
<
TInsuranceEkp
>
ekpLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TInsuranceEkp
>
ekpLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
...
@@ -3251,19 +3185,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3251,19 +3185,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
TInsuranceEkp
>
ekpList
=
tInsuranceEkpService
.
list
(
ekpLambdaQueryWrapper
);
List
<
TInsuranceEkp
>
ekpList
=
tInsuranceEkpService
.
list
(
ekpLambdaQueryWrapper
);
if
(
CollectionUtils
.
isNotEmpty
(
ekpList
)){
if
(
CollectionUtils
.
isNotEmpty
(
ekpList
)){
param
.
setErrorMessage
(
InsurancesConstants
.
EKP_SEND_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
EKP_SEND_ERROR
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
// 如果保费不存在,保单号、保费必填
// 如果保费不存在,保单号、保费必填
if
(
detail
.
getActualPremium
()
==
null
){
if
(
detail
.
getActualPremium
()
==
null
){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyNo
())){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isBlank
(
param
.
getActualPremium
())){
if
(
StringUtils
.
isBlank
(
param
.
getActualPremium
())){
param
.
setErrorMessage
(
InsurancesConstants
.
ACTUAL_PREMIUM_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
ACTUAL_PREMIUM_EMPTY
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -3279,13 +3210,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3279,13 +3210,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
);
);
if
(!
Optional
.
ofNullable
(
batchPolicyNo
).
isPresent
()){
if
(!
Optional
.
ofNullable
(
batchPolicyNo
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
continue
;
}
else
{
}
else
{
//批增类型,保单号已存在但是和派单时填写的不一致
//批增类型,保单号已存在但是和派单时填写的不一致
if
(!
detail
.
getPolicyNo
().
equals
(
param
.
getPolicyNo
())){
if
(!
detail
.
getPolicyNo
().
equals
(
param
.
getPolicyNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_ERROR
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -3304,12 +3233,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3304,12 +3233,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Optional
.
ofNullable
(
addPolicyNo
).
isPresent
()){
if
(
Optional
.
ofNullable
(
addPolicyNo
).
isPresent
()){
if
(!
addPolicyNo
.
getInsuranceCompanyName
().
equals
(
param
.
getInsuranceCompanyName
())){
if
(!
addPolicyNo
.
getInsuranceCompanyName
().
equals
(
param
.
getInsuranceCompanyName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_COMPANY_NAME_NOT_SAME
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_COMPANY_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(!
addPolicyNo
.
getInsuranceTypeName
().
equals
(
param
.
getInsuranceTypeName
())){
if
(!
addPolicyNo
.
getInsuranceTypeName
().
equals
(
param
.
getInsuranceTypeName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_TYPE_NAME_NOT_SAME
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_NO_TYPE_NAME_NOT_SAME
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -3318,22 +3245,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3318,22 +3245,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
detail
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
){
if
(
detail
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_TYPE_FOUR_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_TYPE_FOUR_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
ONE_INT
){
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
ONE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_ONE_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_ONE_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
TWO_INT
){
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
TWO_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_TWO_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FOUR_INT
){
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FOUR_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_FOUR_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_FOUR_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
//保单号是否更新
//保单号是否更新
...
@@ -3357,12 +3280,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3357,12 +3280,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
booleanActualPremium
&&
!
booleanPolicyNo
&&
!
booleanInvoiceNo
){
if
(
booleanActualPremium
&&
!
booleanPolicyNo
&&
!
booleanInvoiceNo
){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -3370,12 +3291,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3370,12 +3291,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(!
booleanPolicyNo
||
!
booleanInvoiceNo
){
if
(!
booleanPolicyNo
||
!
booleanInvoiceNo
){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
estimateStatus
)
||
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
estimateStatus
)
||
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
estimateStatus
)
||
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
estimateStatus
)
||
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -3394,25 +3313,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3394,25 +3313,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
booleanActualPremium
&&
!
booleanPolicyNo
&&
!
booleanInvoiceNo
){
if
(
booleanActualPremium
&&
!
booleanPolicyNo
&&
!
booleanInvoiceNo
){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
actualStatus
)){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
listResult
.
add
(
param
);
continue
;
continue
;
}
}
}
}
}
}
}
}
}
}
}
}
listSuccess
.
add
(
param
);
param
.
setErrorMessage
(
CommonConstants
.
RESULT_DATA_SUCESS
);
}
}
map
.
put
(
"listResult"
,
listResult
);
return
paramList
;
map
.
put
(
"listSuccess"
,
listSuccess
);
return
map
;
}
}
/**
/**
...
@@ -4047,9 +3961,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -4047,9 +3961,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
insuranceRefundImportList
.
size
()
>
CommonConstants
.
IMPORT_TWENTY_THOUSAND
){
if
(
insuranceRefundImportList
.
size
()
>
CommonConstants
.
IMPORT_TWENTY_THOUSAND
){
return
R
.
failed
(
InsurancesConstants
.
IMPORT_TOO_LONG
);
return
R
.
failed
(
InsurancesConstants
.
IMPORT_TOO_LONG
);
}
}
Map
<
String
,
List
<
InsuranceHandleImportParam
>>
map
=
insuranceChangeCheck
(
insuranceRefundImportList
,
user
,
true
);
List
<
InsuranceHandleImportParam
>
list
=
insuranceChangeCheck
(
insuranceRefundImportList
,
true
);
List
<
InsuranceHandleImportParam
>
successList
=
map
.
get
(
InsurancesConstants
.
SUCCESS_LIST
);
//检验成功的数据
List
<
InsuranceHandleImportParam
>
errorList
=
map
.
get
(
InsurancesConstants
.
ERROR_LIST
);
List
<
InsuranceHandleImportParam
>
successList
=
list
.
stream
().
filter
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)).
collect
(
Collectors
.
toList
()
);
//减员退回
//减员退回
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>(
16
);
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>(
16
);
List
<
TInsuranceDetail
>
sourceList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
sourceList
=
new
ArrayList
<>();
...
@@ -4100,7 +4014,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -4100,7 +4014,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceOperateService
.
saveBatch
(
operateList
);
tInsuranceOperateService
.
saveBatch
(
operateList
);
// 减员失效
// 减员失效
this
.
doFailInfo
(
sourceList
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
THREE_STRING
);
this
.
doFailInfo
(
sourceList
,
sourceIdCardList
,
replaceIdList
,
CommonConstants
.
THREE_STRING
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
IMPORT_SUCCESS
);
if
(
list
.
stream
().
allMatch
(
e
->
e
.
getErrorMessage
().
equals
(
CommonConstants
.
RESULT_DATA_SUCESS
)))
{
list
=
null
;
}
return
R
.
ok
(
list
,
InsurancesConstants
.
IMPORT_SUCCESS
);
}
}
/**
/**
...
@@ -5516,14 +5433,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5516,14 +5433,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*
*
* @author zhaji
* @author zhaji
* @param checkList 投保成功/退回/减员办理校验
* @param checkList 投保成功/退回/减员办理校验
* @param user
* @param flag true 减员 false 投保成功/退回
* @param flag true 减员 false 投保成功/退回
* @return {@link Map<String, List<InsuranceHandleImportParam>}
* @return {@link Map<String, List<InsuranceHandleImportParam>}
*/
*/
private
Map
<
String
,
List
<
InsuranceHandleImportParam
>>
insuranceChangeCheck
(
List
<
InsuranceHandleImportParam
>
checkList
,
YifuUser
user
,
Boolean
flag
)
{
private
List
<
InsuranceHandleImportParam
>
insuranceChangeCheck
(
List
<
InsuranceHandleImportParam
>
checkList
,
boolean
flag
)
{
Map
<
String
,
List
<
InsuranceHandleImportParam
>>
map
=
new
HashMap
<>(
16
);
List
<
InsuranceHandleImportParam
>
errorList
=
new
ArrayList
<>();
List
<
InsuranceHandleImportParam
>
successList
=
new
ArrayList
<>();
List
<
InsuranceHandleImportParam
>
distinctList
=
checkList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
List
<
InsuranceHandleImportParam
>
distinctList
=
checkList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
//定义外层循环标识,方便去重的时候跳出
//定义外层循环标识,方便去重的时候跳出
outer:
outer:
...
@@ -5533,91 +5446,77 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5533,91 +5446,77 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
String
handType
=
param
.
getHandType
();
String
handType
=
param
.
getHandType
();
if
(
StringUtils
.
isBlank
(
handType
)){
if
(
StringUtils
.
isBlank
(
handType
)){
param
.
setErrorMessage
(
InsurancesConstants
.
HAND_RESULT_IS_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
HAND_RESULT_IS_EMPTY
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
if
(!
InsurancesConstants
.
SUCCESS
.
equals
(
handType
)
&&
!
InsurancesConstants
.
FAILED
.
equals
(
handType
)){
if
(!
InsurancesConstants
.
SUCCESS
.
equals
(
handType
)
&&
!
InsurancesConstants
.
FAILED
.
equals
(
handType
)){
param
.
setErrorMessage
(
InsurancesConstants
.
HAND_RESULT_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
HAND_RESULT_ERROR
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//办理意见
//办理意见
String
remark
=
param
.
getRemark
();
String
remark
=
param
.
getRemark
();
if
(
InsurancesConstants
.
FAILED
.
equals
(
handType
)
&&
StringUtils
.
isBlank
(
remark
)){
if
(
InsurancesConstants
.
FAILED
.
equals
(
handType
)
&&
StringUtils
.
isBlank
(
remark
)){
param
.
setErrorMessage
(
InsurancesConstants
.
ROLLBACK_MESSAGE_IS_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
ROLLBACK_MESSAGE_IS_EMPTY
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isNotBlank
(
remark
)
&&
!
ValidityUtil
.
validate50
(
remark
)){
if
(
StringUtils
.
isNotBlank
(
remark
)
&&
!
ValidityUtil
.
validate50
(
remark
)){
param
.
setErrorMessage
(
InsurancesConstants
.
HAND_REMARK_NOT_MORE_THAN_50
);
param
.
setErrorMessage
(
InsurancesConstants
.
HAND_REMARK_NOT_MORE_THAN_50
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//员工姓名
//员工姓名
String
empName
=
param
.
getEmpName
();
String
empName
=
param
.
getEmpName
();
if
(
StringUtils
.
isBlank
(
empName
)){
if
(
StringUtils
.
isBlank
(
empName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//员工身份证
//员工身份证
String
empIdCardNo
=
param
.
getEmpIdcardNo
();
String
empIdCardNo
=
param
.
getEmpIdcardNo
();
if
(
StringUtils
.
isBlank
(
empIdCardNo
)){
if
(
StringUtils
.
isBlank
(
empIdCardNo
)){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//保险公司名称
//保险公司名称
String
insuranceCompanyName
=
param
.
getInsuranceCompanyName
();
String
insuranceCompanyName
=
param
.
getInsuranceCompanyName
();
if
(
StringUtils
.
isBlank
(
insuranceCompanyName
)){
if
(
StringUtils
.
isBlank
(
insuranceCompanyName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_COMPANY_NAME_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//险种名称
//险种名称
String
insuranceTypeName
=
param
.
getInsuranceTypeName
();
String
insuranceTypeName
=
param
.
getInsuranceTypeName
();
if
(
StringUtils
.
isBlank
(
insuranceTypeName
)){
if
(
StringUtils
.
isBlank
(
insuranceTypeName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_TYPE_NAME_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//购买标准
//购买标准
String
buyStandard
=
param
.
getBuyStandard
();
String
buyStandard
=
param
.
getBuyStandard
();
if
(
StringUtils
.
isBlank
(
buyStandard
)){
if
(
StringUtils
.
isBlank
(
buyStandard
)){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_STANDARD_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//保单开始日期
//保单开始日期
String
policyStart
=
param
.
getPolicyStart
();
String
policyStart
=
param
.
getPolicyStart
();
if
(
StringUtils
.
isBlank
(
policyStart
)){
if
(
StringUtils
.
isBlank
(
policyStart
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//保单结束日期
//保单结束日期
String
policyEnd
=
param
.
getPolicyEnd
();
String
policyEnd
=
param
.
getPolicyEnd
();
if
(
StringUtils
.
isBlank
(
policyEnd
)){
if
(
StringUtils
.
isBlank
(
policyEnd
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_NOT_EMPTY
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_NOT_EMPTY
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
// 身份证号位数校验(18 位合法)
// 身份证号位数校验(18 位合法)
if
(!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
if
(!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
// 保单开始日期格式校验
// 保单开始日期格式校验
if
(!
LocalDateUtil
.
isDate
(
policyStart
,
LocalDateUtil
.
NORM_DATE_PATTERN
)){
if
(!
LocalDateUtil
.
isDate
(
policyStart
,
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
// 保单结束日期格式校验
// 保单结束日期格式校验
if
(!
LocalDateUtil
.
isDate
(
policyEnd
,
LocalDateUtil
.
NORM_DATE_PATTERN
)){
if
(!
LocalDateUtil
.
isDate
(
policyEnd
,
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_PARSE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_END_PARSE_ERROR
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
...
@@ -5633,7 +5532,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5633,7 +5532,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
&&
param
.
getBuyStandard
().
equals
(
repeat
.
getBuyStandard
())
&&
param
.
getBuyStandard
().
equals
(
repeat
.
getBuyStandard
())
&&
i
!=
j
){
&&
i
!=
j
){
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
DUPLICATE_DATA_ERROR
);
errorList
.
add
(
param
);
continue
outer
;
continue
outer
;
}
}
}
}
...
@@ -5653,7 +5551,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5653,7 +5551,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//如果保单信息为空
//如果保单信息为空
if
(
Common
.
isEmpty
(
insuranceDetail
)){
if
(
Common
.
isEmpty
(
insuranceDetail
)){
param
.
setErrorMessage
(
InsurancesConstants
.
USER_DATA_IS_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
USER_DATA_IS_NOT_EXIST
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
String
detailId
=
insuranceDetail
.
getId
();
String
detailId
=
insuranceDetail
.
getId
();
...
@@ -5666,44 +5563,37 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5666,44 +5563,37 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//商险待投保,无法办理
//商险待投保,无法办理
if
(
CommonConstants
.
ONE_INT
==
buyHandleStatus
){
if
(
CommonConstants
.
ONE_INT
==
buyHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_ONE_HANDLE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_ONE_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//商险投保中,无法办理
//商险投保中,无法办理
if
(
CommonConstants
.
TWO_INT
==
buyHandleStatus
){
if
(
CommonConstants
.
TWO_INT
==
buyHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_TWO_HANDLE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_TWO_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//商险投保成功,无法办理
//商险投保成功,无法办理
if
(
CommonConstants
.
THREE_INT
==
buyHandleStatus
&&
null
==
reduceHandleStatus
){
if
(
CommonConstants
.
THREE_INT
==
buyHandleStatus
&&
null
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_THREE_HANDLE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_THREE_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//商险投保退回,无法办理
//商险投保退回,无法办理
if
(
CommonConstants
.
FOUR_INT
==
buyHandleStatus
){
if
(
CommonConstants
.
FOUR_INT
==
buyHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_FOUR_HANDLE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
BUY_HANDLE_STATUS_FOUR_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
if
(
null
!=
reduceHandleStatus
){
if
(
null
!=
reduceHandleStatus
){
//待减员
//待减员
if
(
CommonConstants
.
ONE_INT
==
reduceHandleStatus
){
if
(
CommonConstants
.
ONE_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_ONE_HANDLE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_ONE_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//减员退回
//减员退回
if
(
CommonConstants
.
THREE_INT
==
reduceHandleStatus
){
if
(
CommonConstants
.
THREE_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_FOUR_HANDLE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_FOUR_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
//已减员
//已减员
if
(
CommonConstants
.
FOUR_INT
==
reduceHandleStatus
){
if
(
CommonConstants
.
FOUR_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_THREE_HANDLE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_THREE_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
}
}
...
@@ -5713,12 +5603,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -5713,12 +5603,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CommonConstants
.
TWO_INT
!=
insuranceDetail
.
getBuyHandleStatus
()){
if
(
CommonConstants
.
TWO_INT
!=
insuranceDetail
.
getBuyHandleStatus
()){
String
buyHandleStatus
=
getBuyHandleStatus
(
insuranceDetail
.
getBuyHandleStatus
());
String
buyHandleStatus
=
getBuyHandleStatus
(
insuranceDetail
.
getBuyHandleStatus
());
param
.
setErrorMessage
(
"当前为"
+
buyHandleStatus
+
"状态,不可办理"
);
param
.
setErrorMessage
(
"当前为"
+
buyHandleStatus
+
"状态,不可办理"
);
errorList
.
add
(
param
);
continue
;
continue
;
}
}
}
}
param
.
setId
(
detailId
);
param
.
setId
(
detailId
);
successList
.
add
(
param
);
param
.
setErrorMessage
(
CommonConstants
.
RESULT_DATA_SUCESS
);
}
}
map
.
put
(
InsurancesConstants
.
SUCCESS_LIST
,
successList
);
map
.
put
(
InsurancesConstants
.
SUCCESS_LIST
,
successList
);
map
.
put
(
InsurancesConstants
.
ERROR_LIST
,
errorList
);
map
.
put
(
InsurancesConstants
.
ERROR_LIST
,
errorList
);
...
...
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