Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
beb15419
Commit
beb15419
authored
Apr 24, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改裝備數據監聽topic
parent
09200d23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
EquipmentIotMqttReceiveConfig.java
...oin/equipmanage/config/EquipmentIotMqttReceiveConfig.java
+10
-9
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/config/EquipmentIotMqttReceiveConfig.java
View file @
beb15419
...
@@ -109,19 +109,20 @@ public class EquipmentIotMqttReceiveConfig {
...
@@ -109,19 +109,20 @@ public class EquipmentIotMqttReceiveConfig {
iSyncDataService
.
saveOrUpdateEquipIotCodeRedisData
(
equipAndCars
);
iSyncDataService
.
saveOrUpdateEquipIotCodeRedisData
(
equipAndCars
);
List
<
String
>
list
=
new
ArrayList
<
String
>();
List
<
String
>
list
=
new
ArrayList
<
String
>();
if
(
equipAndCars
.
size
()
>
0
)
{
if
(
equipAndCars
.
size
()
>
0
)
{
for
(
EquipmentSpecificVo
specificVo
:
equipAndCars
)
{
//
for (EquipmentSpecificVo specificVo : equipAndCars) {
String
iotCode
=
specificVo
.
getIotCode
();
//
String iotCode = specificVo.getIotCode();
if
(
iotCode
.
length
()
>
8
)
{
//
if (iotCode.length() > 8) {
String
prefix
=
iotCode
.
substring
(
0
,
8
);
//
String prefix = iotCode.substring(0, 8);
String
suffix
=
iotCode
.
substring
(
8
);
//
String suffix = iotCode.substring(8);
String
topicTotal
=
String
.
format
(
"%s/%s/property"
,
prefix
,
suffix
);
//
String topicTotal = String.format("%s/%s/property", prefix, suffix);
list
.
add
(
topicTotal
);
//
list.add(topicTotal);
}
//
}
}
//
}
}
else
{
}
else
{
list
.
add
(
defaultTopic
);
list
.
add
(
defaultTopic
);
}
}
list
.
addAll
(
ConfigPageTopicEnum
.
getEnumTopicList
());
//大屏数据推送接口订阅
list
.
addAll
(
ConfigPageTopicEnum
.
getEnumTopicList
());
//大屏数据推送接口订阅
list
.
add
(
"+/+/property"
);
// 添加iot車輛裝備數據上報事件监听
list
.
add
(
"+/+/event"
);
// 添加iot事件监听
list
.
add
(
"+/+/event"
);
// 添加iot事件监听
String
[]
arr
=
list
.
toArray
(
new
String
[
list
.
size
()]);
String
[]
arr
=
list
.
toArray
(
new
String
[
list
.
size
()]);
adapter
=
new
MqttPahoMessageDrivenChannelAdapter
(
clientId
+
"_inbound"
,
mqttPahoClientFactory
(),
arr
);
adapter
=
new
MqttPahoMessageDrivenChannelAdapter
(
clientId
+
"_inbound"
,
mqttPahoClientFactory
(),
arr
);
...
...
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