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
187ef6d5
Commit
187ef6d5
authored
Jul 11, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化消息推送service
parent
f5dd77b6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
39 deletions
+41
-39
MonitoringServiceIMQTTmpl.java
...ule/jxiop/biz/service/impl/MonitoringServiceIMQTTmpl.java
+41
-39
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitoringServiceIMQTTmpl.java
View file @
187ef6d5
...
...
@@ -283,76 +283,78 @@ public class MonitoringServiceIMQTTmpl {
@Scheduled
(
cron
=
"0 0/1 * * * *"
)
public
void
getFanCurrentData
()
{
Integer
current
=
1
;
Integer
size
=
99
;
List
<
StationBasic
>
stationBasicList
=
stationBasicMapper
.
selectList
(
new
QueryWrapper
<
StationBasic
>().
isNotNull
(
"sequence_nbr"
).
eq
(
"station_type"
,
"FDZ"
));
stationBasicList
.
forEach
(
stationBasic
->
{
List
<
IndexDto
>
fanStatusList
=
monitorFanIndicator
.
getFanStatusList
(
String
.
valueOf
(
stationBasic
.
getSequenceNbr
()));
fanStatusList
.
forEach
(
indexDto
->
{
String
stationBasicId
=
String
.
valueOf
(
stationBasic
.
getSequenceNbr
());
String
equipmentNumber
=
indexDto
.
getEquipmentNumber
();
String
topicPrefix
=
stationBasicId
+
"_"
+
equipmentNumber
;
String
topicPrefix
=
stationBasicId
+
"_"
+
equipmentNumber
;
IndexDto
info
=
monitorFanIndicator
.
getFanBasicInfoByEquipNum
(
equipmentNumber
,
stationBasicId
);
HashMap
<
String
,
Object
>
windspeddInfo
=
new
HashMap
<>();
String
windspeddInfoValue
=
monitorFanIndicator
.
getFanDataByType
(
stationBasicId
,
equipmentNumber
,
"实时监控表计"
,
"风速"
);
windspeddInfo
.
put
(
"value"
,
windspeddInfoValue
);
windspeddInfo
.
put
(
"value"
,
100
);
String
activepower
=
monitorFanIndicator
.
getFanDataByType
(
stationBasicId
,
equipmentNumber
,
"实时监控表计"
,
"有功功率"
);
String
powerFrequency
=
monitorFanIndicator
.
getFanDataByType
(
stationBasicId
,
equipmentNumber
,
"实时监控表计"
,
"电网频率"
);
String
hubSpeed
=
monitorFanIndicator
.
getFanDataByType
(
stationBasicId
,
equipmentNumber
,
"实时监控表计"
,
"轮毂转速"
);
HashMap
<
String
,
List
<
String
>>
realTimeTemperatureResult
=
monitorFanIndicator
.
getRealTimeTemperature
(
equipmentNumber
,
stationBasicId
,
"实时监控表计"
);
IPage
<
IndexDto
>
realTimedata
=
monitorFanIndicator
.
getFanIdxInfoByPage
(
equipmentNumber
,
stationBasicId
,
"实时运行数据"
,
1
,
99
,
""
);
Map
<
String
,
Object
>
windSpeedOfFan
=
monitorFanIndicator
.
getDetailsWindSpeed
(
stationBasic
.
getFanGatewayId
(),
equipmentNumber
);
HashMap
<
String
,
Object
>
windspeddInfo
=
new
HashMap
<>();
String
windspeddInfoValue
=
monitorFanIndicator
.
getFanDataByType
(
stationBasicId
,
equipmentNumber
,
"实时监控表计"
,
"风速"
);
windspeddInfo
.
put
(
"value"
,
windspeddInfoValue
);
windspeddInfo
.
put
(
"value"
,
100
);
String
activepower
=
monitorFanIndicator
.
getFanDataByType
(
stationBasicId
,
equipmentNumber
,
"实时监控表计"
,
"有功功率"
);
String
powerFrequency
=
monitorFanIndicator
.
getFanDataByType
(
stationBasicId
,
equipmentNumber
,
"实时监控表计"
,
"电网频率"
);
String
hubSpeed
=
monitorFanIndicator
.
getFanDataByType
(
stationBasicId
,
equipmentNumber
,
"实时监控表计"
,
"轮毂转速"
);
HashMap
<
String
,
List
<
String
>>
realTimeTemperatureResult
=
monitorFanIndicator
.
getRealTimeTemperature
(
equipmentNumber
,
stationBasicId
,
"实时监控表计"
);
IPage
<
IndexDto
>
realTimedata
=
monitorFanIndicator
.
getFanIdxInfoByPage
(
equipmentNumber
,
stationBasicId
,
"实时运行数据"
,
current
,
size
,
""
);
Map
<
String
,
Object
>
windSpeedOfFan
=
monitorFanIndicator
.
getDetailsWindSpeed
(
stationBasic
.
getFanGatewayId
(),
equipmentNumber
);
//发电机系统
IPage
<
IndexDto
>
fdjSystem
=
monitorFanIndicator
.
getFanIdxInfoByPage
(
equipmentNumber
,
stationBasicId
,
"实时运行数据"
,
1
,
99
,
"发电机系统"
);
List
<
Map
<
String
,
Object
>>
fdjSystemStatus
=
monitorFanIndicator
.
getStatusMonitoring
(
stationBasic
.
getFanGatewayId
(),
equipmentNumber
,
"发电机系统"
);
IPage
<
IndexDto
>
fdjSystem
=
monitorFanIndicator
.
getFanIdxInfoByPage
(
equipmentNumber
,
stationBasicId
,
"实时运行数据"
,
current
,
size
,
"发电机系统"
);
List
<
Map
<
String
,
Object
>>
fdjSystemStatus
=
monitorFanIndicator
.
getStatusMonitoring
(
stationBasic
.
getFanGatewayId
(),
equipmentNumber
,
"发电机系统"
);
//机舱与塔筒系统
IPage
<
IndexDto
>
jcyttSystem
=
monitorFanIndicator
.
getFanIdxInfoByPage
(
equipmentNumber
,
stationBasicId
,
"实时运行数据"
,
1
,
99
,
"机舱与塔筒系统"
);
List
<
Map
<
String
,
Object
>>
jcyttSystemStatus
=
monitorFanIndicator
.
getStatusMonitoring
(
stationBasic
.
getFanGatewayId
(),
equipmentNumber
,
"机舱与塔筒系统"
);
IPage
<
IndexDto
>
jcyttSystem
=
monitorFanIndicator
.
getFanIdxInfoByPage
(
equipmentNumber
,
stationBasicId
,
"实时运行数据"
,
current
,
size
,
"机舱与塔筒系统"
);
List
<
Map
<
String
,
Object
>>
jcyttSystemStatus
=
monitorFanIndicator
.
getStatusMonitoring
(
stationBasic
.
getFanGatewayId
(),
equipmentNumber
,
"机舱与塔筒系统"
);
//偏航与液压系统
IPage
<
IndexDto
>
phyyySystem
=
monitorFanIndicator
.
getFanIdxInfoByPage
(
equipmentNumber
,
stationBasicId
,
"实时运行数据"
,
1
,
99
,
"偏航与液压系统"
);
List
<
Map
<
String
,
Object
>>
phyyySystemStatus
=
monitorFanIndicator
.
getStatusMonitoring
(
stationBasic
.
getFanGatewayId
(),
equipmentNumber
,
"偏航与液压系统"
);
IPage
<
IndexDto
>
phyyySystem
=
monitorFanIndicator
.
getFanIdxInfoByPage
(
equipmentNumber
,
stationBasicId
,
"实时运行数据"
,
current
,
size
,
"偏航与液压系统"
);
List
<
Map
<
String
,
Object
>>
phyyySystemStatus
=
monitorFanIndicator
.
getStatusMonitoring
(
stationBasic
.
getFanGatewayId
(),
equipmentNumber
,
"偏航与液压系统"
);
//变流与主控系统
IPage
<
IndexDto
>
blyzkSystem
=
monitorFanIndicator
.
getFanIdxInfoByPage
(
equipmentNumber
,
stationBasicId
,
"实时运行数据"
,
1
,
99
,
"变流与主控系统"
);
List
<
Map
<
String
,
Object
>>
blyzkSystemStatus
=
monitorFanIndicator
.
getStatusMonitoring
(
stationBasic
.
getFanGatewayId
(),
equipmentNumber
,
"变流与主控系统"
);
IPage
<
IndexDto
>
blyzkSystem
=
monitorFanIndicator
.
getFanIdxInfoByPage
(
equipmentNumber
,
stationBasicId
,
"实时运行数据"
,
current
,
size
,
"变流与主控系统"
);
List
<
Map
<
String
,
Object
>>
blyzkSystemStatus
=
monitorFanIndicator
.
getStatusMonitoring
(
stationBasic
.
getFanGatewayId
(),
equipmentNumber
,
"变流与主控系统"
);
//变流与主控系统
IPage
<
IndexDto
>
ylSystem
=
monitorFanIndicator
.
getFanIdxInfoByPage
(
equipmentNumber
,
stationBasicId
,
"实时运行数据"
,
1
,
99
,
"叶轮系统"
);
List
<
Map
<
String
,
Object
>>
ylSystemStatus
=
monitorFanIndicator
.
getStatusMonitoring
(
stationBasic
.
getFanGatewayId
(),
equipmentNumber
,
"叶轮系统"
);
IPage
<
IndexDto
>
ylSystem
=
monitorFanIndicator
.
getFanIdxInfoByPage
(
equipmentNumber
,
stationBasicId
,
"实时运行数据"
,
current
,
size
,
"叶轮系统"
);
List
<
Map
<
String
,
Object
>>
ylSystemStatus
=
monitorFanIndicator
.
getStatusMonitoring
(
stationBasic
.
getFanGatewayId
(),
equipmentNumber
,
"叶轮系统"
);
try
{
//{stationBasicId}_{equipmentNumber}_fanBasicInfo_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_fanBasicInfo_topic"
,
JSON
.
toJSON
(
info
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_fanBasicInfo_topic"
,
JSON
.
toJSON
(
info
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_windspeddInfo_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_windspeddInfo_topic"
,
JSON
.
toJSON
(
windspeddInfo
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_windspeddInfo_topic"
,
JSON
.
toJSON
(
windspeddInfo
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_activepower_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_activepower_topic"
,
activepower
.
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_activepower_topic"
,
activepower
.
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_powerFrequency_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_powerFrequency_topic"
,
powerFrequency
.
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_powerFrequency_topic"
,
powerFrequency
.
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_hubSpeed_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_hubSpeed_topic"
,
hubSpeed
.
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_hubSpeed_topic"
,
hubSpeed
.
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_realTimeTemperature_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_realTimeTemperature_topic"
,
JSON
.
toJSON
(
realTimeTemperatureResult
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_realTimeTemperature_topic"
,
JSON
.
toJSON
(
realTimeTemperatureResult
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_realTimedata_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_realTimedata_topic"
,
JSON
.
toJSON
(
realTimedata
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_realTimedata_topic"
,
JSON
.
toJSON
(
realTimedata
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_windSpeedOfFan_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_windSpeedOfFan_topic"
,
JSON
.
toJSON
(
windSpeedOfFan
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_windSpeedOfFan_topic"
,
JSON
.
toJSON
(
windSpeedOfFan
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_fdjSystem_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_fdjSystem_topic"
,
JSON
.
toJSON
(
fdjSystem
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_fdjSystem_topic"
,
JSON
.
toJSON
(
fdjSystem
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_fdjSystemStatus_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_fdjSystemStatus_topic"
,
JSON
.
toJSON
(
fdjSystemStatus
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_fdjSystemStatus_topic"
,
JSON
.
toJSON
(
fdjSystemStatus
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_windSpeedOfFan_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_jcyttSystem_topic"
,
JSON
.
toJSON
(
jcyttSystem
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_jcyttSystem_topic"
,
JSON
.
toJSON
(
jcyttSystem
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_windSpeedOfFan_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_jcyttSystemStatus_topic"
,
JSON
.
toJSON
(
jcyttSystemStatus
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_jcyttSystemStatus_topic"
,
JSON
.
toJSON
(
jcyttSystemStatus
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_windSpeedOfFan_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_phyyySystem_topic"
,
JSON
.
toJSON
(
phyyySystem
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_phyyySystem_topic"
,
JSON
.
toJSON
(
phyyySystem
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_windSpeedOfFan_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_phyyySystemStatus_topic"
,
JSON
.
toJSON
(
phyyySystemStatus
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_phyyySystemStatus_topic"
,
JSON
.
toJSON
(
phyyySystemStatus
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_windSpeedOfFan_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_blyzkSystem_topic"
,
JSON
.
toJSON
(
blyzkSystem
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_blyzkSystem_topic"
,
JSON
.
toJSON
(
blyzkSystem
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_windSpeedOfFan_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_blyzkSystemStatus_topic"
,
JSON
.
toJSON
(
blyzkSystemStatus
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_blyzkSystemStatus_topic"
,
JSON
.
toJSON
(
blyzkSystemStatus
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_windSpeedOfFan_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_ylSystem_topic"
,
JSON
.
toJSON
(
ylSystem
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_ylSystem_topic"
,
JSON
.
toJSON
(
ylSystem
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
//{stationBasicId}_{equipmentNumber}_windSpeedOfFan_topic
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_ylSystemStatus_topic"
,
JSON
.
toJSON
(
ylSystemStatus
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
topicPrefix
+
"_ylSystemStatus_topic"
,
JSON
.
toJSON
(
ylSystemStatus
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
logger
.
info
(
"-----------------发送风电站风机基础数据消息=================== 成功!"
);
}
catch
(
Exception
exception
)
{
logger
.
error
(
"-----------------发送风电站风机基础数据消息=================== 失败!"
);
...
...
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