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
7e56a7ab
Commit
7e56a7ab
authored
Nov 25, 2020
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改消息地址配置
parent
23b48e7f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
104 additions
and
101 deletions
+104
-101
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+5
-3
RiskSituationAction.java
...yeejoin/amos/fas/business/action/RiskSituationAction.java
+4
-2
SimpleTipAction.java
...com/yeejoin/amos/fas/business/action/SimpleTipAction.java
+5
-2
StationEnum.java
.../com/yeejoin/amos/fas/business/action/mq/StationEnum.java
+0
-32
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+5
-2
HandlerMqttMessageImpl.java
...mos/fas/business/service/impl/HandlerMqttMessageImpl.java
+46
-30
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+32
-29
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+5
-1
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+2
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
7e56a7ab
...
...
@@ -38,7 +38,6 @@ import com.yeejoin.amos.fas.business.action.model.ContingencyEvent;
import
com.yeejoin.amos.fas.business.action.model.ContingencyRo
;
import
com.yeejoin.amos.fas.business.action.model.DeviceRo
;
import
com.yeejoin.amos.fas.business.action.model.SetpEnum
;
import
com.yeejoin.amos.fas.business.action.mq.StationEnum
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttComponent
;
import
com.yeejoin.amos.fas.business.action.result.ActionResult
;
import
com.yeejoin.amos.fas.business.action.result.SafteyPlanResult
;
...
...
@@ -76,6 +75,9 @@ public class ContingencyAction implements CustomerAction {
@Value
(
"${spring.application.name}"
)
private
String
serviceName
;
@Value
(
"${station.name}"
)
private
String
stationName
;
@Autowired
private
IContingencyInstance
iContingencyInstance
;
...
...
@@ -182,7 +184,7 @@ public class ContingencyAction implements CustomerAction {
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
()))
{
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
contingency
,
result
.
toJson
());
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
StationEnum
.
YINAN
.
getCode
()
,
"plan"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
log
.
info
(
String
.
format
(
"mqtt[%s]:【 %s 】"
,
topic
,
toipResponse
.
toJsonStr
()));
webMqttComponent
.
publish
(
topic
,
toipResponse
.
toJsonStr
());
...
...
@@ -745,7 +747,7 @@ public class ContingencyAction implements CustomerAction {
AbstractActionResultMessage
<?>
action
=
(
AbstractActionResultMessage
<?>)
constructor
.
newInstance
(
result
);
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
()))
{
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
deviceRo
,
result
.
toJson
());
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
StationEnum
.
YINAN
.
getCode
()
,
"plan"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
log
.
info
(
String
.
format
(
"mqtt[%s]:【 %s 】"
,
topic
,
toipResponse
.
toJsonStr
()));
webMqttComponent
.
publish
(
topic
,
toipResponse
.
toJsonStr
());
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/RiskSituationAction.java
View file @
7e56a7ab
...
...
@@ -11,7 +11,6 @@ import org.springframework.stereotype.Component;
import
com.yeejoin.amos.component.rule.MethodParam
;
import
com.yeejoin.amos.component.rule.RuleActionBean
;
import
com.yeejoin.amos.component.rule.RuleMethod
;
import
com.yeejoin.amos.fas.business.action.mq.StationEnum
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttComponent
;
import
com.yeejoin.amos.fas.business.action.result.ActionResult
;
import
com.yeejoin.amos.fas.business.action.result.BubbleTipResult
;
...
...
@@ -42,6 +41,9 @@ public class RiskSituationAction implements CustomerAction
@Value
(
"${spring.application.name}"
)
private
String
serviceName
;
@Value
(
"${station.name}"
)
private
String
stationName
;
@RuleMethod
(
methodLabel
=
"气泡提示"
,
project
=
"换流站消防专项预案"
)
public
void
sendBubbleTip
(
@MethodParam
(
paramLabel
=
"bizobj对象"
)
Object
bizobj
,
@MethodParam
(
paramLabel
=
"是否显示名称"
)
Boolean
showInfo
,
...
...
@@ -70,7 +72,7 @@ public class RiskSituationAction implements CustomerAction
String
msgType
=
"bubbleTip"
;
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
()))
{
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
bizobj
,
result
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
StationEnum
.
YINAN
.
getCode
()
,
"rule"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"rule"
);
webMqttComponent
.
publish
(
topic
,
toipResponse
.
toJsonStr
());
}
else
{
Object
obj
=
action
.
execute
(
msgType
,
bizobj
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/SimpleTipAction.java
View file @
7e56a7ab
...
...
@@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Component
;
import
com.yeejoin.amos.fas.business.action.el.ELEvaluationContext
;
import
com.yeejoin.amos.fas.business.action.mq.StationEnum
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttComponent
;
import
com.yeejoin.amos.fas.business.action.result.ActionResult
;
import
com.yeejoin.amos.fas.business.action.result.TipResult
;
...
...
@@ -43,6 +42,10 @@ public class SimpleTipAction implements CustomerAction
@Value
(
"${spring.application.name}"
)
private
String
serviceName
;
@Value
(
"${station.name}"
)
private
String
stationName
;
//@ExposeAction("消息提示")
public
void
sendMessageTip
(
Object
bizobj
,
String
title
,
String
content
,
String
type
)
{
...
...
@@ -68,7 +71,7 @@ public class SimpleTipAction implements CustomerAction
String
msgType
=
"message"
;
if
(
"mqtt"
.
equals
(
pushType
.
toLowerCase
()))
{
ToipResponse
toipResponse
=
action
.
buildResponse
(
msgType
,
bizobj
,
result
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
StationEnum
.
YINAN
.
getCode
()
,
"rule"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"rule"
);
webMqttComponent
.
publish
(
topic
,
toipResponse
.
toJsonStr
());
}
else
{
action
.
execute
(
msgType
,
bizobj
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/mq/StationEnum.java
deleted
100644 → 0
View file @
23b48e7f
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
.
mq
;
public
enum
StationEnum
{
YINAN
(
"yinan"
,
"沂南站"
);
String
code
;
String
desc
;
private
StationEnum
(
String
code
,
String
desc
)
{
this
.
desc
=
desc
;
this
.
code
=
code
;
}
public
String
getDesc
()
{
return
desc
;
}
public
void
setDesc
(
String
desc
)
{
this
.
desc
=
desc
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
7e56a7ab
...
...
@@ -25,7 +25,6 @@ import com.yeejoin.amos.fas.business.action.ContingencyAction;
import
com.yeejoin.amos.fas.business.action.model.ContingencyEvent
;
import
com.yeejoin.amos.fas.business.action.model.ContingencyRo
;
import
com.yeejoin.amos.fas.business.action.model.SetpEnum
;
import
com.yeejoin.amos.fas.business.action.mq.StationEnum
;
import
com.yeejoin.amos.fas.business.action.util.ContingencyLogPublisher
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper
;
...
...
@@ -66,6 +65,10 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
@Autowired
private
IContingencyInstance
iContingencyInstance
;
@Value
(
"${station.name}"
)
private
String
stationName
;
private
static
Map
<
String
,
String
>
stepMap
=
new
HashMap
<>();
...
...
@@ -213,7 +216,7 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
json
.
put
(
"msgType"
,
"message"
);
json
.
put
(
"msgContext"
,
msgContext
);
event
.
setMsgBody
(
json
.
toJSONString
());
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
StationEnum
.
YINAN
.
getCode
()
,
"plan"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
event
.
setTopic
(
topic
);
event
.
setMsgType
(
"clickEvent"
);
event
.
setContingency
(
batchNo
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/HandlerMqttMessageImpl.java
View file @
7e56a7ab
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.UUID
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Lists
;
...
...
@@ -10,12 +33,15 @@ import com.yeejoin.amos.fas.business.action.model.FireEquimentDataRo;
import
com.yeejoin.amos.fas.business.action.model.SetpEnum
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttComponent
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttSubscribe
;
import
com.yeejoin.amos.fas.business.bo.JpushMsgBo
;
import
com.yeejoin.amos.fas.business.bo.MsgParamBo
;
import
com.yeejoin.amos.fas.business.dao.mapper.*
;
import
com.yeejoin.amos.fas.business.dao.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaEquipmentPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FmeaPointInputitemMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEvaluationModelDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
...
...
@@ -25,28 +51,21 @@ import com.yeejoin.amos.fas.business.service.intfc.IView3dService;
import
com.yeejoin.amos.fas.business.util.JexlUtil
;
import
com.yeejoin.amos.fas.business.util.RpnUtils
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.vo.*
;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificForRiskVo
;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.business.vo.Toke
;
import
com.yeejoin.amos.fas.business.vo.TopicEntityVo
;
import
com.yeejoin.amos.fas.client.invoke.RsDataQueue
;
import
com.yeejoin.amos.fas.common.enums.EquipmentRiskTypeEnum
;
import
com.yeejoin.amos.fas.common.enums.View3dRefreshAreaEum
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.EvaluationModel
;
import
com.yeejoin.amos.fas.dao.entity.Fmea
;
import
com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint
;
import
com.yeejoin.amos.fas.dao.entity.FmeaPointInputitem
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
/**
* @author keyong
...
...
@@ -118,7 +137,9 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
@Autowired
private
FmeaMapper
fmeaMapper
;
@Value
(
"${station.name}"
)
private
String
stationName
;
@Value
(
"${spring.application.name}"
)
private
String
serviceName
;
...
...
@@ -166,18 +187,13 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
}
else
{
// 向三维推送实时值修改
log
.
info
(
"(监测)Message type is: "
+
equipmentSpecificIndex
.
getType
());
Map
<
String
,
Object
>
content
=
new
HashMap
<>();
// content.put("id", fireEquipmentData.getId());
// content.put("label", fireEquipmentData.getEqPointName());
// content.put("changeDate", fireEquipmentData.getCreateDate());
// content.put("orgCode", fireEquipment.getOrgCode());
// content.put("status", deviceData.getSoe());
content
.
put
(
"id"
,
"id"
);
content
.
put
(
"label"
,
"eqPointName"
);
content
.
put
(
"changeDate"
,
new
Date
());
content
.
put
(
"orgCode"
,
"orgCode"
);
content
.
put
(
"status"
,
deviceData
.
getSoe
());
iDataRefreshService
.
sendRefreshDataWithArea
(
View3dRefreshAreaEum
.
monitor_data
.
getCode
(),
content
);
String
title
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/monitorData"
);
String
title
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/monitorData"
);
webMqttComponent
.
publish
(
title
,
JSON
.
toJSONString
(
view3dService
.
getEquipStatusList
(
equipmentSpecific
.
getOrgCode
())));
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
7e56a7ab
...
...
@@ -242,6 +242,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Autowired
protected
HttpServletRequest
request
;
@Value
(
"${station.name}"
)
private
String
stationName
;
public
static
String
cacheKeyForCanBeRunning
()
{
...
...
@@ -803,19 +806,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
// 今日安全
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
dateString
=
formatter
.
format
(
new
Date
());
String
topicOne
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh"
,
"todaySafetyIndex"
);
String
topicOne
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"todaySafetyIndex"
);
webMqttComponent
.
publish
(
topicOne
,
JSON
.
toJSONString
(
view3dService
.
getSafetyIndexInfoByDate
(
orgCode
,
dateString
)));
// 巡检异常
String
topicTwo
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh"
,
"fireSafety"
);
String
topicTwo
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"fireSafety"
);
webMqttComponent
.
publish
(
topicTwo
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"check"
,
orgCode
)));
// 一周安全趋势
String
topicThree
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh"
,
"weekSafetyIndex"
);
String
topicThree
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"weekSafetyIndex"
);
webMqttComponent
.
publish
(
topicThree
,
JSON
.
toJSONString
(
view3dService
.
getSafetyIndexWeek
(
orgCode
)));
// 今日巡检
String
topicFour
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh"
,
"todayCheckStatus"
);
String
topicFour
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"todayCheckStatus"
);
webMqttComponent
.
publish
(
topicThree
,
JSON
.
toJSONString
(
view3dService
.
getStatisticsCheck
(
orgCode
)));
}
...
...
@@ -1043,7 +1046,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
// 推送设备状态信息
Alarm
alarm
=
iAlarmDao
.
findByStatusTrueAndFireEquipmentPointCode
(
param
.
getPointCode
());
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/monitorData"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/monitorData"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
view3dService
.
getEquipStatusList
(
alarm
.
getOrgCode
())));
}
catch
(
Exception
e
)
{
log
.
error
(
"推送前端数据失败-->"
+
JSON
.
toJSONString
(
param
));
...
...
@@ -1148,7 +1151,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
* 推送告警数据
* 影响区域:消防安全=>火灾告警
*/
String
topic
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh"
,
"fireSafety"
);
String
topic
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"fireSafety"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
fireEquipmentPoint
.
getOrgCode
())));
}
...
...
@@ -1180,11 +1183,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
* 推送设备状态
* 影响区域:设备状态
*/
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/monitorData"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/monitorData"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
view3dService
.
getEquipStatusList
(
fireEquipment
.
getOrgCode
())));
}
}
// String topic = String.format("/%s/%s/%s", serviceName,
"yinan"
,"telesignaling");S
// String topic = String.format("/%s/%s/%s", serviceName,
StationEnum.YINAN.getCode()
,"telesignaling");S
// webMqttComponent.publish(topic, JSON.toJSONString(deviceData));
List
<
AlarmParam
>
list
=
new
ArrayList
<>();
...
...
@@ -1294,7 +1297,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
try
{
redisTemplate
.
opsForHash
().
put
(
"Analogue"
,
data
.
getPointCode
(),
data
);
// remoteWebSocketServer.sendMessage("plan", JSON.toJSONString(data));
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"analogue"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"analogue"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
data
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
@@ -1480,7 +1483,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
fmeaMapper
.
updateRpn
(
fmea
);
//2.计算上级风险值(风险点及父节点)
this
.
notifyRiskSource
(
newLevel
.
getOrgCode
(),
fmeaId
,
fmea
.
getRiskSourceId
(),
nofityType
,
jpushMsgBo
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/incidenceSeverityMatrix"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/incidenceSeverityMatrix"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryForMatrix
()));
}
}
...
...
@@ -1585,7 +1588,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
//1.3.更新fmea的rpn、风险等级及newOid
fmeaMapper
.
updateRpn
(
fmea
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/incidenceSeverityMatrix"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/incidenceSeverityMatrix"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryForMatrix
()));
//2.计算风险点rpn、rpni、riskLevelId
this
.
notifyRiskSource
(
newLevel
.
getOrgCode
(),
fmeaId
,
fmea
.
getRiskSourceId
(),
notifyType
,
jpushMsgBo
);
...
...
@@ -1690,13 +1693,13 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
try
{
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"shaoxing"
,
"data/refresh/situationMap"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/situationMap"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryRiskAreaRpn
()));
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/riskDegreeHistogram"
);
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/riskDegreeHistogram"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryRPNReport
()));
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/riskDegreePie"
);
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/riskDegreePie"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryForRiseUp
()));
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/incidenceSeverityMatrix"
);
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/incidenceSeverityMatrix"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryForMatrix
()));
// 今日安全
...
...
@@ -1705,17 +1708,17 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
if
(
StringUtils
.
isEmpty
(
orgCode
)){
orgCode
=
riskSource
.
getOrgCode
();
}
String
topicOne
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/todaySafetyIndex"
);
String
topicOne
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/todaySafetyIndex"
);
webMqttComponent
.
publish
(
topicOne
,
JSON
.
toJSONString
(
view3dService
.
getSafetyIndexInfoByDate
(
orgCode
,
dateString
)));
// 消防安全
String
topicTow
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/fireSafety"
);
String
topicTow
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/fireSafety"
);
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"risk"
,
orgCode
)));
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"check"
,
orgCode
)));
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
orgCode
)));
// 一周安全趋势
String
topicThree
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh"
,
"weekSafetyIndex"
);
String
topicThree
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"weekSafetyIndex"
);
webMqttComponent
.
publish
(
topicThree
,
JSON
.
toJSONString
(
view3dService
.
getSafetyIndexWeek
(
orgCode
)));
}
catch
(
Exception
e
)
{
...
...
@@ -1748,13 +1751,13 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
try
{
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"shaoxing"
,
"data/refresh/situationMap"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/situationMap"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryRiskAreaRpn
()));
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/riskDegreeHistogram"
);
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/riskDegreeHistogram"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryRPNReport
()));
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/riskDegreePie"
);
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/riskDegreePie"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryForRiseUp
()));
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/incidenceSeverityMatrix"
);
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/incidenceSeverityMatrix"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryForMatrix
()));
// 今日安全
...
...
@@ -1764,17 +1767,17 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
if
(
StringUtils
.
isEmpty
(
orgCode
)){
orgCode
=
riskSource
.
getOrgCode
();
}
String
topicOne
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/todaySafetyIndex"
);
String
topicOne
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/todaySafetyIndex"
);
webMqttComponent
.
publish
(
topicOne
,
JSON
.
toJSONString
(
view3dService
.
getSafetyIndexInfoByDate
(
orgCode
,
dateString
)));
// 消防安全
String
topicTow
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh/fireSafety"
);
String
topicTow
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/fireSafety"
);
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"risk"
,
orgCode
)));
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"check"
,
orgCode
)));
webMqttComponent
.
publish
(
topicTow
,
JSON
.
toJSONString
(
view3dService
.
getSafetyExecuteListTop5
(
"fire"
,
orgCode
)));
// 一周安全趋势
String
topicThree
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
"yinan"
,
"data/refresh"
,
"weekSafetyIndex"
);
String
topicThree
=
String
.
format
(
"/%s/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh"
,
"weekSafetyIndex"
);
webMqttComponent
.
publish
(
topicThree
,
JSON
.
toJSONString
(
view3dService
.
getSafetyIndexWeek
(
orgCode
)));
}
catch
(
Exception
e
)
{
...
...
@@ -1931,13 +1934,13 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
public
void
batchSaveRegionUe4
(
List
<
BindRegionBo
>
regionBoList
)
{
riskSourceMapper
.
batchSaveRegionUe4
(
regionBoList
);
try
{
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"shaoxing"
,
"data/refresh/situationMap"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/situationMap"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryRiskAreaRpn
()));
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"shaoxing"
,
"data/refresh/riskDegreeHistogram"
);
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/riskDegreeHistogram"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryRPNReport
()));
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"shaoxing"
,
"data/refresh/riskDegreePie"
);
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/riskDegreePie"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryForRiseUp
()));
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
"shaoxing"
,
"data/refresh/incidenceSeverityMatrix"
);
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"data/refresh/incidenceSeverityMatrix"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
queryForMatrix
()));
}
catch
(
Exception
e
)
{
log
.
error
(
"数据获取失败"
,
e
);
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
7e56a7ab
...
...
@@ -71,4 +71,8 @@ amos.feign.gennerator.use-gateway=true
autoSys.push.type
=
mqtt
#�����
file.downLoad.url
=
http://172.16.10.175:8888/
file.downLoad.url
=
http://39.98.246.31:8888/
#站端名称使用全拼
station.name
=
yinan
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
7e56a7ab
...
...
@@ -61,4 +61,6 @@ param.safetyIndexChange.cron = 0 0 2 * * ?
param.weather.url
=
http://wthrcdn.etouch.cn/weather_mini?citykey=
#站端名称使用全拼
station.name
=
yinan
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