| | |
| | | OutService outService; |
| | | @Autowired |
| | | private ConfigInfo configInfo; |
| | | |
| | | |
| | | @RequestMapping(value = { "/getCameraEntity" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取摄像头实体列表") |
| | | @ResponseBody |
| | |
| | | final JSONObject jsonObjectResult = JSONObject.parseObject(body); |
| | | return jsonObjectResult.get((Object)"data"); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getCloudplatformInfo" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取摄像头云台操作信息") |
| | | @ResponseBody |
| | |
| | | final ResponseEntity<String> responseEntity = (ResponseEntity<String>)restTemplate.postForEntity(this.configInfo.getDevice_ip()+ "/restapi/iot/iotinfomgr/service/invoke/cameras/ptzControl?apikey=" + this.configInfo.getApikey(), (Object)httpEntity, (Class)String.class, new Object[0]); |
| | | return responseEntity.getBody(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getPreviewUrls" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取摄像头获取预览流url") |
| | | @ResponseBody |
| | |
| | | |
| | | return json; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getDoorAccessEntity" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取门禁实体列表") |
| | | @ResponseBody |
| | |
| | | final JSONObject jsonObjectResult = JSONObject.parseObject(body); |
| | | return jsonObjectResult.get((Object)"data"); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getPlaybackURLs" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("摄像头获取回放流url") |
| | | @ResponseBody |
| | |
| | | final JSON json = (JSON)JSON.parse((String)responseEntity.getBody()); |
| | | return json; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getHistoryDoorAccess" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取历史门禁信息") |
| | | @ResponseBody |
| | |
| | | final JSON json = (JSON)JSON.parse((String)responseEntity.getBody()); |
| | | return json; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getEquipmentInfo" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("设备信息获取") |
| | | @ResponseBody |
| | |
| | | final JSON json = (JSON)JSON.parse((String)responseEntity.getBody()); |
| | | return json; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getReconditionInfo" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取设备的检修历史") |
| | | @ResponseBody |
| | |
| | | final JSON json = (JSON)JSON.parse((String)responseEntity.getBody()); |
| | | return json; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getDeviceKKSInfo" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取设备的KKS信息") |
| | | @ResponseBody |
| | |
| | | map.put("list", deviceList); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getDuty" }, method = { RequestMethod.POST }) |
| | | @ApiOperation("获取当值值长") |
| | | @ResponseBody |
| | |
| | | final Map<String, Object> map = new HashMap<String, Object>(); |
| | | final String dzzzresponse = (String)template.getForObject(this.configInfo.getDzzzUrl(), (Class)String.class, new Object[0]); |
| | | final JSONObject json = JSONObject.parseObject(dzzzresponse); |
| | | System.out.println(json.getJSONObject("data").getString("id")); |
| | | //System.out.println(json.getJSONObject("data").getString("id")); |
| | | DeviceController.log.warn(dzzzresponse.toString()); |
| | | return dzzzresponse; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = { "/getOutPeople" }, method = { RequestMethod.GET }) |
| | | @ApiOperation("获取外包人员") |
| | | @ResponseBody |
| | |
| | | DeviceController.log.warn(list.toString()); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | static { |
| | | DeviceController.log = LoggerFactory.getLogger((Class)DeviceController.class); |
| | | } |