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
2b05ad64
Commit
2b05ad64
authored
Jul 30, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_dl_bugfix_0723' of…
Merge branch 'develop_dl_bugfix_0723' of
http://36.40.66.175:5000/moa/amos-boot-biz
into develop_dl_bugfix_0723
parents
df91cddd
bae71972
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
9 deletions
+46
-9
RiskBizInfoVo.java
...java/com/yeejoin/equipmanage/common/vo/RiskBizInfoVo.java
+2
-0
TableContentVo.java
...ava/com/yeejoin/equipmanage/common/vo/TableContentVo.java
+10
-0
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+34
-9
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/vo/RiskBizInfoVo.java
View file @
2b05ad64
...
...
@@ -34,6 +34,8 @@ public class RiskBizInfoVo {
private
CustomizeItems
customizeItems
;
private
String
type
;
private
Object
extra
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/vo/TableContentVo.java
View file @
2b05ad64
...
...
@@ -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 @
2b05ad64
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.*
;
...
...
@@ -92,6 +94,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
* 水池信息
*/
private
final
static
String
FHS_FirePoolDevice_WaterLevel
=
"FHS_FirePoolDevice_WaterLevel"
;
private
final
static
String
FHS_LevelDetector_WaterLevel
=
"FHS_LevelDetector_WaterLevel"
;
/**
* 水池信息
*/
...
...
@@ -1112,7 +1116,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
//消防水池液位处理
if
(
iotDataVO
.
getKey
().
equalsIgnoreCase
(
FHS_FirePoolDevice_WaterLevel
)
||
iotDataVO
.
getKey
().
equalsIgnoreCase
(
FHS_WirelessliquidDetector_WaterLevel
))
{
iotDataVO
.
getKey
().
equalsIgnoreCase
(
FHS_WirelessliquidDetector_WaterLevel
)
||
iotDataVO
.
getKey
().
equalsIgnoreCase
(
FHS_LevelDetector_WaterLevel
))
{
alarmFlag
=
doWaterPoolLevel
(
iotDataVO
,
equipmentSpecificIndex
,
messageBodyMap
);
}
// 遥测数据生成告警事件、日志处理
...
...
@@ -1377,14 +1382,22 @@ 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
,
equipmentSpecificIndex
,
String
.
valueOf
(
equipmentSpecificIndex
.
getEquipmentSpecificId
()),
"
equip
/data/analysis"
,
"
fireIot
/data/analysis"
,
indexKey
,
extra
);
extra
,
"cafsWaterLevelOver"
,
tableContentVos
);
if
(
nowValue
.
compareTo
(
minValue
)
<
0
||
nowValue
.
compareTo
(
maxValue
)
>
0
)
{
String
body
=
""
;
...
...
@@ -1469,15 +1482,23 @@ 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
,
nowValue
,
equipmentSpecificIndex
,
map
.
get
(
"id"
).
toString
(),
"
water
/data/analysis"
,
"
fireIot
/data/analysis"
,
"WATER_POOL_LEVEL"
,
extra
);
extra
,
"waterLevelOver"
,
tableContentVos
);
}
if
(
nowValue
.
compareTo
(
minValue
)
<
0
||
nowValue
.
compareTo
(
maxValue
)
>
0
)
{
...
...
@@ -1525,7 +1546,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
String
businessId
,
String
topic
,
String
indexKey
,
Object
extra
)
{
Object
extra
,
String
source
,
List
<
TableContentVo
>
tableContentVos
)
{
if
(
minValue
.
compareTo
(
new
BigDecimal
(
0
))
>
0
&&
maxValue
.
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
BigDecimal
divide
=
new
BigDecimal
(
0
);
...
...
@@ -1538,7 +1561,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
BizMessage
bizMessage
=
new
BizMessage
();
bizMessage
.
setIndexKey
(
indexKey
);
bizMessage
.
setIndexValue
(
String
.
valueOf
(
divide
));
RiskBizInfoVo
riskBizInfoVo
=
fetchData
(
equipmentSpecificIndex
,
extra
);
RiskBizInfoVo
riskBizInfoVo
=
fetchData
(
equipmentSpecificIndex
,
extra
,
source
);
riskBizInfoVo
.
getDynamicDetails
().
get
(
0
).
setTabContent
(
tableContentVos
);
bizMessage
.
setBizInfo
(
riskBizInfoVo
);
bizMessage
.
setTraceId
(
businessId
);
try
{
...
...
@@ -1550,9 +1574,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
}
public
RiskBizInfoVo
fetchData
(
EquipmentSpecificIndex
equipmentSpecificIndex
,
Object
extra
)
{
public
RiskBizInfoVo
fetchData
(
EquipmentSpecificIndex
equipmentSpecificIndex
,
Object
extra
,
String
source
)
{
RiskBizInfoVo
riskBizInfoVo
=
new
RiskBizInfoVo
();
riskBizInfoVo
.
setWarningObjectName
(
"当前值低于或高于报警阈值≥10%"
);
riskBizInfoVo
.
setWarningObjectName
(
equipmentSpecificIndex
.
getEquipmentSpecificName
()
);
riskBizInfoVo
.
setWarningObjectCode
(
equipmentSpecificIndex
.
getEquipmentSpecificCode
());
riskBizInfoVo
.
setSourceAttribution
(
equipmentSpecificIndex
.
getBizOrgCode
());
riskBizInfoVo
.
setSourceAttributionDesc
(
equipmentSpecificIndex
.
getBizOrgName
());
...
...
@@ -1565,6 +1589,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
customizeItems
.
setWarningContent
(
"当前值低于或高于报警阈值≥10%"
);
riskBizInfoVo
.
setCustomizeItems
(
customizeItems
);
riskBizInfoVo
.
setExtra
(
extra
);
riskBizInfoVo
.
setType
(
source
);
return
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