| | |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | | private PlatformBroadcastLogMapper platformBroadcastLogMapper; |
| | | @Autowired |
| | | private InterfaceLogMapper interfaceLogMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public List<Device> findList(Device device) { |
| | | device.setIsdeleted(Constants.ZERO); |
| | | QueryWrapper<Device> wrapper = new QueryWrapper<>(device); |
| | | return deviceMapper.selectList(wrapper); |
| | | } |
| | |
| | | } |
| | | String input = ""; |
| | | |
| | | model.setSendInfo(param.getSendInfo()); |
| | | return sendBroadcaseBobaoHttpBiz(model,interfaceLogMapper); |
| | | } |
| | | public static String sendBroadcaseBobaoHttpBiz(Device model,InterfaceLogMapper interfaceLogMapper){ |
| | | //重新下发计划 |
| | | 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("TTSContent",model.getSendInfo()); |
| | | jsonObject.put("audioLevel",6); |
| | | jsonObject.put("audioVolume",100); |
| | | jsonObject.put("TTSLanguageType","chinese"); |
| | |
| | | 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); |
| | | |
| | | JSONObject resultJson = JSONObject.parseObject(result); |
| | | Boolean success = false; |
| | | if(Constants.equalsInteger(resultJson.getInteger("statusCode"),Constants.ONE)){ |
| | | success = true; |
| | | } |
| | | InterfaceLog log = new InterfaceLog(); |
| | | log.setCreateDate(new Date()); |
| | | log.setUrl("/ISAPI/AccessControl/EventCardLinkageCfg/TTSAudio?format=json"); |
| | | log.setEditDate(log.getCreateDate()); |
| | | log.setPlat(Constants.ZERO); |
| | | log.setName("海康广播播放"); |
| | | log.setIsdeleted(Constants.ZERO); |
| | | log.setRequest(params); |
| | | log.setType(Constants.ZERO); |
| | | log.setSuccess(success?Constants.ZERO:Constants.ONE); |
| | | log.setRepose(result); |
| | | interfaceLogMapper.insert(log); |
| | | |
| | | |
| | | return result; |
| | | } |
| | | @Override |