Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit da12b7c5
由
LN
编写于
2024-04-28 15:39:46 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
NLM入库不亮灯bug修改
1 个父辈
80382e20
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
35 行增加
和
4 行删除
src/main/java/com/neotel/smfcore/core/device/handler/impl/NLMShelfHandler.java
src/main/java/com/neotel/smfcore/core/system/util/DevicesStatusUtil.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/NLMShelfHandler.java
查看文件 @
da12b7c
...
@@ -188,6 +188,10 @@ public class NLMShelfHandler extends BaseDeviceHandler {
...
@@ -188,6 +188,10 @@ public class NLMShelfHandler extends BaseDeviceHandler {
return
;
return
;
}
}
String
allLightOnStr
=
""
;
String
allLightOnStr
=
""
;
for
(
final
String
posName
:
posNameList
)
{
DevicesStatusUtil
.
clearOp
(
cid
,
"close"
,
posName
);
}
for
(
final
String
posName
:
posNameList
)
{
for
(
final
String
posName
:
posNameList
)
{
String
lightOnStr
=
posName
+
"="
+
color
;
String
lightOnStr
=
posName
+
"="
+
color
;
DevicesStatusUtil
.
appendOp
(
cid
,
"open"
,
lightOnStr
);
DevicesStatusUtil
.
appendOp
(
cid
,
"open"
,
lightOnStr
);
...
...
src/main/java/com/neotel/smfcore/core/system/util/DevicesStatusUtil.java
查看文件 @
da12b7c
...
@@ -18,10 +18,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -18,10 +18,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
/**
/**
...
@@ -278,6 +275,36 @@ public class DevicesStatusUtil {
...
@@ -278,6 +275,36 @@ public class DevicesStatusUtil {
opMap
.
put
(
opKey
,
value
);
opMap
.
put
(
opKey
,
value
);
storageOpMap
.
put
(
cid
,
opMap
);
storageOpMap
.
put
(
cid
,
opMap
);
}
}
public
static
void
clearOp
(
String
cid
,
String
opKey
,
String
opValue
)
{
try
{
Map
<
String
,
String
>
opMap
=
storageOpMap
.
get
(
cid
);
if
(
opMap
==
null
)
{
return
;
}
String
value
=
opMap
.
get
(
opKey
);
if
(
ObjectUtil
.
isEmpty
(
value
))
{
return
;
}
else
if
(!
value
.
contains
(
opValue
))
{
return
;
}
else
if
(
value
.
equals
(
opValue
)){
opMap
.
remove
(
opKey
);
}
else
{
String
t1
=
"|"
+
opValue
;
String
t2
=
opValue
+
"|"
;
if
(
opValue
.
contains
(
t1
))
{
opValue
=
opValue
.
replace
(
t1
,
""
);
}
if
(
opValue
.
contains
(
t2
))
{
opValue
=
opValue
.
replace
(
t2
,
""
);
}
opMap
.
put
(
opKey
,
opValue
);
}
storageOpMap
.
put
(
cid
,
opMap
);
}
catch
(
Exception
exception
)
{
log
.
error
(
"出错:"
+
exception
.
toString
());
}
}
public
static
Map
<
String
,
String
>
getAndRemoveOp
(
String
cid
){
public
static
Map
<
String
,
String
>
getAndRemoveOp
(
String
cid
){
Map
<
String
,
String
>
opMap
=
storageOpMap
.
get
(
cid
);
Map
<
String
,
String
>
opMap
=
storageOpMap
.
get
(
cid
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论