zhongrj
2024-01-25 59ec12f2acd04a88b2668a6fb48a2268e07f775c
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/hk/controller/HkController.java
@@ -72,7 +72,8 @@
         HkConstant.previewURLs,
         hk.getCameraIndexCode(),
         ProtocolConstant.WS,
         expand);
         expand,
         null==hk.getStreamType()?1:hk.getStreamType());
      if (null!=result) {
         JSONObject jsonObject = JSONObject.parseObject(result);
         Map map = (Map) jsonObject.get("data");
@@ -100,7 +101,8 @@
         HkConstant.previewURLs,
         hk.getCameraIndexCode(),
         hk.getProtocol(),
         expand);
         expand,
         null==hk.getStreamType()?1:hk.getStreamType());
      if (null!=result) {
         JSONObject jsonObject = JSONObject.parseObject(result);
         Map map = (Map) jsonObject.get("data");
@@ -128,7 +130,8 @@
         HkConstant.previewURLs,
         hk.getCameraIndexCode(),
         ProtocolConstant.HLS,
         expand);
         expand,
         null==hk.getStreamType()?1:hk.getStreamType());
      if (null!=result) {
         JSONObject jsonObject = JSONObject.parseObject(result);
         Map map = (Map) jsonObject.get("data");
@@ -261,6 +264,7 @@
       */
      JSONObject jsonBody = new JSONObject();
      jsonBody.put("cameraIndexCode", hk.getCameraIndexCode());
      jsonBody.put("streamType",null==hk.getStreamType()?1:hk.getStreamType());
      jsonBody.put("protocol", hk.getProtocol());
      String body = jsonBody.toJSONString();
@@ -329,6 +333,7 @@
   public R syncVideo(@RequestBody HkVO hk) {
      // 通过水库编号获取区域(区县)名称
      AttResAdVO info = attResBaseService.getWaterRegionInfoByResGuid(hk.getRegionIndexCode());
      String resName = hk.getRegionName();
      hk.setRegionName(info.getCountyName());
      // 通过区域名称查询对应的区域编号
      String rootRegionId = hkService.regionNodesByParams(hk);
@@ -339,7 +344,7 @@
          */
         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);
@@ -355,7 +360,7 @@
         return R.data(200,jsonObject,null);
      }else {
         // 当前水库行政区域不匹配
         return R.data(400,null,"当前水库行政区域不匹配");
         return R.data(400,"当前水库行政区域不匹配","当前水库行政区域不匹配");
      }
   }