| | |
| | | jsonBody.put("pageSize", pageSize); |
| | | jsonBody.put("treeCode", treeCode); |
| | | String body = jsonBody.toString(); |
| | | System.out.println("海康视频开始请求:"); |
| | | // System.out.println("海康视频开始请求:"); |
| | | //参数根据接口实际情况设置 |
| | | HttpResponse result = ArtemisHttpUtil.doPostStringImgArtemis(config, path, body, null, null, "application/json", head); |
| | | try { |
| | | String strResult = EntityUtils.toString(result.getEntity()); |
| | | HttpResponseResult responseResult = com.alibaba.fastjson.JSONObject.parseObject(strResult, HttpResponseResult.class); |
| | | System.out.println("海康视频结果:" + responseResult.toString()); |
| | | // System.out.println("海康视频结果:" + responseResult.toString()); |
| | | if ("0".equals(responseResult.getCode())) { |
| | | com.alibaba.fastjson.JSONObject jsonObject = responseResult.getData(); |
| | | String strList = jsonObject.getString("list"); |
| | |
| | | jsonBody.put("expand","transcode=1&videotype=h264"); |
| | | String body = jsonBody.toString(); |
| | | //参数根据接口实际情况设置 |
| | | HttpResponse result = ArtemisHttpUtil.doPostStringImgArtemis(config, path, body, query, null, "application/json", head); |
| | | System.out.println("海康完成请求"); |
| | | HttpResponse result = ArtemisHttpUtil.doPostStringImgArtemis(config, path, body, null, null, "application/json", null); |
| | | // System.out.println("海康完成请求"); |
| | | try { |
| | | String strResult = EntityUtils.toString(result.getEntity()); |
| | | System.out.println("海康返回结果:" + strResult); |
| | | // System.out.println("海康返回结果:" + strResult); |
| | | HttpResponseResult responseResult = com.alibaba.fastjson.JSONObject.parseObject(strResult, HttpResponseResult.class); |
| | | if ("0".equals(responseResult.getCode())) { |
| | | com.alibaba.fastjson.JSONObject jsonObject = responseResult.getData(); |
| | |
| | | String body = jsonBody.toString(); |
| | | //参数根据接口实际情况设置 |
| | | HttpResponse result = ArtemisHttpUtil.doPostStringImgArtemis(config, path, body, query, null, "application/json", head); |
| | | System.out.println("海康完成请求-getKHPresets"); |
| | | // System.out.println("海康完成请求-getKHPresets"); |
| | | try { |
| | | String strResult = EntityUtils.toString(result.getEntity()); |
| | | System.out.println("海康返回结果-getKHPresets:" + strResult); |
| | | // System.out.println("海康返回结果-getKHPresets:" + strResult); |
| | | HttpResponseResult responseResult = com.alibaba.fastjson.JSONObject.parseObject(strResult, HttpResponseResult.class); |
| | | if ("0".equals(responseResult.getCode())) { |
| | | com.alibaba.fastjson.JSONObject jsonObject = responseResult.getData(); |