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
79dcf287
Commit
79dcf287
authored
Oct 20, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.优化调整获取风机单个测点值的接口。解决风机页面测点不显示问题。
2.优化集电线消息接口。解决泰和光伏站集电线数据不显示问题。
parent
e2735b8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
18 deletions
+15
-18
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+1
-1
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+14
-17
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
79dcf287
...
...
@@ -403,7 +403,7 @@ public class MonitorFanIdxController extends BaseController {
result
.
setCurrent
(
1
);
result
.
setTotal
(
statusMonitoring
.
size
());
try
{
emqKeeper
.
getMqttClient
().
publish
(
String
.
format
(
"%s/%s/%s"
,
stationId
,
frontModule
,
stringStringEntry
.
getKey
()),
JSON
.
toJSONString
(
result
).
getBytes
(),
0
,
fals
e
);
emqKeeper
.
getMqttClient
().
publish
(
String
.
format
(
"%s/%s/%s"
,
stationId
,
frontModule
,
stringStringEntry
.
getKey
()),
JSON
.
toJSONString
(
result
).
getBytes
(),
1
,
tru
e
);
}
catch
(
MqttException
e
)
{
e
.
printStackTrace
();
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
79dcf287
...
...
@@ -600,6 +600,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentNumberKeyword
,
Arrays
.
asList
(
equipNum
));
List
<
ESEquipments
>
equipNumList
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeMap
);
if
(
ObjectUtils
.
isEmpty
(
frontModule
)){
equipNumList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
}
if
(
CollectionUtils
.
isNotEmpty
(
equipNumList
)
&&
!
ObjectUtils
.
isEmpty
(
equipNumList
.
get
(
0
).
getValueF
()))
{
return
equipNumList
.
get
(
0
).
getValueF
().
toString
();
}
else
{
...
...
@@ -1093,14 +1096,13 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
for
(
String
s
:
collect
.
keySet
())
{
Map
<
String
,
Object
>
statusMap
=
new
HashMap
<>();
if
(
frontModule
.
equals
(
"前光"
))
{
likeCodtion
.
remove
(
CommonConstans
.
QueryStringDisplayName
+
".keyword"
);
likeCodtion
.
put
(
CommonConstans
.
QueryStringSystemType
+
".keyword"
,
"模拟量"
);
likeCodtion
.
remove
(
CommonConstans
.
QueryStringDisplayNameKeyword
);
likeCodtion
.
put
(
CommonConstans
.
QueryStringSystemTypeKeyword
,
"模拟量"
);
List
<
ESEquipments
>
value
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeCodtion
);
for
(
ESEquipments
indicatorsDto
:
value
)
{
Double
aDouble
=
Double
.
valueOf
(
indicatorsDto
.
getValue
());
statusMap
.
put
(
indicatorsDto
.
getDisplayName
()
+
"Value"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
aDouble
));
statusMap
.
put
(
indicatorsDto
.
getDisplayName
()
.
split
(
"\\("
)[
0
]
+
"Value"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
aDouble
));
}
}
List
<
ESEquipments
>
indicatorsDtos
=
collect
.
get
(
s
);
...
...
@@ -1371,22 +1373,19 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
queryCodtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryCodtion
.
put
(
CommonConstans
.
QueryStringSystemTypeKeyword
,
Arrays
.
asList
(
"模拟量"
));
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
NotKeyWord
,
map
.
get
(
"boosterName"
));
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
map
.
get
(
"boosterName"
));
if
(
"1主变高压侧"
.
equals
(
map
.
get
(
"boosterName"
))
||
"1主变低压侧"
.
equals
(
map
.
get
(
"boosterName"
)))
{
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudleNotKeyWord
,
map
.
get
(
"压侧"
));
List
<
ESEquipments
>
listData
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCodtion
,
null
,
ESEquipments
.
class
,
likeMap
);
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"压侧"
);
List
<
ESEquipments
>
listData
=
commonServiceImpl
.
getListDataByCondtions
(
queryCodtion
,
null
,
ESEquipments
.
class
,
likeMap
);
// 主变高压侧
Map
<
String
,
String
>
zbGYC
=
listData
.
stream
().
filter
(
t
->
t
.
getFrontModule
().
contains
(
"1主变高压侧"
)).
collect
(
Collectors
.
toMap
(
ESEquipments:
:
getDisplayName
,
ESEquipments:
:
getValue
));
List
<
Map
<
String
,
String
>>
zbList
=
new
ArrayList
<>();
listData
.
stream
().
filter
(
t
->
t
.
getFrontModule
().
contains
(
"1主变低压侧"
)).
forEach
(
item
->
{
HashMap
<
String
,
String
>
zbMap
=
new
HashMap
<>();
zbMap
.
put
(
"traceId"
,
item
.
getTraceId
());
zbMap
.
put
(
"title"
,
item
.
getDisplayName
());
zbMap
.
put
(
"grade1"
,
keepTwoDecimalPlaces
(
item
.
getValue
()));
zbMap
.
put
(
"grade2"
,
keepTwoDecimalPlaces
(
zbGYC
.
getOrDefault
(
item
.
getDisplayName
(),
"0.0"
)));
if
(
StringUtils
.
isNotEmpty
(
item
.
getUnit
()))
{
zbMap
.
put
(
"title"
,
String
.
format
(
"%s(%s)"
,
item
.
getDisplayName
(),
item
.
getUnit
()));
}
zbList
.
add
(
zbMap
);
});
IPage
<
Map
<
String
,
String
>>
zbResult
=
new
Page
<>();
...
...
@@ -1395,21 +1394,19 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
zbResult
.
setTotal
(
zbList
.
size
());
try
{
log
.
info
(
"主变消息内容:{}"
,
JSON
.
toJSONString
(
zbResult
));
emqKeeper
.
getMqttClient
().
publish
(
String
.
format
(
"%s/%s/%s"
,
stationId
,
routeName
,
"mnl"
),
JSON
.
toJSONString
(
zbResult
).
getBytes
(),
2
,
fals
e
);
emqKeeper
.
getMqttClient
().
publish
(
String
.
format
(
"%s/%s/%s"
,
stationId
,
routeName
,
"mnl"
),
JSON
.
toJSONString
(
zbResult
).
getBytes
(),
1
,
tru
e
);
}
catch
(
MqttException
e
)
{
log
.
info
(
"消息发送失败"
);
e
.
printStackTrace
();
}
}
else
{
List
<
ESEquipments
>
listData
=
commonServiceImpl
.
getListDataByCondtions
AndLike
(
queryCodtion
,
null
,
ESEquipments
.
class
,
likeMap
);
List
<
ESEquipments
>
listData
=
commonServiceImpl
.
getListDataByCondtions
(
queryCodtion
,
null
,
ESEquipments
.
class
,
likeMap
);
ArrayList
<
Map
<
String
,
String
>>
resultList
=
new
ArrayList
<>();
listData
.
forEach
(
item
->
{
HashMap
<
String
,
String
>
stringStringHashMap
=
new
HashMap
<>();
stringStringHashMap
.
put
(
"traceId"
,
item
.
getTraceId
());
stringStringHashMap
.
put
(
"title"
,
item
.
getDisplayName
());
stringStringHashMap
.
put
(
"value"
,
keepTwoDecimalPlaces
(
item
.
getValue
()));
if
(
StringUtils
.
isNotEmpty
(
item
.
getUnit
()))
{
stringStringHashMap
.
put
(
"title"
,
String
.
format
(
"%s(%s)"
,
item
.
getDisplayName
(),
item
.
getUnit
()));
}
resultList
.
add
(
stringStringHashMap
);
});
...
...
@@ -1419,7 +1416,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
result
.
setTotal
(
resultList
.
size
());
try
{
log
.
info
(
"消息内容:{}"
,
JSON
.
toJSONString
(
result
));
emqKeeper
.
getMqttClient
().
publish
(
String
.
format
(
"%s/%s/%s"
,
stationId
,
routeName
,
"mnl"
),
JSON
.
toJSONString
(
result
).
getBytes
(),
2
,
fals
e
);
emqKeeper
.
getMqttClient
().
publish
(
String
.
format
(
"%s/%s/%s"
,
stationId
,
routeName
,
"mnl"
),
JSON
.
toJSONString
(
result
).
getBytes
(),
1
,
tru
e
);
}
catch
(
MqttException
e
)
{
log
.
info
(
"消息发送失败"
);
e
.
printStackTrace
();
...
...
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