| | |
| | | HkConstant.previewURLs, |
| | | hk.getCameraIndexCode(), |
| | | ProtocolConstant.WS, |
| | | expand); |
| | | null==hk.getTransmode()?1:hk.getTransmode(), |
| | | expand, |
| | | null==hk.getStreamType()?1:hk.getStreamType()); |
| | | if (null!=result) { |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | Map map = (Map) jsonObject.get("data"); |
| | |
| | | HkConstant.previewURLs, |
| | | hk.getCameraIndexCode(), |
| | | hk.getProtocol(), |
| | | expand); |
| | | null==hk.getTransmode()?1:hk.getTransmode(), |
| | | expand, |
| | | null==hk.getStreamType()?1:hk.getStreamType()); |
| | | if (null!=result) { |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | Map map = (Map) jsonObject.get("data"); |
| | |
| | | HkConstant.previewURLs, |
| | | hk.getCameraIndexCode(), |
| | | ProtocolConstant.HLS, |
| | | expand); |
| | | null==hk.getTransmode()?1:hk.getTransmode(), |
| | | expand, |
| | | null==hk.getStreamType()?1:hk.getStreamType()); |
| | | if (null!=result) { |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | Map map = (Map) jsonObject.get("data"); |
| | |
| | | jsonBody.put("cameraIndexCode", hk.getCameraIndexCode()); |
| | | jsonBody.put("protocol", hk.getProtocol()); |
| | | jsonBody.put("recordLocation", "1"); |
| | | jsonBody.put("transmode", null==hk.getTransmode()?1:hk.getTransmode()); |
| | | jsonBody.put("beginTime", hk.getBeginTime()); |
| | | jsonBody.put("endTime", hk.getEndTime()); |
| | | String body = jsonBody.toJSONString(); |
| | |
| | | */ |
| | | JSONObject jsonBody = new JSONObject(); |
| | | jsonBody.put("cameraIndexCode", hk.getCameraIndexCode()); |
| | | jsonBody.put("streamType",null==hk.getStreamType()?1:hk.getStreamType()); |
| | | jsonBody.put("protocol", hk.getProtocol()); |
| | | jsonBody.put("transmode", null==hk.getTransmode()?1:hk.getTransmode()); |
| | | String body = jsonBody.toJSONString(); |
| | | |
| | | /** |
| | |
| | | public R syncVideo(@RequestBody HkVO hk) { |
| | | // 通过水库编号获取区域(区县)名称 |
| | | AttResAdVO info = attResBaseService.getWaterRegionInfoByResGuid(hk.getRegionIndexCode()); |
| | | // 判断该水库同一个区县下是否存在同水库名称的,如果是存在多个,水库名称前面拼上乡镇名称 |
| | | String resName = setWaterName(hk,info); |
| | | // 设置区域名称 |
| | | hk.setRegionName(info.getCountyName()); |
| | | // 判断 |
| | | // 通过区域名称查询对应的区域编号 |
| | | String rootRegionId = hkService.regionNodesByParams(hk); |
| | | if (null!= rootRegionId && !rootRegionId.equals("")){ |
| | |
| | | */ |
| | | List<VideoVO> list = new ArrayList<>(); |
| | | VideoVO video = new VideoVO(); |
| | | video.setRegionName(hk.getRegionName()); |
| | | video.setRegionName(resName); |
| | | video.setRegionIndexCode(hk.getRegionIndexCode()); |
| | | video.setParentIndexCode(rootRegionId); |
| | | video.setRegionType(10); |
| | |
| | | return R.data(200,jsonObject,null); |
| | | }else { |
| | | // 当前水库行政区域不匹配 |
| | | return R.data(400,null,"当前水库行政区域不匹配"); |
| | | return R.data(400,"当前水库行政区域不匹配","当前水库行政区域不匹配"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 设置水库名称( 判断该水库同一个区县下是否存在同水库名称的,如果是存在多个,水库名称前面拼上乡镇名称) |
| | | * @param hk |
| | | * @param info |
| | | * @return |
| | | */ |
| | | private String setWaterName(HkVO hk, AttResAdVO info) { |
| | | // 根据水库名称、所在区域查询改水库的数量 |
| | | Integer number = attResBaseService.getWaterCountByResNameAndCountyName(hk.getRegionName(),info.getCountyCode()); |
| | | if (number>1){ |
| | | return hk.getRegionName() + "(" + info.getTownName() + ")"; |
| | | }else { |
| | | return hk.getRegionName(); |
| | | } |
| | | } |
| | | |