| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | |
| | | import com.doumee.core.haikang.model.param.request.CustomBroadcastRequest; |
| | | import com.doumee.core.haikang.model.param.request.TransparentChannelSingleRequest; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.third.model.LoginUserInfo; |
| | |
| | | } |
| | | } |
| | | @Override |
| | | public String setBroadcaseBobaoHttp(Device param){ |
| | | Device model = deviceMapper.selectById(param.getId()); |
| | | if(model ==null && Constants.equalsInteger(param.getType(),Constants.FOUR)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | String input = ""; |
| | | |
| | | //重新下发计划 |
| | | JSONObject jsonObject = new JSONObject(); |
| | | |
| | | /* { |
| | | "command": "start", |
| | | "TTSContent": "冀G70122,毛重48.68吨,称重结束,请下磅", |
| | | "audioLevel": 6, |
| | | "audioOutID": [ |
| | | 1 |
| | | ], |
| | | "audioVolume": 100, |
| | | "voiceType": "female", |
| | | "TTSLanguageType": "chinese" |
| | | }*/ |
| | | jsonObject.put("command","start"); |
| | | jsonObject.put("TTSContent",param.getSendInfo()); |
| | | jsonObject.put("audioLevel",6); |
| | | jsonObject.put("audioVolume",100); |
| | | jsonObject.put("TTSLanguageType","chinese"); |
| | | jsonObject.put("voiceType","female"); |
| | | jsonObject.put("pace",50); |
| | | JSONArray a = new JSONArray(); |
| | | a.add(1); |
| | | jsonObject.put("audioOutID",a); |
| | | String params =jsonObject.toJSONString(); |
| | | log.error("========海康广播播放入参内容 : " + params); |
| | | String result = HttpsUtil.doPutHk(model.getIp(),Integer.parseInt(StringUtils.defaultString(model.getPort(),"80")),model.getDoorId(), model.getDoorName() |
| | | ,"/ISAPI/AccessControl/EventCardLinkageCfg/TTSAudio?format=json",params); |
| | | |
| | | log.error("========海康广播播放返回内容 : " + result); |
| | | return result; |
| | | } |
| | | @Override |
| | | public void setLedContent(TransparentChannelSingleRequest model) { |
| | | Device device = findById(model.getDeviceId()); |
| | | if(device == null |
| | |
| | | }catch (Exception e){ |
| | | log.error( "对不起,屏幕内容设置异常"+ device.getName()); |
| | | } |
| | | |
| | | } |
| | | log.error( "屏幕内容设置=======================结束========" ); |
| | | } |