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
bd37eb1a
Commit
bd37eb1a
authored
Dec 11, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、物联遥测类预警内容中缺少具体遥测数据,比如现在描述是当前液位高于阈值,当前数值到底是多少
2、区分高于阈值和低于阈值
parent
d1151752
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+8
-5
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
bd37eb1a
...
...
@@ -1463,7 +1463,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
detailsVos
.
add
(
dynamicDetailsVo
);
riskBizInfoVo
.
setDynamicDetails
(
detailsVos
);
CustomizeItems
customizeItems
=
new
CustomizeItems
();
customizeItems
.
setWarningContent
(
"消防水池+工业水池储水量<4000m³"
);
customizeItems
.
setWarningContent
(
"
当前值为"
+
indexValue
+
"m³,
消防水池+工业水池储水量<4000m³"
);
riskBizInfoVo
.
setCustomizeItems
(
customizeItems
);
riskBizInfoVo
.
setExtra
(
extra
);
riskBizInfoVo
.
setType
(
"waterCapacity"
);
...
...
@@ -1615,18 +1615,21 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
if
(
minValue
.
compareTo
(
new
BigDecimal
(
0
))
>
0
&&
maxValue
.
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
BigDecimal
divide
=
new
BigDecimal
(
0
);
String
messageLevel
=
"低于"
;
if
(
minValue
.
compareTo
(
nowValue
)
>
0
)
{
divide
=
minValue
!=
null
?
minValue
.
subtract
(
nowValue
).
divide
(
minValue
,
4
,
BigDecimal
.
ROUND_HALF_UP
):
null
;
divide
=
minValue
!=
null
?
nowValue
.
subtract
(
minValue
).
divide
(
minValue
,
4
,
BigDecimal
.
ROUND_HALF_UP
):
null
;
messageLevel
=
"低于"
;
}
else
if
(
nowValue
.
compareTo
(
maxValue
)
>
0
)
{
divide
=
minValue
!=
null
?
nowValue
.
subtract
(
maxValue
).
divide
(
maxValue
,
4
,
BigDecimal
.
ROUND_HALF_UP
):
null
;
messageLevel
=
"高于"
;
}
// 触发预警业务
BizMessage
bizMessage
=
new
BizMessage
();
bizMessage
.
setIndexKey
(
indexKey
);
bizMessage
.
setIndexValue
(
String
.
valueOf
(
divide
));
String
message
=
"当前值为%s
,%s报警阈值≥10%
"
;
// String.format(message, nowValue,
);
RiskBizInfoVo
riskBizInfoVo
=
fetchData
(
equipmentSpecificIndex
,
extra
,
source
,
"当前值低于或高于报警阈值≥10%"
);
String
message
=
"当前值为%s
米,%s报警阈值%s
"
;
String
format
=
String
.
format
(
message
,
nowValue
,
messageLevel
,
"≥10%"
);
RiskBizInfoVo
riskBizInfoVo
=
fetchData
(
equipmentSpecificIndex
,
extra
,
source
,
format
);
riskBizInfoVo
.
setWarningObjectCode
(
businessId
);
riskBizInfoVo
.
getDynamicDetails
().
get
(
0
).
setTabContent
(
tableContentVos
);
bizMessage
.
setBizInfo
(
riskBizInfoVo
);
...
...
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