Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
5c68a2b5
Commit
5c68a2b5
authored
Dec 16, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分组更新设备
parent
069b326f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
device-manager/src/main/java/com/mortals/xhx/daemon/DemoApiController.java
...c/main/java/com/mortals/xhx/daemon/DemoApiController.java
+4
-5
No files found.
device-manager/src/main/java/com/mortals/xhx/daemon/DemoApiController.java
View file @
5c68a2b5
...
...
@@ -151,7 +151,7 @@ public class DemoApiController {
rsp
.
setCode
(
ApiRespCodeEnum
.
SUCCESS
.
getValue
());
try
{
//根据设备编码查询设备
DeviceEntity
deviceEntity
=
deviceService
.
get
(
deviceId
);
DeviceEntity
deviceEntity
=
deviceService
.
get
Cache
(
deviceId
.
toString
()
);
if
(!
ObjectUtils
.
isEmpty
(
deviceEntity
))
{
//将上报信息转发到mq中
...
...
@@ -160,7 +160,7 @@ public class DemoApiController {
throw
new
AppException
(
"当前设备未配置所属系统平台,请在后台配置后再激活!"
);
}
// authInfo.setHost(platformEntity.getPlatformSn());
ProductEntity
productEntity
=
productService
.
get
(
deviceEntity
.
getProductId
());
ProductEntity
productEntity
=
productService
.
get
Cache
(
deviceEntity
.
getProductId
().
toString
());
if
(
ObjectUtils
.
isEmpty
(
productEntity
))
{
throw
new
AppException
(
"当前设备未配置所属产品,请在后台配置后再激活!"
);
}
...
...
@@ -177,7 +177,7 @@ public class DemoApiController {
deviceService.sendDeviceMessage(deviceEntity, info, header, JSON.toJSONString(deviceEntity), null, null);
*/
TbQueueMsgHeaders
header
=
new
DefaultTbQueueMsgHeaders
();
header
.
put
(
MessageHeader
.
MESSAGETYPE
,
Constant
.
MESSAGETYPE_HEARTBEAT
);
header
.
put
(
MessageHeader
.
MESSAGETYPE
,
Constant
.
MESSAGETYPE_HEARTBEAT
);
header
.
put
(
MessageHeader
.
DEVICECODE
,
deviceEntity
.
getDeviceCode
());
// header.put(MessageHeader.TIMESTAMP, );
...
...
@@ -185,7 +185,6 @@ public class DemoApiController {
messageProducer
.
sendMsg
(
QueueKey
.
DEFAULT_EXCHANGE
,
Constant
.
DOWN_TOPIC
+
deviceEntity
.
getDeviceCode
(),
JSON
.
toJSONString
(
queueMsg
));
}
}
catch
(
Exception
e
)
{
log
.
error
(
"接收数据失败"
,
e
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment