Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
4b3a059f
提交
4b3a059f
authored
11月 18, 2020
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改门禁延迟
上级
c99bdd2f
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
+3
-3
AccessController.java
...n/java/com/tykj/dev/rfid/controller/AccessController.java
+3
-3
没有找到文件。
dev-rfid/src/main/java/com/tykj/dev/rfid/controller/AccessController.java
浏览文件 @
4b3a059f
...
@@ -135,7 +135,7 @@ public class AccessController {
...
@@ -135,7 +135,7 @@ public class AccessController {
outPutCardIds
.
removeAll
(
canOutputCardIds
);
outPutCardIds
.
removeAll
(
canOutputCardIds
);
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
outPutCardIds
.
forEach
(
s
->
deviceLibraries
.
addAll
(
deviceLibraryDao
.
getAllByRfidCardId
(
s
)));
outPutCardIds
.
forEach
(
s
->
deviceLibraries
.
addAll
(
deviceLibraryDao
.
getAllByRfidCardId
(
s
)));
//获取最近1
分钟
报警的Id
//获取最近1
0s
报警的Id
List
<
Integer
>
ids
=
getLatestWarningDeviceIds
();
List
<
Integer
>
ids
=
getLatestWarningDeviceIds
();
//排除使用状态中的装备,映射成id
//排除使用状态中的装备,映射成id
List
<
Integer
>
idList
=
deviceLibraries
.
stream
().
filter
(
deviceLibrary
->
deviceLibrary
.
getLifeStatus
()!=
14
).
map
(
DeviceLibrary:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
idList
=
deviceLibraries
.
stream
().
filter
(
deviceLibrary
->
deviceLibrary
.
getLifeStatus
()!=
14
).
map
(
DeviceLibrary:
:
getId
).
collect
(
Collectors
.
toList
());
...
@@ -198,12 +198,12 @@ public class AccessController {
...
@@ -198,12 +198,12 @@ public class AccessController {
}
}
/**
/**
* 获取最近1
分钟
内出库异常的装备Id
* 获取最近1
0s
内出库异常的装备Id
*/
*/
private
List
<
Integer
>
getLatestWarningDeviceIds
(){
private
List
<
Integer
>
getLatestWarningDeviceIds
(){
return
libraryWarningLogDetailDao
.
findAll
().
stream
().
filter
(
libraryWarningLogDetail
->
{
return
libraryWarningLogDetailDao
.
findAll
().
stream
().
filter
(
libraryWarningLogDetail
->
{
Boolean
isOutPut
=
"异常出库"
.
equals
(
libraryWarningLogDetail
.
getInventoryResults
());
Boolean
isOutPut
=
"异常出库"
.
equals
(
libraryWarningLogDetail
.
getInventoryResults
());
Boolean
isLatest
=
System
.
currentTimeMillis
()
-
libraryWarningLogDetail
.
getUpdateTime
().
getTime
()<
6
0_000
;
Boolean
isLatest
=
System
.
currentTimeMillis
()
-
libraryWarningLogDetail
.
getUpdateTime
().
getTime
()<
1
0_000
;
return
isOutPut
&&
isLatest
;
return
isOutPut
&&
isLatest
;
}).
map
(
LibraryWarningLogDetail:
:
getDeviceId
).
collect
(
Collectors
.
toList
());
}).
map
(
LibraryWarningLogDetail:
:
getDeviceId
).
collect
(
Collectors
.
toList
());
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论