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
227f6697
Commit
227f6697
authored
Dec 08, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加警情预案的消息推送
parent
c96555c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+13
-5
application.properties
...boot-system-jcs/src/main/resources/application.properties
+2
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
227f6697
...
...
@@ -5,8 +5,6 @@ import static org.hamcrest.CoreMatchers.nullValue;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -130,6 +128,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
private
long
time
;
@Value
(
"${mqtt.topic.command.power.deployment}"
)
private
String
topic1
;
@Value
(
"${mqtt.topic.command.knowledgebase.alert.match}"
)
private
String
topicMatch
;
@Autowired
private
OrgUsrServiceImpl
iOrgUsrService
;
...
...
@@ -971,6 +972,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
@SuppressWarnings
(
"unchecked"
)
public
Object
toCompletePoliceSituationMatch
(
Long
id
)
throws
Exception
{
Object
result
=
null
;;
AlertCalledFormDto
dto
=
(
AlertCalledFormDto
)
selectAlertCalledByIdNoRedis
(
id
);
AlertCalled
alertCalled
=
dto
.
getAlertCalled
();
List
<
FormValue
>
list
=
dto
.
getDynamicFormAlert
();
...
...
@@ -984,9 +986,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
break
;
}
}
re
turn
getIdsList1
(
alertCalled
.
getAlertTypeCode
()
,
AlertStageEnums
.
救援预案警情类型
.
getValue
()
+
","
+
condition1
,
re
sult
=
getIdsList1
(
alertCalled
.
getAlertTypeCode
()
,
AlertStageEnums
.
救援预案警情类型
.
getValue
()
+
","
+
condition1
,
AlertStageEnums
.
责任单位
.
getValue
()
+
","
+
condition2
,
AlertStageEnums
.
重点部位名称
.
getValue
()
+
","
+
condition3
);
//
}
else
if
(
alertCalled
.
getAlertTypeCode
().
equals
(
AlertStageEnums
.
HKJY
.
getCode
()))
{
String
condition1
=
alertCalled
.
getAlertType
();
// 航空器救援
String
condition2
=
""
;
...
...
@@ -995,12 +1000,15 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
condition2
=
condition1
+
i
.
getValue
();
}
}
re
turn
getIdsList1
(
alertCalled
.
getAlertTypeCode
(),
AlertStageEnums
.
救援预案警情类型
.
getValue
()
+
","
+
condition1
,
re
sult
=
getIdsList1
(
alertCalled
.
getAlertTypeCode
(),
AlertStageEnums
.
救援预案警情类型
.
getValue
()
+
","
+
condition1
,
AlertStageEnums
.
航空器救援子类
.
getValue
()
+
","
+
condition2
,
null
);
}
else
{
String
condition1
=
alertCalled
.
getAlertType
();
re
turn
getIdsList1
(
alertCalled
.
getAlertTypeCode
(),
AlertStageEnums
.
救援预案警情类型
.
getValue
()
+
","
+
condition1
,
null
,
null
);
re
sult
=
getIdsList1
(
alertCalled
.
getAlertTypeCode
(),
AlertStageEnums
.
救援预案警情类型
.
getValue
()
+
","
+
condition1
,
null
,
null
);
}
emqKeeper
.
getMqttClient
().
publish
(
topicMatch
,
result
.
toString
().
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
true
);
return
result
;
}
// private List<Map<String, Object>> getIdsList(String condition1, String condition2, String condition3) {
...
...
amos-boot-system-jcs/src/main/resources/application.properties
View file @
227f6697
...
...
@@ -65,7 +65,8 @@ mqtt.topic.command.power.deployment=power
mqtt.topic.alert.iot
=
iot-system-alarm
mqtt.topic.alert.iot.web
=
iot-system-alarm-web
#警情预案匹配的消息topic名称
mqtt.topic.command.knowledgebase.alert.match
=
knowledgebaseAlertMatch
security.systemctl.name
=
AMOS-API-SYSTEMCTL
...
...
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