|
@@ -33,8 +33,8 @@ public class CameraController {
|
|
@ApiOperation("相机设备分页信息")
|
|
@ApiOperation("相机设备分页信息")
|
|
@PostMapping("/list")
|
|
@PostMapping("/list")
|
|
public AjaxResult list(@Validated PageValidate pageValidate,
|
|
public AjaxResult list(@Validated PageValidate pageValidate,
|
|
- @Validated Camera camera) {
|
|
|
|
- PageHelper.startPage(pageValidate.getPageNo(),pageValidate.getPageSize());
|
|
|
|
|
|
+ @Validated Camera camera) {
|
|
|
|
+ PageHelper.startPage(pageValidate.getPageNo(), pageValidate.getPageSize());
|
|
return AjaxResult.success(cameraService.list());
|
|
return AjaxResult.success(cameraService.list());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -51,7 +51,7 @@ public class CameraController {
|
|
//@Log(title = "文章分类新增")
|
|
//@Log(title = "文章分类新增")
|
|
@ApiOperation("相机信息新增")
|
|
@ApiOperation("相机信息新增")
|
|
@PostMapping("/add")
|
|
@PostMapping("/add")
|
|
- public AjaxResult add(@Validated @RequestBody Camera camera) {
|
|
|
|
|
|
+ public AjaxResult add(@Validated @RequestBody Camera camera) {
|
|
cameraService.add(camera);
|
|
cameraService.add(camera);
|
|
return AjaxResult.success();
|
|
return AjaxResult.success();
|
|
}
|
|
}
|
|
@@ -70,6 +70,24 @@ public class CameraController {
|
|
return AjaxResult.success();
|
|
return AjaxResult.success();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation("已启用相机信息查询")
|
|
|
|
+ @PostMapping("/enabledCameraMsg")
|
|
|
|
+ public AjaxResult enabledCameraMsg() {
|
|
|
|
+ return cameraService.enabledCameraMsg();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("相机全局参数配置")
|
|
|
|
+ @PostMapping("/cameraConfig")
|
|
|
|
+ public AjaxResult cameraConfig(@RequestBody Long duration) {
|
|
|
|
+ return cameraService.cameraConfig(duration.toString());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("相机状态切换")
|
|
|
|
+ @PostMapping("/statusChange")
|
|
|
|
+ public AjaxResult statusChange(@RequestBody Long id) {
|
|
|
|
+ return cameraService.statusChange(id);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
@ApiOperation("获取设备通道信息")
|
|
@ApiOperation("获取设备通道信息")
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|
|
@@ -109,6 +127,7 @@ public class CameraController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 回放推流
|
|
* 回放推流
|
|
|
|
+ *
|
|
* @param id 相机id
|
|
* @param id 相机id
|
|
* @return ResultDTO
|
|
* @return ResultDTO
|
|
*/
|
|
*/
|
|
@@ -132,6 +151,7 @@ public class CameraController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 抓图
|
|
* 抓图
|
|
|
|
+ *
|
|
* @return ResultDTO
|
|
* @return ResultDTO
|
|
*/
|
|
*/
|
|
@ApiOperation("抓图")
|
|
@ApiOperation("抓图")
|
|
@@ -139,7 +159,7 @@ public class CameraController {
|
|
@ApiImplicitParam(name = "id", value = "设备id", paramType = "query", dataType = "Long"),
|
|
@ApiImplicitParam(name = "id", value = "设备id", paramType = "query", dataType = "Long"),
|
|
})
|
|
})
|
|
@PostMapping("/catchPic")
|
|
@PostMapping("/catchPic")
|
|
- public AjaxResult catchPic(Long id){
|
|
|
|
|
|
+ public AjaxResult catchPic(Long id) {
|
|
CameraDTO cameraDTO = new CameraDTO();
|
|
CameraDTO cameraDTO = new CameraDTO();
|
|
cameraDTO.setId(id);
|
|
cameraDTO.setId(id);
|
|
ResultDTO result = cameraService.catchPic(cameraDTO);
|
|
ResultDTO result = cameraService.catchPic(cameraDTO);
|
|
@@ -148,6 +168,7 @@ public class CameraController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 视频下载
|
|
* 视频下载
|
|
|
|
+ *
|
|
* @return ResultDTO
|
|
* @return ResultDTO
|
|
*/
|
|
*/
|
|
@ApiOperation("视频下载")
|
|
@ApiOperation("视频下载")
|
|
@@ -169,6 +190,7 @@ public class CameraController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取录像文件信息
|
|
* 获取录像文件信息
|
|
|
|
+ *
|
|
* @return ResultDTO
|
|
* @return ResultDTO
|
|
*/
|
|
*/
|
|
@ApiOperation("获取录像文件信息")
|
|
@ApiOperation("获取录像文件信息")
|
|
@@ -190,6 +212,7 @@ public class CameraController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 关闭ffmpeg进程
|
|
* 关闭ffmpeg进程
|
|
|
|
+ *
|
|
* @param id 相机id
|
|
* @param id 相机id
|
|
* @return Boolean
|
|
* @return Boolean
|
|
*/
|
|
*/
|
|
@@ -198,13 +221,14 @@ public class CameraController {
|
|
@ApiImplicitParam(name = "id", value = "FlowId", paramType = "query", dataType = "Long")
|
|
@ApiImplicitParam(name = "id", value = "FlowId", paramType = "query", dataType = "Long")
|
|
})
|
|
})
|
|
@PostMapping("/stopRtmp")
|
|
@PostMapping("/stopRtmp")
|
|
- public AjaxResult stopRtmp(Long id){
|
|
|
|
|
|
+ public AjaxResult stopRtmp(Long id) {
|
|
Boolean result = cameraService.stopRtmp(id);
|
|
Boolean result = cameraService.stopRtmp(id);
|
|
return AjaxResult.success(result);
|
|
return AjaxResult.success(result);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 关闭ffmpeg进程
|
|
* 关闭ffmpeg进程
|
|
|
|
+ *
|
|
* @param taskName 相机id
|
|
* @param taskName 相机id
|
|
* @return Boolean
|
|
* @return Boolean
|
|
*/
|
|
*/
|
|
@@ -213,13 +237,14 @@ public class CameraController {
|
|
@ApiImplicitParam(name = "taskName", value = "taskName", paramType = "query", dataType = "String")
|
|
@ApiImplicitParam(name = "taskName", value = "taskName", paramType = "query", dataType = "String")
|
|
})
|
|
})
|
|
@PostMapping("/stopRtmpByTaskName")
|
|
@PostMapping("/stopRtmpByTaskName")
|
|
- public AjaxResult stopRtmpByTaskName(String taskName){
|
|
|
|
|
|
+ public AjaxResult stopRtmpByTaskName(String taskName) {
|
|
Boolean result = cameraService.stopRtmpByTaskName(taskName);
|
|
Boolean result = cameraService.stopRtmpByTaskName(taskName);
|
|
return AjaxResult.success(result);
|
|
return AjaxResult.success(result);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 关闭ffmpeg进程
|
|
* 关闭ffmpeg进程
|
|
|
|
+ *
|
|
* @param ip 摄像机IP
|
|
* @param ip 摄像机IP
|
|
* @return Boolean
|
|
* @return Boolean
|
|
*/
|
|
*/
|
|
@@ -228,7 +253,7 @@ public class CameraController {
|
|
@ApiImplicitParam(name = "ip", value = "ip", paramType = "query", dataType = "String")
|
|
@ApiImplicitParam(name = "ip", value = "ip", paramType = "query", dataType = "String")
|
|
})
|
|
})
|
|
@PostMapping("/stopRtmpByIP")
|
|
@PostMapping("/stopRtmpByIP")
|
|
- public AjaxResult stopRtmpByIP(String ip){
|
|
|
|
|
|
+ public AjaxResult stopRtmpByIP(String ip) {
|
|
Boolean result = cameraService.stopRtmpByIP(ip);
|
|
Boolean result = cameraService.stopRtmpByIP(ip);
|
|
return AjaxResult.success(result);
|
|
return AjaxResult.success(result);
|
|
}
|
|
}
|
|
@@ -236,6 +261,7 @@ public class CameraController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取录像文件信息
|
|
* 获取录像文件信息
|
|
|
|
+ *
|
|
* @return ResultDTO
|
|
* @return ResultDTO
|
|
*/
|
|
*/
|
|
@ApiOperation("获取摄像机状态")
|
|
@ApiOperation("获取摄像机状态")
|
|
@@ -247,7 +273,7 @@ public class CameraController {
|
|
CameraDTO cameraDTO = new CameraDTO();
|
|
CameraDTO cameraDTO = new CameraDTO();
|
|
cameraDTO.setId(id);
|
|
cameraDTO.setId(id);
|
|
Integer result = cameraService.getState(cameraDTO);
|
|
Integer result = cameraService.getState(cameraDTO);
|
|
- return AjaxResult.success("成功",result);
|
|
|
|
|
|
+ return AjaxResult.success("成功", result);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|