|
@@ -2,6 +2,7 @@ package com.zd.laboratory.service.impl;
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
import cn.hutool.json.JSONObject;
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -1133,15 +1134,19 @@ public class LabRiskPlanServiceImpl extends ServiceImpl<LabRiskPlanMapper, LabRi
|
|
|
//这里查询预案下的合成音乐
|
|
//这里查询预案下的合成音乐
|
|
|
LabAudioSynthesis labAudioSynthesis = new LabAudioSynthesis();
|
|
LabAudioSynthesis labAudioSynthesis = new LabAudioSynthesis();
|
|
|
labAudioSynthesis.setRiskPlanId(labRiskPlanLevel.getRiskPlanId());
|
|
labAudioSynthesis.setRiskPlanId(labRiskPlanLevel.getRiskPlanId());
|
|
|
|
|
+ log.error("预案id={}",labRiskPlanLevel.getRiskPlanId());
|
|
|
List<LabAudioSynthesis> audioSyntheses = labAudioSynthesisMapper.selectLabAudioSynthesisList(labAudioSynthesis);
|
|
List<LabAudioSynthesis> audioSyntheses = labAudioSynthesisMapper.selectLabAudioSynthesisList(labAudioSynthesis);
|
|
|
|
|
+ log.error("查询的音乐列表=audioSyntheses.size= {}",audioSyntheses.size());
|
|
|
|
|
+ log.error("查询的音乐列表=audioSyntheses.toString= {}",audioSyntheses.toString());
|
|
|
if (audioSyntheses.size() > 0) {
|
|
if (audioSyntheses.size() > 0) {
|
|
|
//预案调用喇叭
|
|
//预案调用喇叭
|
|
|
- R deviceList = remoteSpeakService.getDeviceList(1, 10, labRiskPlanLevel.getFloorId(), subFunction.getSubId());
|
|
|
|
|
- log.info("调用喇叭查询内容: deviceList={}",deviceList.toString());
|
|
|
|
|
|
|
+ log.error("调用喇叭");
|
|
|
|
|
+ R deviceList = remoteSpeakService.getDeviceList(1, 100, labRiskPlanLevel.getFloorId(), subFunction.getSubId());
|
|
|
|
|
+ log.error("调用喇叭查询内容: deviceList={}", JSON.toJSONString(deviceList));
|
|
|
if (deviceList.getCode() == 200) {
|
|
if (deviceList.getCode() == 200) {
|
|
|
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.error("喇叭日志=============================" + 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<>();
|
|
List<PlayVo> playVoList = new ArrayList<>();
|
|
|
PlayVo playVo = new PlayVo();
|
|
PlayVo playVo = new PlayVo();
|
|
@@ -1152,13 +1157,16 @@ public class LabRiskPlanServiceImpl extends ServiceImpl<LabRiskPlanMapper, LabRi
|
|
|
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);
|
|
|
|
|
|
|
+ log.error("url={}",audioSyntheses.get(0).getNewMusicUrl());
|
|
|
|
|
+ log.error("playVoList={}",playVoList.toString());
|
|
|
|
|
+ R r = remoteSpeakService.textParseUrlAppIps(audioSyntheses.get(0).getNewMusicUrl(), playVoList);
|
|
|
|
|
+ log.error("调用喇叭返回信息:{}",JSON.toJSONString(r));
|
|
|
}else {
|
|
}else {
|
|
|
- log.info("喇叭deviceSn/port为空!");
|
|
|
|
|
|
|
+ log.error("喇叭deviceSn/port为空!");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}else {
|
|
}else {
|
|
|
- log.info("远程查询喇叭信息错误!");
|
|
|
|
|
|
|
+ log.error("远程查询喇叭信息错误!");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -1215,7 +1223,7 @@ public class LabRiskPlanServiceImpl extends ServiceImpl<LabRiskPlanMapper, LabRi
|
|
|
labAudioSynthesis.setRiskPlanId(groupVo.getRiskPlanId());
|
|
labAudioSynthesis.setRiskPlanId(groupVo.getRiskPlanId());
|
|
|
List<LabAudioSynthesis> audioSyntheses = labAudioSynthesisMapper.selectLabAudioSynthesisList(labAudioSynthesis);
|
|
List<LabAudioSynthesis> audioSyntheses = labAudioSynthesisMapper.selectLabAudioSynthesisList(labAudioSynthesis);
|
|
|
if (audioSyntheses.size() > 0) {
|
|
if (audioSyntheses.size() > 0) {
|
|
|
- R deviceList = remoteSpeakService.getDeviceList(1, 10, groupVo.getFloorId(), subFunction.getSubId());
|
|
|
|
|
|
|
+ R deviceList = remoteSpeakService.getDeviceList(1, 100, groupVo.getFloorId(), subFunction.getSubId());
|
|
|
if (deviceList.getCode() == 200) {
|
|
if (deviceList.getCode() == 200) {
|
|
|
List<Map<String, Object>> mapList = (List<Map<String, Object>>) deviceList.getData();
|
|
List<Map<String, Object>> mapList = (List<Map<String, Object>>) deviceList.getData();
|
|
|
List<PlayVo> playVoList = new ArrayList<>();
|
|
List<PlayVo> playVoList = new ArrayList<>();
|
|
@@ -1334,7 +1342,7 @@ public class LabRiskPlanServiceImpl extends ServiceImpl<LabRiskPlanMapper, LabRi
|
|
|
labAudioSynthesis.setRiskPlanId(groupVo.getRiskPlanId());
|
|
labAudioSynthesis.setRiskPlanId(groupVo.getRiskPlanId());
|
|
|
List<LabAudioSynthesis> audioSyntheses = labAudioSynthesisMapper.selectLabAudioSynthesisList(labAudioSynthesis);
|
|
List<LabAudioSynthesis> audioSyntheses = labAudioSynthesisMapper.selectLabAudioSynthesisList(labAudioSynthesis);
|
|
|
if (audioSyntheses.size() > 0) {
|
|
if (audioSyntheses.size() > 0) {
|
|
|
- R deviceList = remoteSpeakService.getDeviceList(1, 10, groupVo.getFloorId(), subFunction.getSubId());
|
|
|
|
|
|
|
+ R deviceList = remoteSpeakService.getDeviceList(1, 100, groupVo.getFloorId(), subFunction.getSubId());
|
|
|
if (deviceList.getCode() == 200) {
|
|
if (deviceList.getCode() == 200) {
|
|
|
List<Map<String, Object>> mapList = (List<Map<String, Object>>) deviceList.getData();
|
|
List<Map<String, Object>> mapList = (List<Map<String, Object>>) deviceList.getData();
|
|
|
List<PlayVo> playVoList = new ArrayList<>();
|
|
List<PlayVo> playVoList = new ArrayList<>();
|