Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 99781eca
由
LN
编写于
2025-02-17 15:29:45 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
nsView接口增加NS标签数据
1 个父辈
d4c8a85b
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
62 行增加
和
2 行删除
src/main/java/com/neotel/smfcore/core/device/rest/VideoController.java
src/main/java/com/neotel/smfcore/core/equipment/rest/EquipViewController.java
src/main/java/com/neotel/smfcore/core/equipment/rest/dto/NsViewDto.java
src/main/java/com/neotel/smfcore/core/system/util/EquipStatusUtil.java
src/main/java/com/neotel/smfcore/custom/hanwha/handler/TMSCommunicator.java
src/main/java/com/neotel/smfcore/core/device/rest/VideoController.java
查看文件 @
99781ec
...
@@ -2,6 +2,7 @@ package com.neotel.smfcore.core.device.rest;
...
@@ -2,6 +2,7 @@ package com.neotel.smfcore.core.device.rest;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.core.system.util.EquipStatusUtil
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -27,6 +28,19 @@ public class VideoController {
...
@@ -27,6 +28,19 @@ public class VideoController {
String
cid
=
params
.
get
(
"cid"
);
String
cid
=
params
.
get
(
"cid"
);
String
img
=
params
.
get
(
"img"
);
String
img
=
params
.
get
(
"img"
);
updateVideo
(
cid
,
img
);
updateVideo
(
cid
,
img
);
if
(
params
.
size
()>
2
){
Map
<
String
,
String
>
data
=
new
HashMap
<>();
for
(
String
key
:
params
.
keySet
()){
if
(
key
.
equals
(
"cid"
)||
key
.
equals
(
"img"
)){
continue
;
}
data
.
put
(
key
,
params
.
get
(
key
));
}
if
(
data
.
size
()>
0
){
EquipStatusUtil
.
updateData
(
cid
,
data
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"出错:"
,
e
);
log
.
error
(
"出错:"
,
e
);
...
...
src/main/java/com/neotel/smfcore/core/equipment/rest/EquipViewController.java
查看文件 @
99781ec
...
@@ -133,6 +133,14 @@ public class EquipViewController {
...
@@ -133,6 +133,14 @@ public class EquipViewController {
}
}
}
}
Map
<
String
,
String
>
data
=
EquipStatusUtil
.
getData
(
equip
.
getCid
());
if
(
data
!=
null
){
dto
.
setPrintData
(
data
);
}
else
{
data
=
new
HashMap
<>();
dto
.
setPrintData
(
data
);
}
// if(dto.getShowLogs().size()<=0){
// if(dto.getShowLogs().size()<=0){
// EquipMsg msg=new EquipMsg();
// EquipMsg msg=new EquipMsg();
// msg.setModule("module1");
// msg.setModule("module1");
...
...
src/main/java/com/neotel/smfcore/core/equipment/rest/dto/NsViewDto.java
查看文件 @
99781ec
...
@@ -45,4 +45,8 @@ public class NsViewDto implements Serializable {
...
@@ -45,4 +45,8 @@ public class NsViewDto implements Serializable {
* key=MES,value=MES最后一次对接信息:格式参考NsMesInfo
* key=MES,value=MES最后一次对接信息:格式参考NsMesInfo
*/
*/
private
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
private
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
/**
* NS打印数据
*/
private
Map
<
String
,
String
>
printData
=
new
HashMap
<>();
}
}
src/main/java/com/neotel/smfcore/core/system/util/EquipStatusUtil.java
查看文件 @
99781ec
...
@@ -102,4 +102,28 @@ public class EquipStatusUtil {
...
@@ -102,4 +102,28 @@ public class EquipStatusUtil {
}
}
return
lastAgvMesMap
.
get
(
""
);
return
lastAgvMesMap
.
get
(
""
);
}
}
public
static
Map
<
String
,
Map
<
String
,
String
>>
dataMap
=
new
HashMap
<>();
public
static
void
updateData
(
String
cid
,
Map
<
String
,
String
>
data
)
{
if
(
dataMap
.
containsKey
(
cid
))
{
dataMap
.
remove
(
cid
);
}
dataMap
.
put
(
cid
,
data
);
}
public
static
Map
<
String
,
String
>
getData
(
String
cid
)
{
Map
<
String
,
String
>
data
=
dataMap
.
getOrDefault
(
cid
,
new
HashMap
<>());
if
(
data
==
null
||
data
.
size
()
>
0
)
{
//默认查找cid_1的视频
String
nCid
=
cid
+
"_2"
;
data
=
dataMap
.
getOrDefault
(
cid
,
new
HashMap
<>());
}
if
(
data
==
null
||
data
.
size
()
>
0
)
{
//默认查找cid_1的视频
String
nCid
=
cid
+
"_1"
;
data
=
dataMap
.
getOrDefault
(
cid
,
new
HashMap
<>());
}
return
data
;
}
}
}
src/main/java/com/neotel/smfcore/custom/hanwha/handler/TMSCommunicator.java
查看文件 @
99781ec
...
@@ -77,7 +77,11 @@ public class TMSCommunicator implements WsMsgReceivedListener {
...
@@ -77,7 +77,11 @@ public class TMSCommunicator implements WsMsgReceivedListener {
public
void
setApiPort
(
String
configPort
)
{
public
void
setApiPort
(
String
configPort
)
{
TMSCommunicator
.
configApiPort
=
configPort
;
TMSCommunicator
.
configApiPort
=
configPort
;
}
}
/**
* API名称
*/
@Value
(
"${api.name:}"
)
protected
String
apiName
=
""
;
@Autowired
@Autowired
private
DataCache
dataCache
;
private
DataCache
dataCache
;
...
@@ -113,7 +117,13 @@ public class TMSCommunicator implements WsMsgReceivedListener {
...
@@ -113,7 +117,13 @@ public class TMSCommunicator implements WsMsgReceivedListener {
host
=
dataCache
.
getConfigCache
(
"hanwha.host"
,
host
);
host
=
dataCache
.
getConfigCache
(
"hanwha.host"
,
host
);
String
webPortStr
=
dataCache
.
getConfigCache
(
"hanwha.webPort"
,
configWebPort
);
String
webPortStr
=
dataCache
.
getConfigCache
(
"hanwha.webPort"
,
configWebPort
);
String
apiPortStr
=
dataCache
.
getConfigCache
(
"hanwha.apiPort"
,
configApiPort
);
String
apiPortStr
=
dataCache
.
getConfigCache
(
"hanwha.apiPort"
,
configApiPort
);
if
(
ObjectUtil
.
isEmpty
(
host
)
||
ObjectUtil
.
isEmpty
(
webPortStr
)
||
ObjectUtil
.
isEmpty
((
apiPortStr
)))
{
apiName
=
dataCache
.
getConfigCache
(
"api.name"
,
apiName
);
boolean
enable
=
apiName
!=
null
&&
apiName
.
equalsIgnoreCase
(
"hanwha"
)
;
if
(!
enable
){
log
.
info
(
"apiName:"
+
apiName
+
",不需要连接"
);
}
else
if
(
ObjectUtil
.
isEmpty
(
host
)
||
ObjectUtil
.
isEmpty
(
webPortStr
)
||
ObjectUtil
.
isEmpty
((
apiPortStr
)))
{
log
.
info
(
"配置不完整,不需要连接"
);
log
.
info
(
"配置不完整,不需要连接"
);
}
else
{
}
else
{
webPort
=
Integer
.
parseInt
(
webPortStr
);
webPort
=
Integer
.
parseInt
(
webPortStr
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论