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
79eaa2d9
Commit
79eaa2d9
authored
Dec 12, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预警阈值相关 单位问题处理
parent
624463f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
MqttWarningReceiveServiceImpl.java
...uipmanage/service/impl/MqttWarningReceiveServiceImpl.java
+3
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttWarningReceiveServiceImpl.java
View file @
79eaa2d9
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecificIndex
;
...
@@ -76,7 +78,7 @@ public class MqttWarningReceiveServiceImpl implements MqttWaringReceiveService {
...
@@ -76,7 +78,7 @@ public class MqttWarningReceiveServiceImpl implements MqttWaringReceiveService {
List
<
EquipmentSpecificIndex
>
indexList
=
equipmentSpecificIndexService
List
<
EquipmentSpecificIndex
>
indexList
=
equipmentSpecificIndexService
.
getEquipmentSpeIndexBySpeIotCode
(
messageObj
.
get
(
"iot_code"
).
toString
());
.
getEquipmentSpeIndexBySpeIotCode
(
messageObj
.
get
(
"iot_code"
).
toString
());
List
<
EquipmentSpecificIndex
>
collect
=
indexList
.
stream
().
filter
(
item
->
!
ObjectUtils
.
isEmpty
(
item
.
getNameKey
())
&&
item
.
getNameKey
().
equalsIgnoreCase
(
messageObj
.
get
(
REALTIME_IOT_INDEX_KEY
).
toString
())).
collect
(
Collectors
.
toList
());
List
<
EquipmentSpecificIndex
>
collect
=
indexList
.
stream
().
filter
(
item
->
!
ObjectUtils
.
isEmpty
(
item
.
getNameKey
())
&&
item
.
getNameKey
().
equalsIgnoreCase
(
messageObj
.
get
(
REALTIME_IOT_INDEX_KEY
).
toString
())).
collect
(
Collectors
.
toList
());
equipmentSpeIndex
.
setUnit
(
CollUtil
.
isNotEmpty
(
collect
)
?
collect
.
get
(
0
).
getUnit
()
:
"m"
);
equipmentSpeIndex
.
setUnit
(
CollUtil
.
isNotEmpty
(
collect
)
&&
ObjectUtil
.
isNotEmpty
(
collect
.
get
(
0
))
&&
StrUtil
.
isNotEmpty
(
collect
.
get
(
0
).
getUnit
())
?
collect
.
get
(
0
).
getUnit
()
:
"m"
);
isAlarmFlag
(
equipmentSpeIndex
,
iotDataVO
);
isAlarmFlag
(
equipmentSpeIndex
,
iotDataVO
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
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