Commit 86c8b5f0 authored by maoying's avatar maoying

修改首页风险态势数据推送

parent dabef013
...@@ -72,8 +72,10 @@ public class View3dController extends BaseController { ...@@ -72,8 +72,10 @@ public class View3dController extends BaseController {
@ApiOperation(value = "区域绑定", notes = "区域绑定") @ApiOperation(value = "区域绑定", notes = "区域绑定")
@PostMapping(value="region/bind") @PostMapping(value="region/bind")
public CommonResponse batchSaveRegionUe4(@ApiParam(name = "区域参数列表",required = true) @RequestBody List<BindRegionBo> regionBoList) { public CommonResponse batchSaveRegionUe4(@ApiParam(name = "区域参数列表",required = true) @RequestBody List<BindRegionBo> regionBoList) {
try { try {
riskSourceService.batchSaveRegionUe4(regionBoList); ReginParams reginParams =getSelectedOrgInfo();
String orgCode = this.getOrgCode(reginParams);
riskSourceService.batchSaveRegionUe4(regionBoList,orgCode);
} catch (Exception e) { } catch (Exception e) {
return CommonResponseUtil.failure(e.getMessage()); return CommonResponseUtil.failure(e.getMessage());
} }
......
...@@ -1694,7 +1694,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1694,7 +1694,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
} }
try { try {
String topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/situationMap"); String topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/situationMap");
webMqttComponent.publish(topic, JSON.toJSONString(queryRiskAreaRpn())); webMqttComponent.publish(topic, JSON.toJSONString(queryRiskSourceSecondLevel(orgCode)));
topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/riskDegreeHistogram"); topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/riskDegreeHistogram");
webMqttComponent.publish(topic, JSON.toJSONString(queryRPNReport())); webMqttComponent.publish(topic, JSON.toJSONString(queryRPNReport()));
topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/riskDegreePie"); topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/riskDegreePie");
...@@ -1752,7 +1752,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1752,7 +1752,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
try{ try{
String topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/situationMap"); String topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/situationMap");
webMqttComponent.publish(topic, JSON.toJSONString(queryRiskAreaRpn())); webMqttComponent.publish(topic, JSON.toJSONString(queryRiskSourceSecondLevel(riskSource.getOrgCode())));
topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/riskDegreeHistogram"); topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/riskDegreeHistogram");
webMqttComponent.publish(topic, JSON.toJSONString(queryRPNReport())); webMqttComponent.publish(topic, JSON.toJSONString(queryRPNReport()));
topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/riskDegreePie"); topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/riskDegreePie");
...@@ -1931,11 +1931,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -1931,11 +1931,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
} }
@Override @Override
public void batchSaveRegionUe4(List<BindRegionBo> regionBoList) { public void batchSaveRegionUe4(List<BindRegionBo> regionBoList,String orgCode) {
riskSourceMapper.batchSaveRegionUe4(regionBoList); riskSourceMapper.batchSaveRegionUe4(regionBoList);
try { try {
String topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/situationMap"); String topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/situationMap");
webMqttComponent.publish(topic, JSON.toJSONString(queryRiskAreaRpn())); webMqttComponent.publish(topic, JSON.toJSONString(queryRiskSourceSecondLevel(orgCode)));
topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/riskDegreeHistogram"); topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/riskDegreeHistogram");
webMqttComponent.publish(topic, JSON.toJSONString(queryRPNReport())); webMqttComponent.publish(topic, JSON.toJSONString(queryRPNReport()));
topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/riskDegreePie"); topic = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/riskDegreePie");
......
...@@ -176,7 +176,7 @@ public interface IRiskSourceService { ...@@ -176,7 +176,7 @@ public interface IRiskSourceService {
* 批量保存区域信息 * 批量保存区域信息
* @param regionBoList 参数数组 * @param regionBoList 参数数组
*/ */
void batchSaveRegionUe4(List<BindRegionBo> regionBoList); void batchSaveRegionUe4(List<BindRegionBo> regionBoList,String orgCode);
void notifyRiskSource(String orgCode, Long fmeaId, Long riskSourceId, String notifyType, JpushMsgBo jpushMsgBo); void notifyRiskSource(String orgCode, Long fmeaId, Long riskSourceId, String notifyType, JpushMsgBo jpushMsgBo);
......
...@@ -52,24 +52,8 @@ emqx.client-id=${spring.application.name}-${random.int[1024,65536]} ...@@ -52,24 +52,8 @@ emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.85:1883 emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
# 只用于初始化
emqx.defaultTopic=mqtt_topic
Push.fegin.name=APPMESSAGEPUSHSERVICE-36
dutyMode.fegin.name=AMOSDUTYMODE
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load=true
rule.definition.model-package=com.yeejoin.amos.fas.business.action.model
rule.definition.default-agency=STATE_GRID
#Fegin service config
amos.feign.gennerator.use-gateway=true
autoSys.push.type=mqtt
#����� #�����
file.downLoad.url=http://39.98.246.31:8888/ file.downLoad.url=http://39.98.246.31:8888/
......
...@@ -45,7 +45,7 @@ spring.redis.timeout=1000 ...@@ -45,7 +45,7 @@ spring.redis.timeout=1000
file.uploadUrl=D:\\upload\\files\\ file.uploadUrl=D:\\upload\\files\\
#picture read #picture read
file.readUrl=http://station-fireautosys:8083/file/getFile?in= file.readUrl=http://station-fireautosys:8083/file/getFile?in=
params.isPush=true
## emqx ## emqx
emqx.clean-session=true emqx.clean-session=true
...@@ -54,16 +54,6 @@ emqx.broker=tcp://172.16.10.85:1883 ...@@ -54,16 +54,6 @@ emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
Push.fegin.name=AMOS-PUSH
dutyMode.fegin.name=AMOSDUTYMODE
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load=true
rule.definition.model-package=com.yeejoin.amos.fas.business.action.model
rule.definition.default-agency=STATE_GRID
amos.feign.gennerator.use-gateway=true
autoSys.push.type=mqtt
#\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD #\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
file.downLoad.url=http://172.16.10.175:8888/ file.downLoad.url=http://172.16.10.175:8888/
...@@ -45,7 +45,6 @@ spring.redis.timeout=1000 ...@@ -45,7 +45,6 @@ spring.redis.timeout=1000
file.uploadUrl=D:\\upload\\files\\ file.uploadUrl=D:\\upload\\files\\
#picture read #picture read
file.readUrl=http://172.16.3.89:8083/file/getFile?in= file.readUrl=http://172.16.3.89:8083/file/getFile?in=
params.isPush=true
## emqx ## emqx
emqx.clean-session=true emqx.clean-session=true
...@@ -54,16 +53,6 @@ emqx.broker=tcp://172.16.10.85:1883 ...@@ -54,16 +53,6 @@ emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
Push.fegin.name=PPMESSAGEPUSHSERVICE15
dutyMode.fegin.name=AMOSDUTYMODE
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load=true
rule.definition.model-package=com.yeejoin.amos.fas.business.action.model
rule.definition.default-agency=STATE_GRID
amos.feign.gennerator.use-gateway=true
autoSys.push.type=mqtt
#\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD #\uFFFD\u013C\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
file.downLoad.url=http://172.16.10.175:8888/ file.downLoad.url=http://172.16.10.175:8888/
spring.application.name = AMOS-AUTOSYS spring.application.name = AMOS-AUTOSYS-my
server.port = 8083 server.port = 8083
spring.profiles.active=dev spring.profiles.active=dev
...@@ -46,9 +46,16 @@ visual.fegin.name=maas-visual ...@@ -46,9 +46,16 @@ visual.fegin.name=maas-visual
dutyMode.fegin.name=AMOSDUTYMODE dutyMode.fegin.name=AMOSDUTYMODE
#队站装备管理名称,主要用于风险区域同步至仓库货位和订阅装备信息系统 #队站装备管理名称,主要用于风险区域同步至仓库货位和订阅装备信息系统
equipManage.fegin.name=AMOS-EQUIPMANAGE equipManage.fegin.name=AMOS-EQUIPMANAGE
#是否开启将风险区域同步至仓库货位true开启,false关闭。默认关闭。 #是否开启将风险区域同步至仓库货位true开启,false关闭。默认关闭。
equipManage.fegin.isSyn=false equipManage.fegin.isSyn=false
#jpush 服务名称
Push.fegin.name=APPMESSAGEPUSHSERVICE
#值班系统服务名
dutyMode.fegin.name=AMOSDUTYMODE
spring.http.multipart.maxFileSize = 10480000 spring.http.multipart.maxFileSize = 10480000
spring.http.multipart.MaxRequestSize = 50480000 spring.http.multipart.MaxRequestSize = 50480000
windows.img.path = F:\\ windows.img.path = F:\\
...@@ -59,6 +66,16 @@ param.safetyIndexChange.cron = 0 0 2 * * ? ...@@ -59,6 +66,16 @@ param.safetyIndexChange.cron = 0 0 2 * * ?
param.weather.url = http://wthrcdn.etouch.cn/weather_mini?citykey= param.weather.url = http://wthrcdn.etouch.cn/weather_mini?citykey=
#站端名称使用全拼 # 只用于初始化
station.name = yinan emqx.defaultTopic=mqtt_topic
## 规则配置(风险管控及预案)
rule.definition.load=true
rule.definition.model-package=com.yeejoin.amos.fas.business.action.model
rule.definition.default-agency=STATE_GRID
#Fegin service config
amos.feign.gennerator.use-gateway=true
# 消息推送类型
autoSys.push.type=mqtt
...@@ -601,30 +601,17 @@ ...@@ -601,30 +601,17 @@
WHERE rs.parent_id &gt; 0 WHERE rs.parent_id &gt; 0
order by rs.sort_num,rs.id order by rs.sort_num,rs.id
</select> </select>
<select id="queryByFactor" resultType="com.yeejoin.amos.fas.dao.entity.RiskSource">
SELECT
*
FROM
f_risk_source rs
WHERE
rs.id IN (
SELECT
ff.risk_source_id
FROM
f_fmea ff
JOIN f_risk_factor rf ON ff.risk_factors_id = rf.id
WHERE
rf.id = ${factorId}
)
</select>
<select id="queryRiskSourceSecondLevel" resultType="java.util.HashMap"> <select id="queryRiskSourceSecondLevel" resultType="java.util.HashMap">
SELECT SELECT
rs.id, rs.id,
rs.`code`, rs.name,
rs.`name`, rs.rpn,
rl.`level`, rs.rpni,
rs.rpn rs.risk_level_id as riskLevelId,
rl.`name` as riskLevelName,
rl.level,
rl.color
FROM FROM
`f_risk_source` rs `f_risk_source` rs
LEFT JOIN f_risk_level rl ON rl.id = rs.risk_level_id LEFT JOIN f_risk_level rl ON rl.id = rs.risk_level_id
...@@ -639,6 +626,24 @@ ...@@ -639,6 +626,24 @@
) )
ORDER BY sort_num,id ORDER BY sort_num,id
</select> </select>
<select id="queryByFactor" resultType="com.yeejoin.amos.fas.dao.entity.RiskSource">
SELECT
*
FROM
f_risk_source rs
WHERE
rs.id IN (
SELECT
ff.risk_source_id
FROM
f_fmea ff
JOIN f_risk_factor rf ON ff.risk_factors_id = rf.id
WHERE
rf.id = ${factorId}
)
</select>
<select id="queryContingencyWater" resultType="java.util.HashMap"> <select id="queryContingencyWater" resultType="java.util.HashMap">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment