Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
189ed2eb
Commit
189ed2eb
authored
Mar 13, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_upgrade' into dev_upgrade
parents
26cf3ee3
5de7491c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
3 deletions
+26
-3
EquipmentSpecificIndexController.java
...business/controller/EquipmentSpecificIndexController.java
+1
-1
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+7
-1
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+18
-1
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/EquipmentSpecificIndexController.java
View file @
189ed2eb
...
...
@@ -42,7 +42,7 @@ public class EquipmentSpecificIndexController extends BaseController {
@Autowired
private
EquipmentSpecificIndexService
equipmentSpecificIndexService
;
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取最新告警状态"
,
notes
=
"获取最新告警状态"
)
@RequestMapping
(
value
=
"/queryInitAlarm"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryInitAlerm
(
@ApiParam
(
value
=
"物联采集属性值"
,
required
=
true
)
@RequestParam
String
value
,
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
189ed2eb
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
...
...
@@ -581,7 +582,12 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
}
finally
{
// 更新记录之后发送消息刷新
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
webMqttComponent
.
publish
(
topic
,
"{\"msgType\":\"refreshRecord\"}"
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"contingency"
,
new
ContingencyRo
());
result
.
put
(
"msgContext"
,
Collections
.
EMPTY_MAP
);
result
.
put
(
"msgType"
,
"refreshRecord"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
result
));
// webMqttComponent.publish(topic, "{\"msgType\":\"refreshRecord\"}");
fireQueue
.
removeFirst
();
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
189ed2eb
...
...
@@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.component.rule.config.ClazzUtils
;
import
com.yeejoin.amos.fas.business.action.CustomerAction
;
import
com.yeejoin.amos.fas.business.action.model.ContingencyRo
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttComponent
;
import
com.yeejoin.amos.fas.business.dao.mapper.*
;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
...
...
@@ -76,7 +78,15 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
@Autowired
private
ContingencyInstanceInfoService
contingencyInstanceInfoService
;
@Autowired
private
WebMqttComponent
webMqttComponent
;
@Value
(
"${station.name}"
)
private
String
stationName
;
@Value
(
"${spring.application.name}"
)
private
String
serviceName
;
@Value
(
"${systemctl.sync.switch}"
)
private
Boolean
dataSyncSwitch
;
...
...
@@ -236,6 +246,13 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
planOperationRecordDataSync
(
record
);
result
.
setMessage
(
ReserveEnum
.
RUN
.
getText
());
result
.
setBatchNo
(
batchNo
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"contingency"
,
new
ContingencyRo
());
map
.
put
(
"msgContext"
,
"{\"content\":\"startPlan\"}"
);
map
.
put
(
"msgType"
,
"refreshRecord"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
map
));
}
return
result
;
}
...
...
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