|
@@ -1,6 +1,7 @@
|
|
|
package com.zd.laboratory.service.impl;
|
|
package com.zd.laboratory.service.impl;
|
|
|
|
|
|
|
|
import cn.hutool.core.date.StopWatch;
|
|
import cn.hutool.core.date.StopWatch;
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.zd.algorithm.api.speaker.entity.ParamVo;
|
|
import com.zd.algorithm.api.speaker.entity.ParamVo;
|
|
|
import com.zd.algorithm.api.speaker.entity.PlayVo;
|
|
import com.zd.algorithm.api.speaker.entity.PlayVo;
|
|
@@ -205,7 +206,7 @@ public class LabExitLineVertexServiceImpl implements ILabExitLineVertexService {
|
|
|
exitPointRelay.setBuildId(labExitLineEvacuationVo.getBuildId());
|
|
exitPointRelay.setBuildId(labExitLineEvacuationVo.getBuildId());
|
|
|
exitPointRelay.setFloorId(labExitLineEvacuationVo.getFloorId());
|
|
exitPointRelay.setFloorId(labExitLineEvacuationVo.getFloorId());
|
|
|
List <LabExitPointRelay> labExitPointRelays = labExitPointRelayMapper.selectLabExitPointRelayList(exitPointRelay);
|
|
List <LabExitPointRelay> labExitPointRelays = labExitPointRelayMapper.selectLabExitPointRelayList(exitPointRelay);
|
|
|
- //todo 开启继电器开关
|
|
|
|
|
|
|
+ //todo 关闭继电器开关
|
|
|
for(LabExitPointRelay relay : labExitPointRelays) {
|
|
for(LabExitPointRelay relay : labExitPointRelays) {
|
|
|
try {
|
|
try {
|
|
|
if (relay.getRelayType().intValue() == 1) {
|
|
if (relay.getRelayType().intValue() == 1) {
|
|
@@ -221,6 +222,8 @@ public class LabExitLineVertexServiceImpl implements ILabExitLineVertexService {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ //todo 关闭喇叭
|
|
|
|
|
+ closeHorn(labExitLineEvacuationVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//todo 计算坏点(目前只有发生预案的实验室需要标记为坏点),需要把非坏点关联坏点点位全部改成无限大
|
|
//todo 计算坏点(目前只有发生预案的实验室需要标记为坏点),需要把非坏点关联坏点点位全部改成无限大
|
|
@@ -379,11 +382,11 @@ public class LabExitLineVertexServiceImpl implements ILabExitLineVertexService {
|
|
|
log.info("查询喇叭总数:{}",count);
|
|
log.info("查询喇叭总数:{}",count);
|
|
|
R deviceList = remoteSpeakService.getDeviceList(1,count + 10,labExitLineEvacuationVo.getFloorId());
|
|
R deviceList = remoteSpeakService.getDeviceList(1,count + 10,labExitLineEvacuationVo.getFloorId());
|
|
|
if(deviceList.getCode()==200){
|
|
if(deviceList.getCode()==200){
|
|
|
|
|
+ List<PlayVo> playVoList = new ArrayList<>();
|
|
|
List<Map<String,Object>> mapList = (List <Map <String, Object>>) deviceList.getData();
|
|
List<Map<String,Object>> mapList = (List <Map <String, Object>>) deviceList.getData();
|
|
|
for(Map<String,Object> map:mapList){
|
|
for(Map<String,Object> map:mapList){
|
|
|
log.info("喇叭日志============================="+map);
|
|
log.info("喇叭日志============================="+map);
|
|
|
if(StringUtils.isNotNull(map.get("deviceSn")) && StringUtils.isNotNull(map.get("port"))){
|
|
if(StringUtils.isNotNull(map.get("deviceSn")) && StringUtils.isNotNull(map.get("port"))){
|
|
|
- List<PlayVo> playVoList = new ArrayList<>();
|
|
|
|
|
PlayVo playVo = new PlayVo();
|
|
PlayVo playVo = new PlayVo();
|
|
|
playVo.setSn(map.get("deviceSn")+"");
|
|
playVo.setSn(map.get("deviceSn")+"");
|
|
|
playVo.setDeviceIp(map.get("deviceIp")+"");
|
|
playVo.setDeviceIp(map.get("deviceIp")+"");
|
|
@@ -392,9 +395,9 @@ public class LabExitLineVertexServiceImpl implements ILabExitLineVertexService {
|
|
|
paramVo.setVol(Integer.parseInt(map.get("deviceVol").toString()));
|
|
paramVo.setVol(Integer.parseInt(map.get("deviceVol").toString()));
|
|
|
playVo.setParams(paramVo);
|
|
playVo.setParams(paramVo);
|
|
|
playVoList.add(playVo);
|
|
playVoList.add(playVo);
|
|
|
- remoteSpeakService.textParseUrlAppIps(audioSyntheses.get(0).getNewMusicUrl(),playVoList);
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ remoteSpeakService.textMoreParseUrlAppIps(audioSyntheses.get(0).getNewMusicUrl(),playVoList,100);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
@@ -403,6 +406,42 @@ public class LabExitLineVertexServiceImpl implements ILabExitLineVertexService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 关闭喇叭播放音乐
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param labExitLineEvacuationVo 楼栋和楼层的基础数据
|
|
|
|
|
+ */
|
|
|
|
|
+ public void closeHorn(LabExitLineEvacuationVo labExitLineEvacuationVo){
|
|
|
|
|
+ try{
|
|
|
|
|
+ //这里查询预案下的合成音乐
|
|
|
|
|
+ LabAudioSynthesis labAudioSynthesis = new LabAudioSynthesis();
|
|
|
|
|
+ labAudioSynthesis.setSceneType(2);
|
|
|
|
|
+ List<LabAudioSynthesis> audioSyntheses = labAudioSynthesisMapper.selectLabAudioSynthesisList(labAudioSynthesis);
|
|
|
|
|
+ if(audioSyntheses.size()>0){
|
|
|
|
|
+ //预案调用喇叭
|
|
|
|
|
+ Integer count = labSparseHardwareService.selectSpeakerCount();
|
|
|
|
|
+ log.info("查询喇叭总数:{}",count);
|
|
|
|
|
+ R deviceList = remoteSpeakService.getDeviceList(1,count + 10,labExitLineEvacuationVo.getFloorId());
|
|
|
|
|
+ if(deviceList.getCode()==200){
|
|
|
|
|
+ List<Map<String,Object>> mapList = (List <Map <String, Object>>) deviceList.getData();
|
|
|
|
|
+ for(Map<String,Object> map:mapList){
|
|
|
|
|
+ if (StringUtils.isNotNull(map.get("deviceSn")) && StringUtils.isNotNull(map.get("port"))) {
|
|
|
|
|
+ log.info("关闭喇叭-疏散调用喇叭播放音乐!url={},deviceSn={}", audioSyntheses.get(0).getNewMusicUrl(), map.get("deviceSn"));
|
|
|
|
|
+ R r = remoteSpeakService.stopPlayMusic(map.get("deviceSn") + "", audioSyntheses.get(0).getNewMusicUrl());
|
|
|
|
|
+ log.info("关闭喇叭-疏散调用喇叭播放音乐返回信息:{}", JSON.toJSONString(r));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ log.info("关闭喇叭deviceSn/port为空!");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }catch (Exception e){
|
|
|
|
|
+ log.error("疏散关闭喇叭失败!!!!!:"+e);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 关联过滤线路
|
|
* 关联过滤线路
|
|
|
*
|
|
*
|