doum
13 小时以前 af2a56b525dd3b015b34446a2af3e3af3467cd75
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceServiceImpl.java
@@ -1,5 +1,6 @@
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;
@@ -10,6 +11,7 @@
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;
@@ -268,6 +270,46 @@
        }
    }
    @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
@@ -323,7 +365,6 @@
            }catch (Exception e){
                log.error( "对不起,屏幕内容设置异常"+ device.getName());
            }
        }
        log.error( "屏幕内容设置=======================结束========" );
    }