Browse Source

视频监控可配置

develop
lau572 7 months ago
parent
commit
0519ec0b15
  1. 12
      zc-business/src/main/java/com/zc/business/controller/VideoController.java

12
zc-business/src/main/java/com/zc/business/controller/VideoController.java

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

Loading…
Cancel
Save