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 32e3f345
authored
Dec 27, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化设备号 in 查询
1 parent
637e3523
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
9 deletions
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
src/main/java/cn/com/glsx/admin/modules/service/HomeService.java
src/main/resources/mapper/VehicleMapper.xml
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
View file @
32e3f34
...
@@ -198,10 +198,10 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
...
@@ -198,10 +198,10 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
* 统计设备离线数
* 统计设备离线数
*
*
* @param
* @param
* @param offlineSn
List
不计算离线的设备集合
* @param offlineSn
Str
不计算离线的设备集合
* @param offlineTime
离线时间
* @param offlineTime 离线时间
* @return
* @return
*/
*/
@DataPerm
(
showSql
=
true
)
@DataPerm
(
showSql
=
true
)
Integer
getOfflineNumber
(
@Param
(
"offlineSn
List"
)
List
<
String
>
offlineSnList
,
@Param
(
"offlineTime"
)
long
offlineTime
);
Integer
getOfflineNumber
(
@Param
(
"offlineSn
Str"
)
String
offlineSnStr
,
@Param
(
"offlineTime"
)
long
offlineTime
);
}
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/admin/modules/service/HomeService.java
View file @
32e3f34
...
@@ -100,7 +100,7 @@ public class HomeService {
...
@@ -100,7 +100,7 @@ public class HomeService {
}
}
// 调用警情微服务查询老E盾库中设备离线数量
// 调用警情微服务查询老E盾库中设备离线数量
Integer
offlineNumber
=
vehicleMapper
.
getOfflineNumber
(
offlineSn
List
,
offlineTime
);
Integer
offlineNumber
=
vehicleMapper
.
getOfflineNumber
(
offlineSn
Str
,
offlineTime
);
returnMap
.
put
(
"offlineNumber"
,
offlineNumber
);
returnMap
.
put
(
"offlineNumber"
,
offlineNumber
);
//设备在线数
//设备在线数
int
onlineNumber
=
allActiveNumber
-
offlineNumber
;
int
onlineNumber
=
allActiveNumber
-
offlineNumber
;
...
...
src/main/resources/mapper/VehicleMapper.xml
View file @
32e3f34
...
@@ -776,11 +776,8 @@
...
@@ -776,11 +776,8 @@
or
or
(timestampdiff(SECOND, tdl.last_bs_time, now())
>
#{offlineTime} and td.source = 0)
(timestampdiff(SECOND, tdl.last_bs_time, now())
>
#{offlineTime} and td.source = 0)
)
)
<if
test=
"offlineSnList!=null and offlineSnList.size()>0"
>
<if
test=
"offlineSnStr != null and offlineSnStr != ''"
>
and tvd.sn not in
and tvd.sn not in (${offlineSnStr})
<foreach
collection=
"offlineSnList"
item=
"sn"
open=
"("
separator=
","
close=
")"
>
#{sn}
</foreach>
</if>
</if>
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
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