Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit dfa41020
authored
Sep 13, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增权限控制
1 parent
905bec2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
src/test/java/cn/com/glsx/admin/modules/service/VehicleServiceTest.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
View file @
dfa4102
...
...
@@ -1099,7 +1099,14 @@ public class VehicleService {
}
if
(
search
.
getDeviceState
()
!=
null
)
{
vehicleInfoList
.
removeIf
(
vehicleInfoPageDTO
->
!
search
.
getDeviceState
().
equals
(
vehicleInfoPageDTO
.
getDeviceState
()));
vehicleInfoList
.
removeIf
(
vehicleInfoPageDTO
->
{
Integer
deviceState
=
vehicleInfoPageDTO
.
getDeviceState
();
if
(
deviceState
!=
null
)
{
return
search
.
getDeviceState
().
intValue
()
!=
deviceState
.
intValue
();
}
// deviceState 为null 的时候为删掉
return
true
;
});
}
return
new
PageInfo
<>(
vehicleInfoList
);
}
...
...
@@ -1229,7 +1236,14 @@ public class VehicleService {
}
if
(
search
.
getDeviceState
()
!=
null
)
{
vehicleInfoReportExportList
.
removeIf
(
vehicleInfoReportExport
->
!
search
.
getDeviceState
().
equals
(
vehicleInfoReportExport
.
getDeviceState
()));
vehicleInfoReportExportList
.
removeIf
(
vehicleInfoReportExport
->
{
Integer
deviceState
=
vehicleInfoReportExport
.
getDeviceState
();
if
(
deviceState
!=
null
)
{
return
search
.
getDeviceState
().
intValue
()
!=
deviceState
.
intValue
();
}
// deviceState 为null 的时候为删掉
return
true
;
});
}
return
vehicleInfoReportExportList
;
...
...
src/test/java/cn/com/glsx/admin/modules/service/VehicleServiceTest.java
View file @
dfa4102
...
...
@@ -2140,4 +2140,13 @@ public class VehicleServiceTest {
System
.
out
.
println
(
"trackInfoBo = "
+
JSON
.
toJSONString
(
trackInfoBo
));
}
@Test
public
void
test14
()
{
List
<
Integer
>
integers
=
new
ArrayList
<>();
integers
.
add
(
1
);
integers
.
add
(
4
);
integers
.
removeIf
(
a
->
a
!=
4
);
System
.
out
.
println
(
"integers = "
+
JSON
.
toJSONString
(
integers
));
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment