| | |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | | private PlatformBroadcastLogMapper platformBroadcastLogMapper; |
| | | @Autowired |
| | | private InterfaceLogMapper interfaceLogMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | String input = ""; |
| | | |
| | | model.setSendInfo(param.getSendInfo()); |
| | | return sendBroadcaseBobaoHttpBiz(model); |
| | | return sendBroadcaseBobaoHttpBiz(model,interfaceLogMapper); |
| | | } |
| | | public static String sendBroadcaseBobaoHttpBiz(Device model){ |
| | | public static String sendBroadcaseBobaoHttpBiz(Device model,InterfaceLogMapper interfaceLogMapper){ |
| | | //重新下发计划 |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("command","start"); |
| | |
| | | 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 |