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
4f7fae68
Commit
4f7fae68
authored
Oct 15, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
健康诊断告警,稳压泵每小时启动次数>15次生成了告警记录、但是设备未赋红码
parent
be0b2af0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
21 deletions
+46
-21
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+46
-21
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 @
4f7fae68
...
@@ -238,6 +238,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -238,6 +238,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
private
String
specialChars
;
private
String
specialChars
;
@Value
(
"${auth-key-auth-enabled:}"
)
@Value
(
"${auth-key-auth-enabled:}"
)
private
String
authKeyEnable
;
private
String
authKeyEnable
;
private
static
final
String
QRCODE_REDIS_KEY
=
"qrCodeRedisKey"
;
public
static
List
<
EquipmentSpecificAlarmLog
>
upAlarmLogStatus
(
String
iotCode
,
String
equipmentSpecificIndexKey
,
public
static
List
<
EquipmentSpecificAlarmLog
>
upAlarmLogStatus
(
String
iotCode
,
String
equipmentSpecificIndexKey
,
String
traceId
,
IEquipmentSpecificAlarmLogService
equipmentSpecificAlarmLogService
,
String
traceId
,
IEquipmentSpecificAlarmLogService
equipmentSpecificAlarmLogService
,
...
@@ -1425,14 +1426,17 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -1425,14 +1426,17 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
}
}
//预警业务 泡沫罐 或 者管网压力
//预警业务 泡沫罐 或 者管网压力
JSONObject
config
=
this
.
getRiskTriggerConfig
(
"FIRE_EQUIP_LEVEL"
);
if
(
Objects
.
isNull
(
config
))
{
throw
new
RuntimeException
(
"获取配置失败!"
);
}
HashMap
<
String
,
String
>
extra
=
new
HashMap
<>();
HashMap
<
String
,
String
>
extra
=
new
HashMap
<>();
extra
.
put
(
"useSource"
,
"center"
);
extra
.
put
(
"useSource"
,
config
.
getString
(
"useSource"
)
);
extra
.
put
(
"codingSystem"
,
"center"
);
extra
.
put
(
"codingSystem"
,
config
.
getString
(
"useSource"
)
);
extra
.
put
(
"codingType"
,
"equipment"
);
extra
.
put
(
"codingType"
,
config
.
getString
(
"codingType"
)
);
extra
.
put
(
"problemReception"
,
"station"
);
extra
.
put
(
"problemReception"
,
config
.
getString
(
"problemReception"
)
);
extra
.
put
(
"bussId"
,
String
.
valueOf
(
equipmentSpecificIndex
.
getEquipmentSpecificId
()));
extra
.
put
(
"bussId"
,
String
.
valueOf
(
equipmentSpecificIndex
.
getEquipmentSpecificId
()));
extra
.
put
(
"clearUniqueCode"
,
"equip-level"
);
extra
.
put
(
"clearUniqueCode"
,
config
.
getString
(
"clearUniqueCode"
)
);
TableContentVo
tableContentVo
=
new
TableContentVo
(
"报警类型"
,
"text"
,
"液位超出阈值"
,
"1"
);
TableContentVo
tableContentVo
=
new
TableContentVo
(
"报警类型"
,
"text"
,
"液位超出阈值"
,
"1"
);
TableContentVo
tableContentVo1
=
new
TableContentVo
(
"报警部位"
,
"text"
,
equipmentSpecificIndex
.
getLocation
(),
"2"
);
TableContentVo
tableContentVo1
=
new
TableContentVo
(
"报警部位"
,
"text"
,
equipmentSpecificIndex
.
getLocation
(),
"2"
);
...
@@ -1502,13 +1506,17 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -1502,13 +1506,17 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
private
void
doWaterStationInfo
(
String
bizOrgCode
,
String
bizOrgName
,
String
indexValue
)
{
private
void
doWaterStationInfo
(
String
bizOrgCode
,
String
bizOrgName
,
String
indexValue
)
{
String
indexKey
=
"WATER_CAPACITY"
;
String
indexKey
=
"WATER_CAPACITY"
;
String
warningObjectCode
=
bizOrgCode
+
"@"
+
indexKey
;
String
warningObjectCode
=
bizOrgCode
+
"@"
+
indexKey
;
JSONObject
config
=
this
.
getRiskTriggerConfig
(
"FIRE_WATER_CAPACITY"
);
if
(
Objects
.
isNull
(
config
))
{
throw
new
RuntimeException
(
"获取配置失败!"
);
}
HashMap
<
String
,
String
>
extra
=
new
HashMap
<>();
HashMap
<
String
,
String
>
extra
=
new
HashMap
<>();
extra
.
put
(
"useSource"
,
"center"
);
extra
.
put
(
"useSource"
,
config
.
getString
(
"useSource"
)
);
extra
.
put
(
"codingSystem"
,
"center"
);
extra
.
put
(
"codingSystem"
,
config
.
getString
(
"useSource"
)
);
extra
.
put
(
"codingType"
,
"station"
);
extra
.
put
(
"codingType"
,
config
.
getString
(
"codingType"
)
);
extra
.
put
(
"problemReception"
,
"station"
);
extra
.
put
(
"problemReception"
,
config
.
getString
(
"problemReception"
)
);
extra
.
put
(
"bussId"
,
warningObjectCode
);
extra
.
put
(
"bussId"
,
warningObjectCode
);
extra
.
put
(
"clearUniqueCode"
,
"station-WATER_CAPACITY"
);
extra
.
put
(
"clearUniqueCode"
,
config
.
getString
(
"clearUniqueCode"
)
);
TableContentVo
tableContentVo
=
new
TableContentVo
(
"分析结果"
,
"text"
,
"消防水池+工业水池储水量<4000m³"
,
"1"
);
TableContentVo
tableContentVo
=
new
TableContentVo
(
"分析结果"
,
"text"
,
"消防水池+工业水池储水量<4000m³"
,
"1"
);
TableContentVo
tableContentVo1
=
new
TableContentVo
(
"管理要求"
,
"text"
,
"每站消防储水量不少于4000m³"
,
"2"
);
TableContentVo
tableContentVo1
=
new
TableContentVo
(
"管理要求"
,
"text"
,
"每站消防储水量不少于4000m³"
,
"2"
);
TableContentVo
tableContentVo2
=
new
TableContentVo
(
"管理依据"
,
"text"
,
"换流站消防系统运行规程"
,
"3"
);
TableContentVo
tableContentVo2
=
new
TableContentVo
(
"管理依据"
,
"text"
,
"换流站消防系统运行规程"
,
"3"
);
...
@@ -1553,13 +1561,17 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -1553,13 +1561,17 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
if
(
200
==
mapResponseModel
.
getStatus
())
{
if
(
200
==
mapResponseModel
.
getStatus
())
{
Map
<
String
,
Integer
>
result
=
mapResponseModel
.
getResult
();
Map
<
String
,
Integer
>
result
=
mapResponseModel
.
getResult
();
Integer
totalNum
=
result
.
get
(
"num"
);
Integer
totalNum
=
result
.
get
(
"num"
);
JSONObject
config
=
this
.
getRiskTriggerConfig
(
"FIRE_EQUIP_PRESSURE"
);
if
(
Objects
.
isNull
(
config
))
{
throw
new
RuntimeException
(
"获取配置失败!"
);
}
HashMap
<
String
,
String
>
extra
=
new
HashMap
<>();
HashMap
<
String
,
String
>
extra
=
new
HashMap
<>();
extra
.
put
(
"useSource"
,
"center"
);
extra
.
put
(
"useSource"
,
config
.
getString
(
"useSource"
)
);
extra
.
put
(
"codingSystem"
,
"center"
);
extra
.
put
(
"codingSystem"
,
config
.
getString
(
"useSource"
)
);
extra
.
put
(
"codingType"
,
"equipment"
);
extra
.
put
(
"codingType"
,
config
.
getString
(
"codingType"
)
);
extra
.
put
(
"problemReception"
,
"station"
);
extra
.
put
(
"problemReception"
,
config
.
getString
(
"problemReception"
)
);
extra
.
put
(
"bussId"
,
String
.
valueOf
(
equipmentSpecificIndex
.
getEquipmentSpecificId
()));
extra
.
put
(
"bussId"
,
String
.
valueOf
(
equipmentSpecificIndex
.
getEquipmentSpecificId
()));
extra
.
put
(
"clearUniqueCode"
,
"equip-pressure"
);
extra
.
put
(
"clearUniqueCode"
,
config
.
getString
(
"clearUniqueCode"
)
);
TableContentVo
tableContentVo
=
new
TableContentVo
(
"报警类型"
,
"text"
,
"稳压泵启停频次过高"
,
"1"
);
TableContentVo
tableContentVo
=
new
TableContentVo
(
"报警类型"
,
"text"
,
"稳压泵启停频次过高"
,
"1"
);
TableContentVo
tableContentVo1
=
new
TableContentVo
(
"报警部位"
,
"text"
,
equipmentSpecificIndex
.
getLocation
(),
"2"
);
TableContentVo
tableContentVo1
=
new
TableContentVo
(
"报警部位"
,
"text"
,
equipmentSpecificIndex
.
getLocation
(),
"2"
);
TableContentVo
tableContentVo2
=
new
TableContentVo
(
"报警时间"
,
"text"
,
DateUtil
.
now
(),
"3"
);
TableContentVo
tableContentVo2
=
new
TableContentVo
(
"报警时间"
,
"text"
,
DateUtil
.
now
(),
"3"
);
...
@@ -1637,13 +1649,17 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -1637,13 +1649,17 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
nowValue
=
checkValue
;
nowValue
=
checkValue
;
}
}
if
(
"pool"
.
equals
(
map
.
get
(
"resourceType"
).
toString
())
||
"waterTank"
.
equals
(
map
.
get
(
"resourceType"
).
toString
()))
{
if
(
"pool"
.
equals
(
map
.
get
(
"resourceType"
).
toString
())
||
"waterTank"
.
equals
(
map
.
get
(
"resourceType"
).
toString
()))
{
JSONObject
config
=
this
.
getRiskTriggerConfig
(
"FIRE_WATER_LEVEL"
);
if
(
Objects
.
isNull
(
config
))
{
throw
new
RuntimeException
(
"获取配置失败!"
);
}
HashMap
<
String
,
String
>
extra
=
new
HashMap
<>();
HashMap
<
String
,
String
>
extra
=
new
HashMap
<>();
extra
.
put
(
"useSource"
,
"center"
);
extra
.
put
(
"useSource"
,
config
.
getString
(
"useSource"
)
);
extra
.
put
(
"codingSystem"
,
"center"
);
extra
.
put
(
"codingSystem"
,
config
.
getString
(
"useSource"
)
);
extra
.
put
(
"codingType"
,
"water"
);
extra
.
put
(
"codingType"
,
config
.
getString
(
"codingType"
)
);
extra
.
put
(
"problemReception"
,
"station"
);
extra
.
put
(
"problemReception"
,
config
.
getString
(
"problemReception"
)
);
extra
.
put
(
"bussId"
,
map
.
get
(
"id"
).
toString
());
extra
.
put
(
"bussId"
,
map
.
get
(
"id"
).
toString
());
extra
.
put
(
"clearUniqueCode"
,
"water-resource"
);
extra
.
put
(
"clearUniqueCode"
,
config
.
getString
(
"clearUniqueCode"
)
);
TableContentVo
tableContentVo
=
new
TableContentVo
(
"报警类型"
,
"text"
,
"液位超出阈值"
,
"1"
);
TableContentVo
tableContentVo
=
new
TableContentVo
(
"报警类型"
,
"text"
,
"液位超出阈值"
,
"1"
);
TableContentVo
tableContentVo1
=
new
TableContentVo
(
"报警部位"
,
"text"
,
equipmentSpecificIndex
.
getLocation
(),
"2"
);
TableContentVo
tableContentVo1
=
new
TableContentVo
(
"报警部位"
,
"text"
,
equipmentSpecificIndex
.
getLocation
(),
"2"
);
TableContentVo
tableContentVo2
=
new
TableContentVo
(
"报警时间"
,
"text"
,
DateUtil
.
now
(),
"3"
);
TableContentVo
tableContentVo2
=
new
TableContentVo
(
"报警时间"
,
"text"
,
DateUtil
.
now
(),
"3"
);
...
@@ -3093,4 +3109,13 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -3093,4 +3109,13 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
mqttSendGateway
.
sendToMqtt
(
ConfigPageTopicEnum
.
EQUIP_MULTI_INDICATOR
.
getTopic
(),
message2
.
toJSONString
());
mqttSendGateway
.
sendToMqtt
(
ConfigPageTopicEnum
.
EQUIP_MULTI_INDICATOR
.
getTopic
(),
message2
.
toJSONString
());
}
}
}
}
private
JSONObject
getRiskTriggerConfig
(
String
tableName
)
{
Map
<
String
,
Object
>
configMap
=
JSON
.
parseObject
(
redisUtils
.
get
(
QRCODE_REDIS_KEY
).
toString
(),
Map
.
class
);
if
(!
ObjectUtils
.
isEmpty
(
configMap
))
{
String
config
=
configMap
.
get
(
tableName
+
"0"
).
toString
();
return
JSONObject
.
parseObject
(
config
).
getJSONObject
(
"extra"
);
}
return
null
;
}
}
}
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