Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arxj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs
arxj
Commits
82c8338b
Commit
82c8338b
authored
3 years ago
by
cs
Browse files
Options
Downloads
Patches
Plain Diff
修复删除全部数组元素导致数组空指针的问题
parent
c26e2cf8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
service-biz/service-wechat-applet/service-wechat-applet-biz/src/main/java/com/hncy/service/wechat/applet/biz/service/impl/ComponentDetailServiceImpl.java
+15
-7
15 additions, 7 deletions
...t/applet/biz/service/impl/ComponentDetailServiceImpl.java
with
15 additions
and
7 deletions
service-biz/service-wechat-applet/service-wechat-applet-biz/src/main/java/com/hncy/service/wechat/applet/biz/service/impl/ComponentDetailServiceImpl.java
+
15
−
7
View file @
82c8338b
...
@@ -176,21 +176,29 @@ public class ComponentDetailServiceImpl extends ServiceImpl<ComponentDetailMappe
...
@@ -176,21 +176,29 @@ public class ComponentDetailServiceImpl extends ServiceImpl<ComponentDetailMappe
log
.
info
(
"84转百度的经度: {}, 以及纬度: {}"
,
WGS84Lng
,
WGS84Lat
);
log
.
info
(
"84转百度的经度: {}, 以及纬度: {}"
,
WGS84Lng
,
WGS84Lat
);
List
<
ComponentDetailVo
>
componentDetails
=
componentDetailMapper
.
judgeAIComponentIsExist
(
componentTypeName
,
WGS84Lng
,
WGS84Lat
);
List
<
ComponentDetailVo
>
componentDetails
=
componentDetailMapper
.
judgeAIComponentIsExist
(
componentTypeName
,
WGS84Lng
,
WGS84Lat
);
if
(
CollectionUtil
.
isEmpty
(
componentDetails
))
{
throw
new
LocalBusinessException
(
430
,
componentTypeName
);
}
log
.
info
(
"从数据库查询到的部件"
+
componentDetails
.
toString
());
log
.
info
(
"从数据库查询到的部件"
+
componentDetails
.
toString
());
/* Iterator<ComponentDetailVo> componentDetailIterator = componentDetails.iterator();
while (componentDetailIterator.hasNext()) {
PlatformAudit platformAudit = platformAuditMapper.selectByComponentId(componentDetailIterator.next().getId());
if (ObjectUtil.isNotNull(platformAudit) && platformAudit.getAuditStatus().equalsIgnoreCase(ARInspectionConstants.TWO)) {
componentDetailIterator.remove();
}
}*/
//剔除审核不通过的部件
//剔除审核不通过的部件
for
(
ComponentDetailVo
componentDetailVo
:
componentDetails
)
{
for
(
int
i
=
0
;
i
<
componentDetails
.
size
();
i
++
)
{
PlatformAudit
platformAudit
=
platformAuditMapper
.
selectByComponentId
(
componentDetail
Vo
.
getId
());
PlatformAudit
platformAudit
=
platformAuditMapper
.
selectByComponentId
(
componentDetail
s
.
get
(
i
)
.
getId
());
if
(
ObjectUtil
.
isNotNull
(
platformAudit
)
&&
platformAudit
.
getAuditStatus
().
equalsIgnoreCase
(
ARInspectionConstants
.
TWO
))
{
if
(
ObjectUtil
.
isNotNull
(
platformAudit
)
&&
platformAudit
.
getAuditStatus
().
equalsIgnoreCase
(
ARInspectionConstants
.
TWO
))
{
componentDetails
.
remove
(
componentDetailVo
);
componentDetails
.
remove
(
i
);
i
--;
}
}
}
}
log
.
info
(
"剔除审核不通过的部件"
+
componentDetails
.
toString
());
log
.
info
(
"剔除审核不通过的部件"
+
componentDetails
.
toString
());
if
(
CollectionUtil
.
isEmpty
(
componentDetails
))
{
throw
new
LocalBusinessException
(
430
,
componentTypeName
);
}
componentDetails
componentDetails
.
stream
()
.
stream
()
.
forEach
(
componentDetail
->
{
.
forEach
(
componentDetail
->
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment