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
9ae5df94
Commit
9ae5df94
authored
Sep 01, 2025
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化-fxj
parent
bd42c09e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
TInsurancePolicyServiceImpl.java
...s/service/insurance/impl/TInsurancePolicyServiceImpl.java
+12
-3
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsurancePolicyServiceImpl.java
View file @
9ae5df94
...
...
@@ -302,7 +302,7 @@ public class TInsurancePolicyServiceImpl extends ServiceImpl<TInsurancePolicyMap
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"保单号【"
+
excel
.
getPolicyNo
()
+
"】与第"
+
policyNoMap
.
get
(
excel
.
getPolicyNo
())
+
"行重复,未导入"
));
continue
;
}
if
(
existMap
.
get
(
excel
.
getPolicyNo
())
=
=
null
){
if
(
existMap
.
get
(
excel
.
getPolicyNo
())
!
=
null
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"保单号【"
+
excel
.
getPolicyNo
()
+
"】已存在,未导入"
));
continue
;
}
...
...
@@ -320,6 +320,14 @@ public class TInsurancePolicyServiceImpl extends ServiceImpl<TInsurancePolicyMap
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"保单号【"
+
excel
.
getPolicyNo
()
+
"】的险种与保险公司不一致,未导入"
));
continue
;
}
if
(
LocalDateUtil
.
parseLocalDate
(
excel
.
getPolicyStart
())
==
null
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"保单号【"
+
excel
.
getPolicyNo
()
+
"】的保单开始时间格式错误,未导入"
));
continue
;
}
if
(
LocalDateUtil
.
parseLocalDate
(
excel
.
getPolicyEnd
())
==
null
){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"保单号【"
+
excel
.
getPolicyNo
()
+
"】的保单截止时间格式错误,未导入"
));
continue
;
}
policy
=
new
TInsurancePolicy
();
policy
.
setPolicyNo
(
excel
.
getPolicyNo
());
policy
.
setInsuranceCompanyName
(
excel
.
getInsuranceCompanyName
());
...
...
@@ -332,8 +340,9 @@ public class TInsurancePolicyServiceImpl extends ServiceImpl<TInsurancePolicyMap
policy
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
//插入保单维护信息
baseMapper
.
insert
(
policy
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"保存成功"
,
CommonConstants
.
GREEN
));
//插入保单维护操作日志
tBusinessOperateService
.
saveModificationRecord
(
policy
.
getId
(),
null
,
policy
,
InsurancesConstants
.
IMPORT_POLICY_REMARK
);
tBusinessOperateService
.
saveModificationRecord
(
policy
.
getId
(),
policy
,
policy
,
InsurancesConstants
.
IMPORT_POLICY_REMARK
);
policyNoMap
.
put
(
excel
.
getPolicyNo
(),
excel
.
getRowIndex
().
toString
());
// 清理map list 等数据
...
...
@@ -352,7 +361,7 @@ public class TInsurancePolicyServiceImpl extends ServiceImpl<TInsurancePolicyMap
List
<
TInsurancePolicy
>
policies
=
this
.
baseMapper
.
selectList
(
Wrappers
.<
TInsurancePolicy
>
query
().
lambda
()
.
in
(
TInsurancePolicy:
:
getPolicyNo
,
existNos
).
eq
(
TInsurancePolicy:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
policies
))
{
existMap
=
policies
.
stream
().
collect
(
Collectors
.
toMap
(
TInsurancePolicy:
:
getPolicyNo
,
TInsurancePolicy:
:
getId
));
existMap
=
policies
.
stream
().
collect
(
Collectors
.
toMap
(
TInsurancePolicy:
:
getPolicyNo
,
TInsurancePolicy:
:
getId
,(
v1
,
v2
)
->
v1
));
}
}
if
(!
Common
.
isNotNull
(
existMap
)){
...
...
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