Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a8134cba
由
LN
编写于
2024-07-17 09:32:49 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加equipmentType :HANWHA
1 个父辈
57b39e6a
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
27 行增加
和
6 行删除
src/main/java/com/neotel/smfcore/core/equipment/enums/EquipmentType.java
src/main/java/com/neotel/smfcore/core/equipment/rest/EquipViewController.java
src/main/java/com/neotel/smfcore/custom/hanwha/handler/HanwhaApiHandler.java
src/main/java/com/neotel/smfcore/custom/hanwha/handler/TMSCommunicator.java
src/main/java/com/neotel/smfcore/core/equipment/enums/EquipmentType.java
查看文件 @
a8134cb
...
@@ -45,5 +45,10 @@ public enum EquipmentType {
...
@@ -45,5 +45,10 @@ public enum EquipmentType {
/**
/**
* 6 AGV
* 6 AGV
*/
*/
AGV
()
AGV
(),
/**
* 韩华
*/
HANWHA
()
}
}
src/main/java/com/neotel/smfcore/core/equipment/rest/EquipViewController.java
查看文件 @
a8134cb
...
@@ -4,6 +4,7 @@ import com.neotel.smfcore.common.exception.ValidateException;
...
@@ -4,6 +4,7 @@ import com.neotel.smfcore.common.exception.ValidateException;
import
com.neotel.smfcore.core.dashboard.bean.dto.box.MesInfoDto
;
import
com.neotel.smfcore.core.dashboard.bean.dto.box.MesInfoDto
;
import
com.neotel.smfcore.core.device.bean.StatusBean
;
import
com.neotel.smfcore.core.device.bean.StatusBean
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.equipment.enums.EquipmentType
;
import
com.neotel.smfcore.core.equipment.rest.dto.NsViewDto
;
import
com.neotel.smfcore.core.equipment.rest.dto.NsViewDto
;
import
com.neotel.smfcore.core.equipment.util.EquipmentCache
;
import
com.neotel.smfcore.core.equipment.util.EquipmentCache
;
import
com.neotel.smfcore.core.equipment.bean.EquipMsg
;
import
com.neotel.smfcore.core.equipment.bean.EquipMsg
;
...
@@ -15,6 +16,7 @@ import com.neotel.smfcore.core.storage.enums.DeviceType;
...
@@ -15,6 +16,7 @@ import com.neotel.smfcore.core.storage.enums.DeviceType;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.core.system.util.DevicesStatusUtil
;
import
com.neotel.smfcore.core.system.util.DevicesStatusUtil
;
import
com.neotel.smfcore.core.system.util.EquipStatusUtil
;
import
com.neotel.smfcore.core.system.util.EquipStatusUtil
;
import
com.neotel.smfcore.custom.hanwha.handler.TMSCommunicator
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
...
@@ -42,6 +44,9 @@ public class EquipViewController {
...
@@ -42,6 +44,9 @@ public class EquipViewController {
@Autowired
@Autowired
private
DataCache
dataCache
;
private
DataCache
dataCache
;
@Autowired
private
TMSCommunicator
tmsCommunicator
;
@ApiOperation
(
"获取看板数据"
)
@ApiOperation
(
"获取看板数据"
)
@GetMapping
@GetMapping
@PreAuthorize
(
"@el.check('equipmentView:info')"
)
@PreAuthorize
(
"@el.check('equipmentView:info')"
)
...
@@ -64,6 +69,12 @@ public class EquipViewController {
...
@@ -64,6 +69,12 @@ public class EquipViewController {
}
}
}
}
if
(
equip
.
getType
().
equalsIgnoreCase
(
EquipmentType
.
HANWHA
.
name
())){
if
(
tmsCommunicator
.
isConnected
()){
dto
.
setOnLine
(
true
);
}
}
resultList
.
add
(
dto
);
resultList
.
add
(
dto
);
}
}
...
...
src/main/java/com/neotel/smfcore/custom/hanwha/handler/HanwhaApiHandler.java
查看文件 @
a8134cb
...
@@ -43,7 +43,7 @@ public class HanwhaApiHandler extends BaseSmfApiListener {
...
@@ -43,7 +43,7 @@ public class HanwhaApiHandler extends BaseSmfApiListener {
//
//
// hanwha:
// hanwha:
// host:
3.39.76.183
// host:
192.168.3.166
// webPort: 1337
// webPort: 1337
// apiPort: 8082
// apiPort: 8082
@Autowired
@Autowired
...
...
src/main/java/com/neotel/smfcore/custom/hanwha/handler/TMSCommunicator.java
查看文件 @
a8134cb
...
@@ -170,7 +170,12 @@ public class TMSCommunicator implements WsMsgReceivedListener {
...
@@ -170,7 +170,12 @@ public class TMSCommunicator implements WsMsgReceivedListener {
websocket
.
close
();
websocket
.
close
();
}
}
}
}
public
boolean
isConnected
()
{
if
(
websocket
!=
null
&&(
websocket
.
isConnecting
()||
websocket
.
isOpen
())
)
{
return
true
;
}
return
false
;
}
public
void
SendData
(
Map
<
String
,
Object
>
messageMap
)
{
public
void
SendData
(
Map
<
String
,
Object
>
messageMap
)
{
if
(
websocket
==
null
)
{
if
(
websocket
==
null
)
{
...
@@ -282,8 +287,8 @@ public class TMSCommunicator implements WsMsgReceivedListener {
...
@@ -282,8 +287,8 @@ public class TMSCommunicator implements WsMsgReceivedListener {
allStorage
.
values
())
{
allStorage
.
values
())
{
List
<
TMSPartReelPos
>
list
=
new
ArrayList
<>();
List
<
TMSPartReelPos
>
list
=
new
ArrayList
<>();
List
<
StoragePos
>
allPos
=
storagePosManager
.
findByStorage
(
storage
.
getId
());
List
<
StoragePos
>
allPos
=
storagePosManager
.
findByStorage
(
storage
.
getId
());
if
(
storage
.
isNLShelf
()
||
storage
.
isMimoG2
()
)
{
// if (storage.isNLShelf() || storage.isMimoG2() ||storage.isBatchStorage()
) {
if
(
allPos
!=
null
)
{
for
(
StoragePos
pos
:
for
(
StoragePos
pos
:
allPos
)
{
allPos
)
{
...
@@ -307,7 +312,7 @@ public class TMSCommunicator implements WsMsgReceivedListener {
...
@@ -307,7 +312,7 @@ public class TMSCommunicator implements WsMsgReceivedListener {
}
}
List
<
TMSPart
>
result
=
tmsApis
.
RequestSyncPartReelPosInfo
(
0
,
list
);
List
<
TMSPart
>
result
=
tmsApis
.
RequestSyncPartReelPosInfo
(
0
,
list
);
log
.
info
(
"RequestSyncPartReelPosInfo storageCID="
+
storage
.
getCid
()+
", count="
+
list
.
size
());
log
.
info
(
"RequestSyncPartReelPosInfo storageCID="
+
storage
.
getCid
()
+
", count="
+
list
.
size
());
}
}
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论