|
|
@ -82,7 +82,7 @@ public class VideoController extends BaseController { |
|
|
|
private ISysConfigService configService; |
|
|
|
|
|
|
|
// 组织机构id
|
|
|
|
private final static String CAM_DEPT_ID = "1301730"; |
|
|
|
// private final static String CAM_DEPT_ID = "1301730";
|
|
|
|
|
|
|
|
/** |
|
|
|
* 同步物联网ID。 |
|
|
@ -116,7 +116,7 @@ public class VideoController extends BaseController { |
|
|
|
|
|
|
|
try { |
|
|
|
// 获取部门下的摄像头详细信息
|
|
|
|
JSONObject camApiResponse = getCamByDept(CAM_DEPT_ID); |
|
|
|
JSONObject camApiResponse = getCamByDept(); |
|
|
|
|
|
|
|
if (camApiResponse == null || !camApiResponse.containsKey("data")) { |
|
|
|
return AjaxResult.error("根据组织机构获取摄像机信息失败"); // 如果获取信息失败或不含有效数据,直接返回
|
|
|
@ -394,7 +394,7 @@ public class VideoController extends BaseController { |
|
|
|
public Object nearCamListPileNum(@ApiParam(value = "桩号", name = "pileNum", required = true) String pileNum) throws HttpException, IOException { |
|
|
|
|
|
|
|
// 获取济菏运管中心相机信息
|
|
|
|
JSONObject camInfo = getCamByDept(CAM_DEPT_ID); |
|
|
|
JSONObject camInfo = getCamByDept(); |
|
|
|
|
|
|
|
if (!camInfo.containsKey("data")) { |
|
|
|
return camInfo; |
|
|
@ -612,10 +612,10 @@ public class VideoController extends BaseController { |
|
|
|
/** |
|
|
|
* 根据组织机构获取摄像机信息 |
|
|
|
* |
|
|
|
* @param deptId 机构id |
|
|
|
* @param |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public JSONObject getCamByDept(String deptId) throws HttpException, IOException { |
|
|
|
public JSONObject getCamByDept() throws HttpException, IOException { |
|
|
|
JSONObject cameraInfo = JSONObject.parseObject(configService.selectConfigByKey("dc.cameraInfo")); |
|
|
|
|
|
|
|
JSONObject jsonResult = null; |
|
|
@ -623,7 +623,7 @@ public class VideoController extends BaseController { |
|
|
|
OkHttp okHttp = new OkHttp(); |
|
|
|
|
|
|
|
RequestParams requestParams = new RequestParams(); |
|
|
|
requestParams.put("deptId", deptId); |
|
|
|
requestParams.put("deptId", cameraInfo.getString("CAM_DEPT_ID")); |
|
|
|
|
|
|
|
Map<String, String> header = new HashMap<>(); |
|
|
|
|
|
|
|