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
8f4e558e
Commit
8f4e558e
authored
Jul 30, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
水池液位等添加预警详情信息
parent
a2eaa4fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
3 deletions
+31
-3
TableContentVo.java
...ava/com/yeejoin/equipmanage/common/vo/TableContentVo.java
+10
-0
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+21
-3
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/vo/TableContentVo.java
View file @
8f4e558e
...
...
@@ -20,4 +20,14 @@ public class TableContentVo {
private
Object
value
;
private
String
type
;
public
TableContentVo
()
{
}
public
TableContentVo
(
String
label
,
String
type
,
Object
value
,
String
key
)
{
this
.
label
=
label
;
this
.
type
=
type
;
this
.
value
=
value
;
this
.
key
=
key
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
8f4e558e
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -27,6 +28,7 @@ import com.yeejoin.equipmanage.common.utils.UUIDUtils;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.common.vo.BizMessage
;
import
com.yeejoin.equipmanage.common.vo.CustomizeItems
;
import
com.yeejoin.equipmanage.dto.TabContent
;
import
com.yeejoin.equipmanage.fegin.IotFeign
;
import
com.yeejoin.equipmanage.fegin.SystemctlFeign
;
import
com.yeejoin.equipmanage.mapper.*
;
...
...
@@ -1377,6 +1379,12 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
extra
.
put
(
"problemReception"
,
"station"
);
extra
.
put
(
"bussId"
,
String
.
valueOf
(
equipmentSpecificIndex
.
getEquipmentSpecificId
()));
extra
.
put
(
"clearUniqueCode"
,
"equip-level"
);
TableContentVo
tableContentVo
=
new
TableContentVo
(
"报警类型"
,
"text"
,
"液位超出阈值"
,
"1"
);
TableContentVo
tableContentVo1
=
new
TableContentVo
(
"报警部位"
,
"text"
,
equipmentSpecificIndex
.
getLocation
(),
"2"
);
TableContentVo
tableContentVo2
=
new
TableContentVo
(
"报警时间"
,
"text"
,
DateUtil
.
now
(),
"3"
);
TableContentVo
tableContentVo3
=
new
TableContentVo
(
"报警对象"
,
"text"
,
equipmentSpecificIndex
.
getEquipmentSpecificName
(),
"4"
);
List
<
TableContentVo
>
tableContentVos
=
Arrays
.
asList
(
tableContentVo
,
tableContentVo1
,
tableContentVo2
,
tableContentVo3
);
handleWarning
(
minValue
,
maxValue
,
nowValue
,
...
...
@@ -1385,7 +1393,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
"fireIot/data/analysis"
,
indexKey
,
extra
,
"cafsWaterLevelOver"
);
"cafsWaterLevelOver"
,
tableContentVos
);
if
(
nowValue
.
compareTo
(
minValue
)
<
0
||
nowValue
.
compareTo
(
maxValue
)
>
0
)
{
String
body
=
""
;
...
...
@@ -1470,6 +1479,12 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
extra
.
put
(
"problemReception"
,
"station"
);
extra
.
put
(
"bussId"
,
map
.
get
(
"id"
).
toString
());
extra
.
put
(
"clearUniqueCode"
,
"water-resource"
);
TableContentVo
tableContentVo
=
new
TableContentVo
(
"报警类型"
,
"text"
,
"液位超出阈值"
,
"1"
);
TableContentVo
tableContentVo1
=
new
TableContentVo
(
"报警部位"
,
"text"
,
equipmentSpecificIndex
.
getLocation
(),
"2"
);
TableContentVo
tableContentVo2
=
new
TableContentVo
(
"报警时间"
,
"text"
,
DateUtil
.
now
(),
"3"
);
TableContentVo
tableContentVo3
=
new
TableContentVo
(
"报警对象"
,
"text"
,
map
.
getOrDefault
(
"name"
,
""
).
toString
(),
"4"
);
List
<
TableContentVo
>
tableContentVos
=
Arrays
.
asList
(
tableContentVo
,
tableContentVo1
,
tableContentVo2
,
tableContentVo3
);
//预警业务 消防水池和消防水箱
handleWarning
(
minValue
,
maxValue
,
...
...
@@ -1479,7 +1494,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
"fireIot/data/analysis"
,
"WATER_POOL_LEVEL"
,
extra
,
"waterLevelOver"
);
"waterLevelOver"
,
tableContentVos
);
}
if
(
nowValue
.
compareTo
(
minValue
)
<
0
||
nowValue
.
compareTo
(
maxValue
)
>
0
)
{
...
...
@@ -1528,7 +1544,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
String
topic
,
String
indexKey
,
Object
extra
,
String
source
)
{
String
source
,
List
<
TableContentVo
>
tableContentVos
)
{
if
(
minValue
.
compareTo
(
new
BigDecimal
(
0
))
>
0
&&
maxValue
.
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
BigDecimal
divide
=
new
BigDecimal
(
0
);
...
...
@@ -1542,6 +1559,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
bizMessage
.
setIndexKey
(
indexKey
);
bizMessage
.
setIndexValue
(
String
.
valueOf
(
divide
));
RiskBizInfoVo
riskBizInfoVo
=
fetchData
(
equipmentSpecificIndex
,
extra
,
source
);
riskBizInfoVo
.
getDynamicDetails
().
get
(
0
).
setTabContent
(
tableContentVos
);
bizMessage
.
setBizInfo
(
riskBizInfoVo
);
bizMessage
.
setTraceId
(
businessId
);
try
{
...
...
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