Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
150674a6
提交
150674a6
authored
6月 11, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
96fa8899
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
18 行增加
和
11 行删除
+18
-11
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+4
-0
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+2
-2
AccessController.java
...n/java/com/tykj/dev/rfid/controller/AccessController.java
+12
-9
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
150674a6
...
...
@@ -275,11 +275,13 @@ public class DeviceLibraryController {
DeviceLibrary:
:
addChildNode
);
Map
<
Integer
,
String
>
lifeStatusMap
=
configCache
.
getLifeStatusMap
();
Map
<
Integer
,
String
>
matchingRangeMap
=
configCache
.
getMatchingRangeMap
();
Set
<
Integer
>
status
=
new
HashSet
<>();
Set
<
String
>
models
=
new
HashSet
<>();
Set
<
String
>
names
=
new
HashSet
<>();
Set
<
String
>
ownUnits
=
new
HashSet
<>();
Set
<
String
>
locationUnits
=
new
HashSet
<>();
Set
<
Integer
>
matchingRanges
=
new
HashSet
<>();
resultList
.
forEach
(
deviceVo
->
{
deviceVo
.
setConfigName
();
status
.
add
(
deviceVo
.
getLifeStatus
());
...
...
@@ -287,12 +289,14 @@ public class DeviceLibraryController {
names
.
add
(
deviceVo
.
getName
());
ownUnits
.
add
(
deviceVo
.
getOwnUnit
());
locationUnits
.
add
(
deviceVo
.
getLocationUnit
());
matchingRanges
.
add
(
deviceVo
.
getMatchingRange
());
});
map
.
put
(
"models"
,
models
);
map
.
put
(
"names"
,
names
);
map
.
put
(
"ownUnits"
,
ownUnits
);
map
.
put
(
"locationUnits"
,
locationUnits
);
map
.
put
(
"lifeStatus"
,
status
.
stream
().
map
(
integer
->
new
LifeStatusVo
(
integer
,
lifeStatusMap
.
get
(
integer
))).
collect
(
Collectors
.
toList
()));
map
.
put
(
"matchingRanges"
,
matchingRanges
.
stream
().
map
(
integer
->
new
LifeStatusVo
(
integer
,
matchingRangeMap
.
get
(
integer
))).
collect
(
Collectors
.
toList
()));
Page
<
DeviceLibrary
>
deviceLibraryEntities
=
PageUtil
.
getPerPage
(
deviceLibrarySelectVo
.
getPage
(),
deviceLibrarySelectVo
.
getSize
(),
containList
,
deviceLibrarySelectVo
.
getPageable
());
map
.
put
(
"pages"
,
deviceLibraryEntities
);
return
ResultUtil
.
success
(
map
);
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
150674a6
...
...
@@ -989,12 +989,12 @@ public class RepairController {
//不缺少单据直接办结
if
(
repairReceiveVo
.
getStatus
()==
0
)
{
userIds
.
add
(
userId
);
TaskBto
taskBto1
=
new
TaskBto
(
StatusEnum
.
END
.
id
,
repairBackBill
.
getSendUnit
()+
"维修退回型号"
+
StringSplitUtil
.
stringListToString
(
repairReceiveVo
.
getScriptSaveVos
().
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))+
"共有"
+
repairBackBill
.
get
Sending
Count
()+
"件至"
+
repairBackBill
.
getReceiveUnit
(),
null
,
"."
,
repairBackBill1
.
getId
(),
BusinessEnum
.
REPAIR_BACK
.
id
,
userUtils
.
getCurrentUnitId
(),
0
,
"country"
,
userIds
);
TaskBto
taskBto1
=
new
TaskBto
(
StatusEnum
.
END
.
id
,
repairBackBill
.
getSendUnit
()+
"维修退回型号"
+
StringSplitUtil
.
stringListToString
(
repairReceiveVo
.
getScriptSaveVos
().
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))+
"共有"
+
repairBackBill
.
get
Receive
Count
()+
"件至"
+
repairBackBill
.
getReceiveUnit
(),
null
,
"."
,
repairBackBill1
.
getId
(),
BusinessEnum
.
REPAIR_BACK
.
id
,
userUtils
.
getCurrentUnitId
(),
0
,
"country"
,
userIds
);
taskBto2
=
taskService
.
start
(
taskBto1
);
}
else
{
userIds
.
add
(
0
);
TaskBto
taskBto1
=
new
TaskBto
(
StatusEnum
.
WAIT_UPLOAD_BACK_FILE
.
id
,
repairBackBill
.
getSendUnit
()+
"维修退回型号:"
+
StringSplitUtil
.
stringListToString
(
repairReceiveVo
.
getScriptSaveVos
().
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))+
"共有"
+
repairBackBill
.
get
Sending
Count
()+
"件至"
+
repairBackBill
.
getReceiveUnit
(),
null
,
"."
,
repairBackBill1
.
getId
(),
BusinessEnum
.
REPAIR_BACK
.
id
,
userUtils
.
getCurrentUnitId
(),
0
,
"country"
,
userIds
);
TaskBto
taskBto1
=
new
TaskBto
(
StatusEnum
.
WAIT_UPLOAD_BACK_FILE
.
id
,
repairBackBill
.
getSendUnit
()+
"维修退回型号:"
+
StringSplitUtil
.
stringListToString
(
repairReceiveVo
.
getScriptSaveVos
().
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))+
"共有"
+
repairBackBill
.
get
Receive
Count
()+
"件至"
+
repairBackBill
.
getReceiveUnit
(),
null
,
"."
,
repairBackBill1
.
getId
(),
BusinessEnum
.
REPAIR_BACK
.
id
,
userUtils
.
getCurrentUnitId
(),
0
,
"country"
,
userIds
);
taskBto2
=
taskService
.
start
(
taskBto1
);
}
//遍历改变维修详情
...
...
dev-rfid/src/main/java/com/tykj/dev/rfid/controller/AccessController.java
浏览文件 @
150674a6
package
com
.
tykj
.
dev
.
rfid
.
controller
;
import
com.tykj.dev.config.repository.SystemVariableDao
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.tykj.dev.config.service.SystemVariableService
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.misc.exception.ApiException
;
...
...
@@ -13,7 +13,9 @@ import com.tykj.dev.rfid.entity.domin.AccessControlName;
import
com.tykj.dev.rfid.entity.domin.InputOutputDevice
;
import
com.tykj.dev.rfid.entity.domin.LibraryWarningLog
;
import
com.tykj.dev.rfid.entity.domin.LibraryWarningLogDetail
;
import
com.tykj.dev.rfid.entity.vo.*
;
import
com.tykj.dev.rfid.entity.vo.AccessData
;
import
com.tykj.dev.rfid.entity.vo.DataResult
;
import
com.tykj.dev.rfid.entity.vo.Record
;
import
com.tykj.dev.rfid.repository.AccessControlNameDao
;
import
com.tykj.dev.rfid.repository.LibraryWarningLogDetailDao
;
import
com.tykj.dev.rfid.service.AccessControlNameService
;
...
...
@@ -21,7 +23,6 @@ import com.tykj.dev.rfid.service.InputOutputDeviceService;
import
com.tykj.dev.rfid.service.LibraryWarningLogDetailService
;
import
com.tykj.dev.rfid.service.LibraryWarningLogService
;
import
io.swagger.annotations.Api
;
import
lombok.extern.log4j.Log4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
...
...
@@ -37,9 +38,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -96,8 +95,8 @@ public class AccessController {
sp
.
append
(
line
);
}
String
json
=
sp
.
toString
();
String
cmd
=
json
.
substring
(
10
,
15
);
// System.out.println(json
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
json
);
String
cmd
=
jsonObject
.
getString
(
"cmd"
);
//数据提交
if
(
"20001"
.
equals
(
cmd
)){
//Json转对象
...
...
@@ -149,7 +148,11 @@ public class AccessController {
//获取最近10s报警的Id
List
<
Integer
>
ids
=
getLatestWarningDeviceIds
();
//排除使用状态中的装备,映射成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
());
ids
.
retainAll
(
idList
);
idList
.
removeAll
(
ids
);
if
(
idList
.
size
()>
0
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论