Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a379ea1b
由
LN
编写于
2025-04-02 14:39:21 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
接口测试增加验证
1 个父辈
6411bc91
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
27 行增加
和
3 行删除
src/main/java/com/neotel/smfcore/core/equipment/rest/EquipConfigController.java
src/main/java/com/neotel/smfcore/core/equipment/util/EquipConfigUtil.java
src/main/java/com/neotel/smfcore/custom/hanwha/handler/TMSApis.java
src/main/java/com/neotel/smfcore/custom/panacim/PanaApiController.java
src/main/java/com/neotel/smfcore/core/equipment/rest/EquipConfigController.java
查看文件 @
a379ea1
...
...
@@ -72,7 +72,12 @@ public class EquipConfigController {
String
ip
=
config
.
GetConfigValue
(
"host"
,
""
);
int
webPort
=
config
.
GetConfigValue
(
"webPort"
,
0
);
String
webUrl
=
String
.
format
(
"ws://%s:%d/"
,
ip
,
webPort
);
if
(
ObjectUtil
.
isEmpty
(
ip
))
{
return
ResultBean
.
newErrorResult
(
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"host"
});
}
if
(
ObjectUtil
.
isEmpty
(
webPort
)||
webPort
==
0
)
{
return
ResultBean
.
newErrorResult
(
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"webPort"
});
}
if
(
TMSCommunicator
.
wsURL
.
equals
(
webUrl
))
{
result
=
tmsCommunicator
.
isConnected
();
}
else
{
...
...
@@ -81,6 +86,12 @@ public class EquipConfigController {
}
else
{
String
ip
=
config
.
GetConfigValue
(
"host"
,
""
);
int
apiPort
=
config
.
GetConfigValue
(
"apiPort"
,
0
);
if
(
ObjectUtil
.
isEmpty
(
ip
))
{
return
ResultBean
.
newErrorResult
(
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"host"
});
}
if
(
ObjectUtil
.
isEmpty
(
apiPort
)||
apiPort
==
0
)
{
return
ResultBean
.
newErrorResult
(
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"apiPort"
});
}
result
=
tmsApis
.
TestApi
(
ip
,
apiPort
);
}
...
...
src/main/java/com/neotel/smfcore/core/equipment/util/EquipConfigUtil.java
查看文件 @
a379ea1
...
...
@@ -58,8 +58,16 @@ public class EquipConfigUtil {
if
(
equipType
.
equals
(
EquipmentType
.
PANACIMNEOLINK
.
name
()))
{
//增加配置
LinkedHashMap
<
String
,
Object
>
defMap
=
new
LinkedHashMap
<>();
defMap
.
put
(
"PanaCIMIP"
,
dataCache
.
getCache
(
Constants
.
Cache_PanaCIMIP
));
defMap
.
put
(
"PanaCIMPort"
,
dataCache
.
getCache
(
Constants
.
Cache_PanaCIMPort
));
String
ip
=
dataCache
.
getCache
(
Constants
.
Cache_PanaCIMIP
);
if
(
ip
==
null
){
ip
=
""
;
}
String
port
=
dataCache
.
getCache
(
Constants
.
Cache_PanaCIMPort
);
if
(
port
==
null
){
port
=
""
;
}
defMap
.
put
(
"PanaCIMIP"
,
ip
);
defMap
.
put
(
"PanaCIMPort"
,
port
);
configInfo
.
setApiConfigMap
(
defMap
);
}
...
...
src/main/java/com/neotel/smfcore/custom/hanwha/handler/TMSApis.java
查看文件 @
a379ea1
...
...
@@ -546,6 +546,7 @@ public class TMSApis {
storageTypes
.
add
(
type
);
isConns
.
add
(
Integer
.
parseInt
(
conCode
));
i
++;
break
;
}
String
RequestID
=
"0"
;
...
...
src/main/java/com/neotel/smfcore/custom/panacim/PanaApiController.java
查看文件 @
a379ea1
...
...
@@ -737,6 +737,10 @@ public class PanaApiController extends BaseSmfApiListener {
String
keepAliveUrl
=
getkeepAliveUrl
();
try
{
if
(
ObjectUtil
.
isEmpty
(
keepAliveUrl
)){
log
.
error
(
"未找到地址 keepAliveUrl,返回false"
);
return
false
;
}
Map
<
String
,
Object
>
result
=
HttpHelper
.
getJsonResult
(
keepAliveUrl
,
new
HashMap
<>(),
3000
);
if
(
result
!=
null
&&
result
.
size
()==
2
){
int
code
=(
Integer
)
result
.
get
(
"code"
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论