tplink摄像头录像计划
This commit is contained in:
parent
0be7905574
commit
cc6ef10037
|
@ -11,9 +11,13 @@
|
||||||
*/
|
*/
|
||||||
package com.nu.modules.tplink.camera.controller;
|
package com.nu.modules.tplink.camera.controller;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.nu.modules.tplink.camera.model.CameraTreeModel;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
@ -21,13 +25,14 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import com.nu.modules.tplink.camera.service.ICameraInfoService;
|
import com.nu.modules.tplink.camera.service.ICameraInfoService;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import com.nu.modules.tplink.camera.entity.CameraInfo;
|
import com.nu.modules.tplink.camera.entity.CameraInfo;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 护理单元-物联管理-摄像头信息
|
* @Description: 护理单元-物联管理-摄像头信息
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
* @Date: 2025-01-17
|
* @Date: 2025-01-17
|
||||||
|
@ -54,25 +59,40 @@ public class CameraInfoController extends JeecgController<CameraInfo, ICameraInf
|
||||||
@ApiOperation(value="护理单元-物联管理-摄像头信息-分页列表查询", notes="护理单元-物联管理-摄像头信息-分页列表查询")
|
@ApiOperation(value="护理单元-物联管理-摄像头信息-分页列表查询", notes="护理单元-物联管理-摄像头信息-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<IPage<CameraInfo>> queryPageList(CameraInfo CameraInfo,
|
public Result<IPage<CameraInfo>> queryPageList(CameraInfo CameraInfo,
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
Page<CameraInfo> page = new Page<CameraInfo>(pageNo, pageSize);
|
Page<CameraInfo> page = new Page<CameraInfo>(pageNo, pageSize);
|
||||||
IPage<CameraInfo> pageList = service.findPage(page, CameraInfo);
|
IPage<CameraInfo> pageList = service.findPage(page, CameraInfo);
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value="护理单元分页列表查询", notes="护理单元分页列表查询")
|
@RequestMapping(value = "/queryTreeList", method = RequestMethod.GET)
|
||||||
@GetMapping(value = "/nuList")
|
public Result<List<CameraTreeModel>> queryTreeList(CameraInfo CameraInfo) {
|
||||||
public Result<IPage<CameraInfo>> queryNuPageList(CameraInfo CameraInfo,
|
Result<List<CameraTreeModel>> result = new Result<>();
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
try {
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
List<CameraTreeModel> list = service.findModelList(CameraInfo);
|
||||||
HttpServletRequest req) {
|
result.setResult(list);
|
||||||
Page<CameraInfo> page = new Page<CameraInfo>(pageNo, pageSize);
|
result.setSuccess(true);
|
||||||
IPage<CameraInfo> pageList = service.findNuPage(page, CameraInfo);
|
} catch (Exception e) {
|
||||||
return Result.OK(pageList);
|
log.error(e.getMessage(),e);
|
||||||
}
|
result.setSuccess(false);
|
||||||
|
result.setMessage("查询失败");
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value="护理单元分页列表查询", notes="护理单元分页列表查询")
|
||||||
|
@GetMapping(value = "/nuList")
|
||||||
|
public Result<IPage<CameraInfo>> queryNuPageList(CameraInfo CameraInfo,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
Page<CameraInfo> page = new Page<CameraInfo>(pageNo, pageSize);
|
||||||
|
IPage<CameraInfo> pageList = service.findNuPage(page, CameraInfo);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
*
|
*
|
||||||
|
@ -87,338 +107,385 @@ public class CameraInfoController extends JeecgController<CameraInfo, ICameraInf
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("编辑成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改摄像头信息
|
* 修改摄像头信息
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/rebootDevice", method = {RequestMethod.PUT,RequestMethod.POST})
|
@RequestMapping(value = "/rebootDevice", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
public Result<String> rebootDevice(@RequestBody CameraInfo cameraInfo) {
|
public Result<String> rebootDevice(@RequestBody CameraInfo cameraInfo) {
|
||||||
service.rebootDevice(cameraInfo);
|
service.rebootDevice(cameraInfo);
|
||||||
return Result.OK("重启成功!");
|
return Result.OK("重启成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取IPC设备能力集
|
* 获取IPC设备能力集
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getIpcCapability")
|
@GetMapping(value = "/getIpcCapability")
|
||||||
public Result<JSONObject> getIpcCapability(CameraInfo cameraInfo) {
|
public Result<JSONObject> getIpcCapability(CameraInfo cameraInfo) {
|
||||||
return service.getIpcCapability(cameraInfo);
|
return service.getIpcCapability(cameraInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取画面基本信息
|
* 获取画面基本信息
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/getImageCommon")
|
@PostMapping(value = "/getImageCommon")
|
||||||
public Result<JSONObject> getImageCommon(@RequestBody Map<String,Object> map) {
|
public Result<JSONObject> getImageCommon(@RequestBody Map<String,Object> map) {
|
||||||
return service.getImageCommon(map);
|
return service.getImageCommon(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置画面基本信息
|
* 设置画面基本信息
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/setImageCommon")
|
@PostMapping(value = "/setImageCommon")
|
||||||
public Result setImageCommon(@RequestBody Map<String,Object> map) {
|
public Result setImageCommon(@RequestBody Map<String,Object> map) {
|
||||||
return service.setImageCommon(map);
|
return service.setImageCommon(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取OSD能力集
|
* 获取OSD能力集
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/getOsdCapability")
|
@PostMapping(value = "/getOsdCapability")
|
||||||
public Result<JSONObject> getOsdCapability(@RequestBody Map<String,Object> map) {
|
public Result<JSONObject> getOsdCapability(@RequestBody Map<String,Object> map) {
|
||||||
return service.getOsdCapability(map);
|
return service.getOsdCapability(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取OSD参数
|
* 获取OSD参数
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/getOsd")
|
@PostMapping(value = "/getOsd")
|
||||||
public Result<JSONObject> getOsd(@RequestBody Map<String,Object> map) {
|
public Result<JSONObject> getOsd(@RequestBody Map<String,Object> map) {
|
||||||
return service.getOsd(map);
|
return service.getOsd(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置OSD参数
|
* 设置OSD参数
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/setOsd")
|
@PostMapping(value = "/setOsd")
|
||||||
public Result<String> setOsd(@RequestBody Map<String,Object> map) {
|
public Result<String> setOsd(@RequestBody Map<String,Object> map) {
|
||||||
return service.setOsd(map);
|
return service.setOsd(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取码率参数
|
* 获取码率参数
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/getVideoParams")
|
@PostMapping(value = "/getVideoParams")
|
||||||
public Result<JSONObject> getVideoParams(@RequestBody Map<String,Object> map) {
|
public Result<JSONObject> getVideoParams(@RequestBody Map<String,Object> map) {
|
||||||
return service.getVideoParams(map);
|
return service.getVideoParams(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置码率参数
|
* 设置码率参数
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/setVideoParams")
|
@PostMapping(value = "/setVideoParams")
|
||||||
public Result setVideoParams(@RequestBody Map<String,Object> map) {
|
public Result setVideoParams(@RequestBody Map<String,Object> map) {
|
||||||
return service.setVideoParams(map);
|
return service.setVideoParams(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 恢复画面默认值
|
* 恢复画面默认值
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/configRecovery")
|
@PostMapping(value = "/configRecovery")
|
||||||
public Result configRecovery(@RequestBody Map<String,Object> map) {
|
public Result configRecovery(@RequestBody Map<String,Object> map) {
|
||||||
return service.configRecovery(map);
|
return service.configRecovery(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取摄像头实时播放地址
|
* 获取摄像头实时播放地址
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getPreviewUrl")
|
@GetMapping(value = "/getPreviewUrl")
|
||||||
public Result<Map<String,String>> getPreviewUrl(CameraInfo cameraInfo) {
|
public Result<Map<String,String>> getPreviewUrl(CameraInfo cameraInfo) {
|
||||||
return service.getPreviewUrl(cameraInfo);
|
return service.getPreviewUrl(cameraInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取录像配置--暂无用
|
* 获取存储设备列表
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getRecordCfgs")
|
@GetMapping(value = "/getStorageDevice")
|
||||||
public Result getRecordCfgs(CameraInfo cameraInfo) throws Exception{
|
public Result getStorageDevice(CameraInfo cameraInfo) throws Exception{
|
||||||
return service.getRecordCfgs(cameraInfo);
|
return service.getStorageDevice(cameraInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置录像计划--暂无用
|
* 获取所有录像计划列表
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/setRecordCfgs")
|
@GetMapping(value = "/getAllRecordPlans")
|
||||||
public Result setRecordCfgs(CameraInfo cameraInfo) throws Exception{
|
public Result getAllRecordPlans(CameraInfo cameraInfo) throws Exception{
|
||||||
return service.setRecordCfgs(cameraInfo);
|
return service.getAllRecordPlans(cameraInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取批量操作录像计划进度--暂无用
|
* 添加录像计划
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getBatchProgress")
|
@PostMapping(value = "/addRecordCfgs")
|
||||||
public Result getBatchProgress(CameraInfo cameraInfo) throws Exception{
|
public Result addRecordCfgs(@RequestBody CameraInfo cameraInfo) throws Exception{
|
||||||
return service.getBatchProgress(cameraInfo);
|
return service.addRecordCfgs(cameraInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取镜头遮挡参数
|
* 设置录像计划
|
||||||
*
|
*
|
||||||
* @param map
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/getTamperDet")
|
@PostMapping(value = "/setRecordCfgs")
|
||||||
public Result<JSONObject> getTamperDet(@RequestBody Map<String,Object> map) {
|
public Result setRecordCfgs(@RequestBody CameraInfo cameraInfo) throws Exception{
|
||||||
return service.getTamperDet(map);
|
return service.setRecordCfgs(cameraInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置镜头遮挡参数
|
* 删除录像计划
|
||||||
*
|
*
|
||||||
* @param map
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/setTamperDet")
|
@GetMapping(value = "/delRecordCfgs")
|
||||||
public Result<String> setTamperDet(@RequestBody Map<String,Object> map) {
|
public Result delRecordCfgs(CameraInfo cameraInfo) throws Exception{
|
||||||
return service.setTamperDet(map);
|
return service.delRecordCfgs(cameraInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取镜头遮挡处理方式
|
* 获取录像配置
|
||||||
*
|
*
|
||||||
* @param map
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/getTamperNotif")
|
@GetMapping(value = "/getRecordCfgs")
|
||||||
public Result<JSONObject> getTamperNotif(@RequestBody Map<String,Object> map) {
|
public Result<IPage<CameraInfo>> getRecordCfgs(CameraInfo cameraInfo,
|
||||||
return service.getTamperNotif(map);
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
}
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) throws Exception{
|
||||||
|
IPage<CameraInfo> pageList = service.getRecordCfgs(cameraInfo,pageNo,pageSize);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置镜头遮挡处理方式
|
* 获取批量操作录像计划进度
|
||||||
*
|
*
|
||||||
* @param map
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/setTamperNotif")
|
@GetMapping(value = "/getBatchProgress")
|
||||||
public Result setTamperNotif(@RequestBody Map<String,Object> map) {
|
public Result getBatchProgress(CameraInfo cameraInfo) throws Exception{
|
||||||
return service.setTamperNotif(map);
|
return service.getBatchProgress(cameraInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报警声音试听
|
* 获取镜头遮挡参数
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/testAudio")
|
@PostMapping(value = "/getTamperDet")
|
||||||
public Result testAudio(@RequestBody Map<String,Object> map) {
|
public Result<JSONObject> getTamperDet(@RequestBody Map<String,Object> map) {
|
||||||
return service.testAudio(map);
|
return service.getTamperDet(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取白光/声音告警参数
|
* 设置镜头遮挡参数
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/getAlarmInfo")
|
@PostMapping(value = "/setTamperDet")
|
||||||
public Result<JSONObject> getAlarmInfo(@RequestBody Map<String,Object> map) {
|
public Result<String> setTamperDet(@RequestBody Map<String,Object> map) {
|
||||||
return service.getAlarmInfo(map);
|
return service.setTamperDet(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置白光/声音告警参数
|
* 获取镜头遮挡处理方式
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/setAlarmInfo")
|
@PostMapping(value = "/getTamperNotif")
|
||||||
public Result<String> setAlarmInfo(@RequestBody Map<String,Object> map) {
|
public Result<JSONObject> getTamperNotif(@RequestBody Map<String,Object> map) {
|
||||||
return service.setAlarmInfo(map);
|
return service.getTamperNotif(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取白光/声音告警布防时间
|
* 设置镜头遮挡处理方式
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/getAlarmPlan")
|
@PostMapping(value = "/setTamperNotif")
|
||||||
public Result<JSONObject> getAlarmPlan(@RequestBody Map<String,Object> map) {
|
public Result setTamperNotif(@RequestBody Map<String,Object> map) {
|
||||||
return service.getAlarmPlan(map);
|
return service.setTamperNotif(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置白光/声音告警布防时间
|
* 报警声音试听
|
||||||
*
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/setAlarmPlan")
|
@PostMapping(value = "/testAudio")
|
||||||
public Result setAlarmPlan(@RequestBody Map<String,Object> map) {
|
public Result testAudio(@RequestBody Map<String,Object> map) {
|
||||||
return service.setAlarmPlan(map);
|
return service.testAudio(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索某天的录像数据
|
* 获取白光/声音告警参数
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/searchVideo")
|
@PostMapping(value = "/getAlarmInfo")
|
||||||
public Result<IPage<CameraInfo>> searchVideo(CameraInfo cameraInfo,
|
public Result<JSONObject> getAlarmInfo(@RequestBody Map<String,Object> map) {
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
return service.getAlarmInfo(map);
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
}
|
||||||
HttpServletRequest req) {
|
|
||||||
return service.searchVideo(pageNo, pageSize, cameraInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取摄像头录像回放地址
|
* 设置白光/声音告警参数
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getPlaybackUrlList")
|
@PostMapping(value = "/setAlarmInfo")
|
||||||
public Result<Map<String,Object>> getPlaybackUrlList(CameraInfo cameraInfo) {
|
public Result<String> setAlarmInfo(@RequestBody Map<String,Object> map) {
|
||||||
return service.getPlaybackUrlList(cameraInfo);
|
return service.setAlarmInfo(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除回放通道
|
* 获取白光/声音告警布防时间
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/deletePlaybackChn")
|
@PostMapping(value = "/getAlarmPlan")
|
||||||
public Result<String> deletePlaybackChn(CameraInfo cameraInfo) {
|
public Result<JSONObject> getAlarmPlan(@RequestBody Map<String,Object> map) {
|
||||||
return service.deletePlaybackChn(cameraInfo);
|
return service.getAlarmPlan(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取摄像头录像回放地址
|
* 设置白光/声音告警布防时间
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getMultitransUrl")
|
@PostMapping(value = "/setAlarmPlan")
|
||||||
public Result<Map<String,Object>> getMultitransUrl(CameraInfo cameraInfo) throws Exception{
|
public Result setAlarmPlan(@RequestBody Map<String,Object> map) {
|
||||||
return service.getMultitransUrl(cameraInfo);
|
return service.setAlarmPlan(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回放视频转mp4上传
|
* 搜索某天的录像数据
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/uploadToServer")
|
@GetMapping(value = "/searchVideo")
|
||||||
public Result uploadToServer(CameraInfo cameraInfo) throws Exception{
|
public Result<IPage<CameraInfo>> searchVideo(CameraInfo cameraInfo,
|
||||||
return service.uploadToServer(cameraInfo);
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
}
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
return service.searchVideo(pageNo, pageSize, cameraInfo);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 停止转存MP4上传任务
|
* 获取摄像头录像回放地址
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/stopUploadToServer")
|
@GetMapping(value = "/getPlaybackUrlList")
|
||||||
public Result<String> stopUploadToServer(CameraInfo cameraInfo) throws Exception{
|
public Result<Map<String,Object>> getPlaybackUrlList(CameraInfo cameraInfo) {
|
||||||
return service.stopUploadToServer(cameraInfo);
|
return service.getPlaybackUrlList(cameraInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取转存MP4上传任务进度
|
* 删除回放通道
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getUploadToServerProcess")
|
@GetMapping(value = "/deletePlaybackChn")
|
||||||
public Result getUploadToServerProcess(CameraInfo cameraInfo) throws Exception{
|
public Result<String> deletePlaybackChn(CameraInfo cameraInfo) {
|
||||||
return service.getUploadToServerProcess(cameraInfo);
|
return service.deletePlaybackChn(cameraInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
/**
|
||||||
|
* 获取摄像头录像回放地址
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getMultitransUrl")
|
||||||
|
public Result<Map<String,Object>> getMultitransUrl(CameraInfo cameraInfo) throws Exception{
|
||||||
|
return service.getMultitransUrl(cameraInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回放视频转mp4上传
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/uploadToServer")
|
||||||
|
public Result uploadToServer(CameraInfo cameraInfo) throws Exception{
|
||||||
|
return service.uploadToServer(cameraInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停止转存MP4上传任务
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/stopUploadToServer")
|
||||||
|
public Result<String> stopUploadToServer(CameraInfo cameraInfo) throws Exception{
|
||||||
|
return service.stopUploadToServer(cameraInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取转存MP4上传任务进度
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getUploadToServerProcess")
|
||||||
|
public Result getUploadToServerProcess(CameraInfo cameraInfo) throws Exception{
|
||||||
|
return service.getUploadToServerProcess(cameraInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -27,83 +27,83 @@ import lombok.experimental.Accessors;
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@ApiModel(value="nu_iot_tplink_camera对象", description="护理单元-物联管理-TPLINK摄像头信息")
|
@ApiModel(value="nu_iot_tplink_camera对象", description="护理单元-物联管理-TPLINK摄像头信息")
|
||||||
public class CameraInfo implements Serializable {
|
public class CameraInfo implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**ID*/
|
/**ID*/
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
@ApiModelProperty(value = "ID")
|
@ApiModelProperty(value = "ID")
|
||||||
private Integer id;
|
private Integer id;
|
||||||
/**设备序号*/
|
/**设备序号*/
|
||||||
@Excel(name = "设备序号", width = 15)
|
@Excel(name = "设备序号", width = 15)
|
||||||
@ApiModelProperty(value = "设备序号")
|
@ApiModelProperty(value = "设备序号")
|
||||||
private String deviceIndex;
|
private String deviceIndex;
|
||||||
/**设备名称*/
|
/**设备名称*/
|
||||||
@Excel(name = "设备名称", width = 15)
|
@Excel(name = "设备名称", width = 15)
|
||||||
@ApiModelProperty(value = "设备名称")
|
@ApiModelProperty(value = "设备名称")
|
||||||
private String deviceName;
|
private String deviceName;
|
||||||
/**设备类型*/
|
/**设备类型*/
|
||||||
@Excel(name = "设备类型", width = 15)
|
@Excel(name = "设备类型", width = 15)
|
||||||
@ApiModelProperty(value = "设备类型")
|
@ApiModelProperty(value = "设备类型")
|
||||||
private String deviceType;
|
private String deviceType;
|
||||||
/**设备状态 0 离线 1 在线 2 重启中 3 升级中 4 配置中 5 同步中*/
|
/**设备状态 0 离线 1 在线 2 重启中 3 升级中 4 配置中 5 同步中*/
|
||||||
@Excel(name = "设备状态 0 离线 1 在线 2 重启中 3 升级中 4 配置中 5 同步中", width = 15, dicCode = "tplink_status")
|
@Excel(name = "设备状态 0 离线 1 在线 2 重启中 3 升级中 4 配置中 5 同步中", width = 15, dicCode = "tplink_status")
|
||||||
@Dict(dicCode = "tplink_status")
|
@Dict(dicCode = "tplink_status")
|
||||||
@ApiModelProperty(value = "设备状态 0 离线 1 在线 2 重启中 3 升级中 4 配置中 5 同步中")
|
@ApiModelProperty(value = "设备状态 0 离线 1 在线 2 重启中 3 升级中 4 配置中 5 同步中")
|
||||||
private String deviceStatus;
|
private String deviceStatus;
|
||||||
/**设备型号*/
|
/**设备型号*/
|
||||||
@Excel(name = "设备型号", width = 15)
|
@Excel(name = "设备型号", width = 15)
|
||||||
@ApiModelProperty(value = "设备型号")
|
@ApiModelProperty(value = "设备型号")
|
||||||
private String deviceModel;
|
private String deviceModel;
|
||||||
/**IP地址*/
|
/**IP地址*/
|
||||||
@Excel(name = "IP地址", width = 15)
|
@Excel(name = "IP地址", width = 15)
|
||||||
@ApiModelProperty(value = "IP地址")
|
@ApiModelProperty(value = "IP地址")
|
||||||
private String ip;
|
private String ip;
|
||||||
/**MAC地址*/
|
/**MAC地址*/
|
||||||
@Excel(name = "MAC地址", width = 15)
|
@Excel(name = "MAC地址", width = 15)
|
||||||
@ApiModelProperty(value = "MAC地址")
|
@ApiModelProperty(value = "MAC地址")
|
||||||
private String mac;
|
private String mac;
|
||||||
/**分组ID*/
|
/**分组ID*/
|
||||||
@Excel(name = "分组ID", width = 15)
|
@Excel(name = "分组ID", width = 15)
|
||||||
@ApiModelProperty(value = "分组ID")
|
@ApiModelProperty(value = "分组ID")
|
||||||
private String regionId;
|
private String regionId;
|
||||||
/**分组名称*/
|
/**分组名称*/
|
||||||
@Excel(name = "分组名称", width = 15)
|
@Excel(name = "分组名称", width = 15)
|
||||||
@ApiModelProperty(value = "分组名称")
|
@ApiModelProperty(value = "分组名称")
|
||||||
private String regionName;
|
private String regionName;
|
||||||
/**父设备ID*/
|
/**父设备ID*/
|
||||||
@Excel(name = "父设备ID", width = 15)
|
@Excel(name = "父设备ID", width = 15)
|
||||||
@ApiModelProperty(value = "父设备ID")
|
@ApiModelProperty(value = "父设备ID")
|
||||||
private String parentId;
|
private String parentId;
|
||||||
/**父设备名称*/
|
/**父设备名称*/
|
||||||
@Excel(name = "父设备名称", width = 15)
|
@Excel(name = "父设备名称", width = 15)
|
||||||
@ApiModelProperty(value = "父设备名称")
|
@ApiModelProperty(value = "父设备名称")
|
||||||
private String parentDeviceName;
|
private String parentDeviceName;
|
||||||
/**项目ID*/
|
/**项目ID*/
|
||||||
@Excel(name = "项目ID", width = 15)
|
@Excel(name = "项目ID", width = 15)
|
||||||
@ApiModelProperty(value = "项目ID")
|
@ApiModelProperty(value = "项目ID")
|
||||||
private String projectId;
|
private String projectId;
|
||||||
/**项目名称*/
|
/**项目名称*/
|
||||||
@Excel(name = "项目名称", width = 15)
|
@Excel(name = "项目名称", width = 15)
|
||||||
@ApiModelProperty(value = "项目名称")
|
@ApiModelProperty(value = "项目名称")
|
||||||
private String projectName;
|
private String projectName;
|
||||||
/**软件版本*/
|
/**软件版本*/
|
||||||
@Excel(name = "软件版本", width = 15)
|
@Excel(name = "软件版本", width = 15)
|
||||||
@ApiModelProperty(value = "软件版本")
|
@ApiModelProperty(value = "软件版本")
|
||||||
private String firmwareVer;
|
private String firmwareVer;
|
||||||
/**硬件版本*/
|
/**硬件版本*/
|
||||||
@Excel(name = "硬件版本", width = 15)
|
@Excel(name = "硬件版本", width = 15)
|
||||||
@ApiModelProperty(value = "硬件版本")
|
@ApiModelProperty(value = "硬件版本")
|
||||||
private String hardwareVer;
|
private String hardwareVer;
|
||||||
/**用户权限类型 -1 无权限 0 可读 1 可控制 2 可配置 3 可控制/配置 4 所有*/
|
/**用户权限类型 -1 无权限 0 可读 1 可控制 2 可配置 3 可控制/配置 4 所有*/
|
||||||
@Excel(name = "用户权限类型 -1 无权限 0 可读 1 可控制 2 可配置 3 可控制/配置 4 所有", width = 15, dicCode = "tplink_manager_auth_type")
|
@Excel(name = "用户权限类型 -1 无权限 0 可读 1 可控制 2 可配置 3 可控制/配置 4 所有", width = 15, dicCode = "tplink_manager_auth_type")
|
||||||
@Dict(dicCode = "tplink_manager_auth_type")
|
@Dict(dicCode = "tplink_manager_auth_type")
|
||||||
@ApiModelProperty(value = "用户权限类型 -1 无权限 0 可读 1 可控制 2 可配置 3 可控制/配置 4 所有")
|
@ApiModelProperty(value = "用户权限类型 -1 无权限 0 可读 1 可控制 2 可配置 3 可控制/配置 4 所有")
|
||||||
private String managerAuthType;
|
private String managerAuthType;
|
||||||
/**告警消息权限 1 有权限 -1 无权限*/
|
/**告警消息权限 1 有权限 -1 无权限*/
|
||||||
@Excel(name = "告警消息权限 1 有权限 -1 无权限", width = 15, dicCode = "tplink_msg_auth_type")
|
@Excel(name = "告警消息权限 1 有权限 -1 无权限", width = 15, dicCode = "tplink_msg_auth_type")
|
||||||
@Dict(dicCode = "tplink_msg_auth_type")
|
@Dict(dicCode = "tplink_msg_auth_type")
|
||||||
@ApiModelProperty(value = "告警消息权限 1 有权限 -1 无权限")
|
@ApiModelProperty(value = "告警消息权限 1 有权限 -1 无权限")
|
||||||
private String msgAuthType;
|
private String msgAuthType;
|
||||||
/**扩展信息*/
|
/**扩展信息*/
|
||||||
@Excel(name = "扩展信息", width = 15)
|
@Excel(name = "扩展信息", width = 15)
|
||||||
@ApiModelProperty(value = "扩展信息")
|
@ApiModelProperty(value = "扩展信息")
|
||||||
|
@ -111,30 +111,30 @@ public class CameraInfo implements Serializable {
|
||||||
private JSONObject extend;
|
private JSONObject extend;
|
||||||
/**国标编码*/
|
/**国标编码*/
|
||||||
@Excel(name = "国标编码", width = 15)
|
@Excel(name = "国标编码", width = 15)
|
||||||
@ApiModelProperty(value = "国标编码")
|
@ApiModelProperty(value = "国标编码")
|
||||||
private String sipCode;
|
private String sipCode;
|
||||||
/**位置名称*/
|
/**位置名称*/
|
||||||
@Excel(name = "位置名称", width = 15)
|
@Excel(name = "位置名称", width = 15)
|
||||||
@ApiModelProperty(value = "位置名称")
|
@ApiModelProperty(value = "位置名称")
|
||||||
private String locationName;
|
private String locationName;
|
||||||
/**系统类型 public 通用 vms 监控 nms 网络 evcs 新能源充电桩 rms 客控 nbs 音箱 bas 楼控 ams 门禁 smart_agriculture 智慧农业 vps 停车管理 aaa 认证计费*/
|
/**系统类型 public 通用 vms 监控 nms 网络 evcs 新能源充电桩 rms 客控 nbs 音箱 bas 楼控 ams 门禁 smart_agriculture 智慧农业 vps 停车管理 aaa 认证计费*/
|
||||||
@Excel(name = "系统类型 public 通用 vms 监控 nms 网络 evcs 新能源充电桩 rms 客控 nbs 音箱 bas 楼控 ams 门禁 smart_agriculture 智慧农业 vps 停车管理 aaa 认证计费", width = 15, dicCode = "tplink_system_type")
|
@Excel(name = "系统类型 public 通用 vms 监控 nms 网络 evcs 新能源充电桩 rms 客控 nbs 音箱 bas 楼控 ams 门禁 smart_agriculture 智慧农业 vps 停车管理 aaa 认证计费", width = 15, dicCode = "tplink_system_type")
|
||||||
@Dict(dicCode = "tplink_system_type")
|
@Dict(dicCode = "tplink_system_type")
|
||||||
@ApiModelProperty(value = "系统类型 public 通用 vms 监控 nms 网络 evcs 新能源充电桩 rms 客控 nbs 音箱 bas 楼控 ams 门禁 smart_agriculture 智慧农业 vps 停车管理 aaa 认证计费")
|
@ApiModelProperty(value = "系统类型 public 通用 vms 监控 nms 网络 evcs 新能源充电桩 rms 客控 nbs 音箱 bas 楼控 ams 门禁 smart_agriculture 智慧农业 vps 停车管理 aaa 认证计费")
|
||||||
private String systemType;
|
private String systemType;
|
||||||
/**协议类型*/
|
/**协议类型*/
|
||||||
@Excel(name = "协议类型", width = 15)
|
@Excel(name = "协议类型", width = 15)
|
||||||
@ApiModelProperty(value = "协议类型")
|
@ApiModelProperty(value = "协议类型")
|
||||||
private String protocol;
|
private String protocol;
|
||||||
/**置顶的时间*/
|
/**置顶的时间*/
|
||||||
@Excel(name = "用户设置置顶的时间,毫秒级时间戳", width = 15)
|
@Excel(name = "用户设置置顶的时间,毫秒级时间戳", width = 15)
|
||||||
@ApiModelProperty(value = "用户设置置顶的时间,毫秒级时间戳")
|
@ApiModelProperty(value = "用户设置置顶的时间,毫秒级时间戳")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String topTime;
|
private String topTime;
|
||||||
/**护理单元*/
|
/**护理单元*/
|
||||||
@ApiModelProperty(value = "护理单元ID")
|
@ApiModelProperty(value = "护理单元ID")
|
||||||
@Dict(dictTable ="nu_base_info",dicText = "nu_name",dicCode = "id")
|
@Dict(dictTable ="nu_base_info",dicText = "nu_name",dicCode = "id")
|
||||||
private String nuId;
|
private String nuId;
|
||||||
/**护理单元*/
|
/**护理单元*/
|
||||||
@ApiModelProperty(value = "护理单元")
|
@ApiModelProperty(value = "护理单元")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
@ -143,6 +143,14 @@ public class CameraInfo implements Serializable {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private int streamType;
|
private int streamType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "录像计划ID")
|
||||||
|
private String recordPlanId;
|
||||||
|
@ApiModelProperty(value = "录像计划名称")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String planName;
|
||||||
|
@ApiModelProperty(value = "批量处理类型 1:表示查询添加进度,2:表示查询设置进度,3:表示查询删除进度")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private int batchType;
|
||||||
/**
|
/**
|
||||||
* 能力集属性 ==>
|
* 能力集属性 ==>
|
||||||
*/
|
*/
|
||||||
|
@ -269,6 +277,9 @@ public class CameraInfo implements Serializable {
|
||||||
@ApiModelProperty(value = "录像开关;枚举:[0:表示关,1:表示开]")
|
@ApiModelProperty(value = "录像开关;枚举:[0:表示关,1:表示开]")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String recordSwitch;
|
private String recordSwitch;
|
||||||
|
@ApiModelProperty(value = "录像开关;枚举:[false:表示关,true:表示开]")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private boolean recordSwitchBoolean;
|
||||||
@ApiModelProperty(value = "任务taskId")
|
@ApiModelProperty(value = "任务taskId")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String taskId;
|
private String taskId;
|
||||||
|
@ -278,4 +289,7 @@ public class CameraInfo implements Serializable {
|
||||||
@ApiModelProperty(value = "上传进度")
|
@ApiModelProperty(value = "上传进度")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String process;
|
private String process;
|
||||||
|
@ApiModelProperty(value = "IDS")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String ids;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,12 @@ import java.util.List;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface CameraInfoMapper extends BaseMapper<CameraInfo> {
|
public interface CameraInfoMapper extends BaseMapper<CameraInfo> {
|
||||||
IPage<CameraInfo> findPage(Page<CameraInfo> page, @Param("params") CameraInfo cameraInfo);
|
IPage<CameraInfo> findPage(Page<CameraInfo> page, @Param("params") CameraInfo cameraInfo);
|
||||||
|
List<CameraInfo> findList(CameraInfo cameraInfo);
|
||||||
List<CameraInfo> findAllList();
|
List<CameraInfo> findAllList();
|
||||||
IPage<CameraInfo> findNuPage(Page<CameraInfo> page, @Param("params") CameraInfo cameraInfo);
|
IPage<CameraInfo> findNuPage(Page<CameraInfo> page, @Param("params") CameraInfo cameraInfo);
|
||||||
CameraInfo getByDeviceId(CameraInfo cameraInfo);
|
CameraInfo getByDeviceId(CameraInfo cameraInfo);
|
||||||
CameraInfo getCapabilityByDeviceId(CameraInfo cameraInfo);
|
CameraInfo getCapabilityByDeviceId(CameraInfo cameraInfo);
|
||||||
void insertCapability(CameraInfo cameraInfo);
|
void insertCapability(CameraInfo cameraInfo);
|
||||||
void updateCapabilityById(CameraInfo cameraInfo);
|
void updateCapabilityById(CameraInfo cameraInfo);
|
||||||
|
void updatePlanByDevId(CameraInfo cameraInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,30 +4,31 @@
|
||||||
|
|
||||||
<select id="findPage" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
<select id="findPage" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
||||||
select a.id,
|
select a.id,
|
||||||
a.device_index as deviceIndex,
|
a.device_index as deviceIndex,
|
||||||
device_name as deviceName,
|
device_name as deviceName,
|
||||||
device_type as deviceType,
|
device_type as deviceType,
|
||||||
device_status as deviceStatus,
|
device_status as deviceStatus,
|
||||||
device_model as deviceModel,
|
device_model as deviceModel,
|
||||||
ip as ip,
|
ip as ip,
|
||||||
mac as mac,
|
mac as mac,
|
||||||
region_id as regionId,
|
region_id as regionId,
|
||||||
region_name as regionName,
|
region_name as regionName,
|
||||||
parent_id as parentId,
|
parent_id as parentId,
|
||||||
parent_device_name as parentDeviceName,
|
parent_device_name as parentDeviceName,
|
||||||
project_id as projectId,
|
project_id as projectId,
|
||||||
project_name as projectName,
|
project_name as projectName,
|
||||||
firmware_ver as firmwareVer,
|
firmware_ver as firmwareVer,
|
||||||
hardware_ver as hardwareVer,
|
hardware_ver as hardwareVer,
|
||||||
manager_auth_type as managerAuthType,
|
manager_auth_type as managerAuthType,
|
||||||
msg_auth_type as msgAuthType,
|
msg_auth_type as msgAuthType,
|
||||||
sip_code as sipCode,
|
sip_code as sipCode,
|
||||||
location_name as locationName,
|
location_name as locationName,
|
||||||
system_type as systemType,
|
system_type as systemType,
|
||||||
protocol as protocol,
|
protocol as protocol,
|
||||||
a.nu_id as nuId,
|
record_plan_id as recordPlanId,
|
||||||
b.nu_name as nuName,
|
a.nu_id as nuId,
|
||||||
ifnull(c.multitrans,0) as multitrans
|
b.nu_name as nuName,
|
||||||
|
ifnull(c.multitrans,0) as multitrans
|
||||||
from nu_iot_tplink_camera a left join nu_base_info b on a.nu_id = b.id
|
from nu_iot_tplink_camera a left join nu_base_info b on a.nu_id = b.id
|
||||||
left join nu_iot_tplink_camera_capability c on a.device_index = c.device_index
|
left join nu_iot_tplink_camera_capability c on a.device_index = c.device_index
|
||||||
<where>
|
<where>
|
||||||
|
@ -58,37 +59,78 @@
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findList" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
||||||
|
select a.id,
|
||||||
|
a.device_index as deviceIndex,
|
||||||
|
device_name as deviceName,
|
||||||
|
device_type as deviceType,
|
||||||
|
device_status as deviceStatus,
|
||||||
|
device_model as deviceModel,
|
||||||
|
ip as ip,
|
||||||
|
mac as mac,
|
||||||
|
region_id as regionId,
|
||||||
|
region_name as regionName,
|
||||||
|
parent_id as parentId,
|
||||||
|
parent_device_name as parentDeviceName,
|
||||||
|
project_id as projectId,
|
||||||
|
project_name as projectName,
|
||||||
|
firmware_ver as firmwareVer,
|
||||||
|
hardware_ver as hardwareVer,
|
||||||
|
manager_auth_type as managerAuthType,
|
||||||
|
msg_auth_type as msgAuthType,
|
||||||
|
sip_code as sipCode,
|
||||||
|
location_name as locationName,
|
||||||
|
system_type as systemType,
|
||||||
|
protocol as protocol,
|
||||||
|
record_plan_id as recordPlanId,
|
||||||
|
a.nu_id as nuId,
|
||||||
|
b.nu_name as nuName
|
||||||
|
from nu_iot_tplink_camera a left join nu_base_info b on a.nu_id = b.id
|
||||||
|
<where>
|
||||||
|
<if test="projectId != null and projectId != ''">
|
||||||
|
AND a.project_id = #{projectId}
|
||||||
|
</if>
|
||||||
|
<if test="regionId != null and regionId != ''">
|
||||||
|
AND a.region_id = #{regionId}
|
||||||
|
</if>
|
||||||
|
<if test="recordPlanId != null and recordPlanId != ''">
|
||||||
|
AND ifnull(a.record_plan_id,'-1') = #{recordPlanId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="findAllList" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
<select id="findAllList" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
||||||
select a.id,
|
select a.id,
|
||||||
device_index as deviceIndex,
|
device_index as deviceIndex,
|
||||||
device_name as deviceName,
|
device_name as deviceName,
|
||||||
device_type as deviceType,
|
device_type as deviceType,
|
||||||
device_status as deviceStatus,
|
device_status as deviceStatus,
|
||||||
device_model as deviceModel,
|
device_model as deviceModel,
|
||||||
ip as ip,
|
ip as ip,
|
||||||
mac as mac,
|
mac as mac,
|
||||||
region_id as regionId,
|
region_id as regionId,
|
||||||
region_name as regionName,
|
region_name as regionName,
|
||||||
parent_id as parentId,
|
parent_id as parentId,
|
||||||
parent_device_name as parentDeviceName,
|
parent_device_name as parentDeviceName,
|
||||||
project_id as projectId,
|
project_id as projectId,
|
||||||
project_name as projectName,
|
project_name as projectName,
|
||||||
firmware_ver as firmwareVer,
|
firmware_ver as firmwareVer,
|
||||||
hardware_ver as hardwareVer,
|
hardware_ver as hardwareVer,
|
||||||
manager_auth_type as managerAuthType,
|
manager_auth_type as managerAuthType,
|
||||||
msg_auth_type as msgAuthType,
|
msg_auth_type as msgAuthType,
|
||||||
sip_code as sipCode,
|
sip_code as sipCode,
|
||||||
location_name as locationName,
|
location_name as locationName,
|
||||||
system_type as systemType,
|
system_type as systemType,
|
||||||
protocol as protocol,
|
protocol as protocol,
|
||||||
nu_id as nuId
|
record_plan_id as recordPlanId,
|
||||||
|
nu_id as nuId
|
||||||
from nu_iot_tplink_camera a
|
from nu_iot_tplink_camera a
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findNuPage" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
<select id="findNuPage" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
||||||
select
|
select
|
||||||
nu_id as nuId,
|
id as nuId,
|
||||||
nu_name as nuName
|
nu_name as nuName
|
||||||
from nu_base_info b
|
from nu_base_info b
|
||||||
<where>
|
<where>
|
||||||
<if test="params.nuId != null and params.nuId != ''">
|
<if test="params.nuId != null and params.nuId != ''">
|
||||||
|
@ -102,51 +144,51 @@
|
||||||
|
|
||||||
<select id="getByDeviceId" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
<select id="getByDeviceId" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
||||||
select a.id,
|
select a.id,
|
||||||
device_index as deviceIndex,
|
device_index as deviceIndex,
|
||||||
device_name as deviceName,
|
device_name as deviceName,
|
||||||
device_type as deviceType,
|
device_type as deviceType,
|
||||||
device_status as deviceStatus,
|
device_status as deviceStatus,
|
||||||
device_model as deviceModel,
|
device_model as deviceModel,
|
||||||
ip as ip,
|
ip as ip,
|
||||||
mac as mac,
|
mac as mac,
|
||||||
region_id as regionId,
|
region_id as regionId,
|
||||||
region_name as regionName,
|
region_name as regionName,
|
||||||
parent_id as parentId,
|
parent_id as parentId,
|
||||||
parent_device_name as parentDeviceName,
|
parent_device_name as parentDeviceName,
|
||||||
project_id as projectId,
|
project_id as projectId,
|
||||||
project_name as projectName,
|
project_name as projectName,
|
||||||
firmware_ver as firmwareVer,
|
firmware_ver as firmwareVer,
|
||||||
hardware_ver as hardwareVer,
|
hardware_ver as hardwareVer,
|
||||||
manager_auth_type as managerAuthType,
|
manager_auth_type as managerAuthType,
|
||||||
msg_auth_type as msgAuthType,
|
msg_auth_type as msgAuthType,
|
||||||
sip_code as sipCode,
|
sip_code as sipCode,
|
||||||
location_name as locationName,
|
location_name as locationName,
|
||||||
system_type as systemType,
|
system_type as systemType,
|
||||||
protocol as protocol,
|
protocol as protocol,
|
||||||
a.nu_id as nuId,
|
a.nu_id as nuId,
|
||||||
b.nu_name as nuName
|
b.nu_name as nuName
|
||||||
from nu_iot_tplink_camera a left join nu_base_info b on a.nu_id = b.id
|
from nu_iot_tplink_camera a left join nu_base_info b on a.nu_id = b.id
|
||||||
where device_index = #{deviceIndex}
|
where device_index = #{deviceIndex}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCapabilityByDeviceId" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
<select id="getCapabilityByDeviceId" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
||||||
select a.id,
|
select a.id,
|
||||||
device_index as deviceIndex,
|
device_index as deviceIndex,
|
||||||
motion_detection as motionDetection,
|
motion_detection as motionDetection,
|
||||||
video_cover as videoCover,
|
video_cover as videoCover,
|
||||||
ptz,
|
ptz,
|
||||||
motor,
|
motor,
|
||||||
smart_code as smartCode,
|
smart_code as smartCode,
|
||||||
force_idr_frame as forceIdrFrame,
|
force_idr_frame as forceIdrFrame,
|
||||||
audio,
|
audio,
|
||||||
local_storage as localStorage,
|
local_storage as localStorage,
|
||||||
playback_api_version_two as playbackApiVersionTwo,
|
playback_api_version_two as playbackApiVersionTwo,
|
||||||
multitrans,
|
multitrans,
|
||||||
passenger_flow as passengerFlow,
|
passenger_flow as passengerFlow,
|
||||||
get_preview_thumbnail as getPreviewThumbnail,
|
get_preview_thumbnail as getPreviewThumbnail,
|
||||||
preview_thumbnail_jpeg as previewThumbnailJpeg,
|
preview_thumbnail_jpeg as previewThumbnailJpeg,
|
||||||
corridor_mod as corridorMod,
|
corridor_mod as corridorMod,
|
||||||
backlight_coexistence as backlightCoexistence
|
backlight_coexistence as backlightCoexistence
|
||||||
from nu_iot_tplink_camera_capability a
|
from nu_iot_tplink_camera_capability a
|
||||||
where device_index = #{deviceIndex}
|
where device_index = #{deviceIndex}
|
||||||
</select>
|
</select>
|
||||||
|
@ -172,24 +214,24 @@
|
||||||
backlight_coexistence
|
backlight_coexistence
|
||||||
)
|
)
|
||||||
values (
|
values (
|
||||||
#{id},
|
#{id},
|
||||||
#{deviceIndex},
|
#{deviceIndex},
|
||||||
#{motionDetection},
|
#{motionDetection},
|
||||||
#{videoCover},
|
#{videoCover},
|
||||||
#{ptz},
|
#{ptz},
|
||||||
#{motor},
|
#{motor},
|
||||||
#{smartCode},
|
#{smartCode},
|
||||||
#{forceIdrFrame},
|
#{forceIdrFrame},
|
||||||
#{audio},
|
#{audio},
|
||||||
#{localStorage},
|
#{localStorage},
|
||||||
#{playbackApiVersionTwo},
|
#{playbackApiVersionTwo},
|
||||||
#{multitrans},
|
#{multitrans},
|
||||||
#{passengerFlow},
|
#{passengerFlow},
|
||||||
#{getPreviewThumbnail},
|
#{getPreviewThumbnail},
|
||||||
#{previewThumbnailJpeg},
|
#{previewThumbnailJpeg},
|
||||||
#{corridorMod},
|
#{corridorMod},
|
||||||
#{backlightCoexistence}
|
#{backlightCoexistence}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateCapabilityById">
|
<update id="updateCapabilityById">
|
||||||
|
@ -214,4 +256,10 @@
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updatePlanByDevId">
|
||||||
|
UPDATE nu_iot_tplink_camera
|
||||||
|
SET record_plan_id = #{recordPlanId}
|
||||||
|
where device_index = #{deviceIndex}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -0,0 +1,149 @@
|
||||||
|
package com.nu.modules.tplink.camera.model;
|
||||||
|
|
||||||
|
import com.nu.modules.tplink.camera.entity.CameraInfo;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 摄像头表 存储摄像头结构数据的实体类
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* @Author 曹磊
|
||||||
|
* @Since 2025-02-27
|
||||||
|
*/
|
||||||
|
public class CameraTreeModel implements Serializable{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 对应SysDepart中的id字段,前端数据树中的key*/
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
/** 对应SysDepart中的id字段,前端数据树中的value*/
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
/** 对应depart_name字段,前端数据树中的title*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
private boolean isLeaf;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
// 以下所有字段均与CameraInfo相同
|
||||||
|
|
||||||
|
private String deviceIndex;
|
||||||
|
|
||||||
|
private String deviceName;
|
||||||
|
|
||||||
|
private List<CameraTreeModel> children = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将CameraInfo对象转换成CameraTreeModel对象
|
||||||
|
* @param cameraInfo
|
||||||
|
*/
|
||||||
|
public CameraTreeModel(CameraInfo cameraInfo) {
|
||||||
|
this.key = cameraInfo.getDeviceIndex();
|
||||||
|
this.value = cameraInfo.getDeviceIndex();
|
||||||
|
this.title = cameraInfo.getDeviceName();
|
||||||
|
this.type = "camera";
|
||||||
|
this.deviceIndex = cameraInfo.getDeviceIndex();
|
||||||
|
this.deviceName = cameraInfo.getDeviceName();
|
||||||
|
this.isLeaf = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKey(String key) {
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getIsLeaf() {
|
||||||
|
return isLeaf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsLeaf(boolean isleaf) {
|
||||||
|
this.isLeaf = isleaf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CameraTreeModel> getChildren() {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChildren(List<CameraTreeModel> children) {
|
||||||
|
if (children==null){
|
||||||
|
this.isLeaf=true;
|
||||||
|
}
|
||||||
|
this.children = children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeviceIndex() {
|
||||||
|
return deviceIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceIndex(String deviceIndex) {
|
||||||
|
this.deviceIndex = deviceIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeviceName() {
|
||||||
|
return deviceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceName(String deviceName) {
|
||||||
|
this.deviceName = deviceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重写equals方法
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CameraTreeModel model = (CameraTreeModel) o;
|
||||||
|
return Objects.equals(deviceIndex, model.deviceIndex) &&
|
||||||
|
Objects.equals(deviceName, model.deviceName) &&
|
||||||
|
Objects.equals(children, model.children);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重写hashCode方法
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(deviceIndex, deviceName, children);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ package com.nu.modules.tplink.camera.service;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.nu.modules.tplink.camera.model.CameraTreeModel;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import com.nu.modules.tplink.camera.entity.CameraInfo;
|
import com.nu.modules.tplink.camera.entity.CameraInfo;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
@ -18,6 +19,7 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public interface ICameraInfoService extends IService<CameraInfo> {
|
public interface ICameraInfoService extends IService<CameraInfo> {
|
||||||
IPage<CameraInfo> findPage(Page<CameraInfo> page, CameraInfo cameraInfo);
|
IPage<CameraInfo> findPage(Page<CameraInfo> page, CameraInfo cameraInfo);
|
||||||
|
List<CameraTreeModel> findModelList(CameraInfo cameraInfo);
|
||||||
List<CameraInfo> findAllList();
|
List<CameraInfo> findAllList();
|
||||||
IPage<CameraInfo> findNuPage(Page<CameraInfo> page, CameraInfo cameraInfo);
|
IPage<CameraInfo> findNuPage(Page<CameraInfo> page, CameraInfo cameraInfo);
|
||||||
void edit(CameraInfo cameraInfo);
|
void edit(CameraInfo cameraInfo);
|
||||||
|
@ -34,8 +36,12 @@ public interface ICameraInfoService extends IService<CameraInfo> {
|
||||||
Result setVideoParams(Map<String,Object> map);
|
Result setVideoParams(Map<String,Object> map);
|
||||||
Result configRecovery(Map<String,Object> map);
|
Result configRecovery(Map<String,Object> map);
|
||||||
Result<Map<String,String>> getPreviewUrl(CameraInfo cameraInfo);
|
Result<Map<String,String>> getPreviewUrl(CameraInfo cameraInfo);
|
||||||
Result getRecordCfgs(CameraInfo cameraInfo) throws Exception;
|
Result getStorageDevice(CameraInfo cameraInfo) throws Exception;
|
||||||
|
Result getAllRecordPlans(CameraInfo cameraInfo) throws Exception;
|
||||||
|
Result addRecordCfgs(CameraInfo cameraInfo) throws Exception;
|
||||||
Result setRecordCfgs(CameraInfo cameraInfo) throws Exception;
|
Result setRecordCfgs(CameraInfo cameraInfo) throws Exception;
|
||||||
|
Result delRecordCfgs(CameraInfo cameraInfo) throws Exception;
|
||||||
|
IPage<CameraInfo> getRecordCfgs(CameraInfo cameraInfo,Integer pageNo,Integer pageSize) throws Exception;
|
||||||
Result getBatchProgress(CameraInfo cameraInfo) throws Exception;
|
Result getBatchProgress(CameraInfo cameraInfo) throws Exception;
|
||||||
Result<JSONObject> getTamperDet(Map<String,Object> map);
|
Result<JSONObject> getTamperDet(Map<String,Object> map);
|
||||||
Result<String> setTamperDet(Map<String,Object> map);
|
Result<String> setTamperDet(Map<String,Object> map);
|
||||||
|
|
|
@ -5,6 +5,7 @@ import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.nu.modules.tplink.camera.model.CameraTreeModel;
|
||||||
import com.nu.modules.tplink.common.entity.TumsConfig;
|
import com.nu.modules.tplink.common.entity.TumsConfig;
|
||||||
import com.nu.modules.tplink.common.mapper.TumsConfigMapper;
|
import com.nu.modules.tplink.common.mapper.TumsConfigMapper;
|
||||||
import org.apache.commons.compress.utils.Lists;
|
import org.apache.commons.compress.utils.Lists;
|
||||||
|
@ -54,6 +55,17 @@ public class CameraInfoServiceImpl extends ServiceImpl<CameraInfoMapper, CameraI
|
||||||
return baseMapper.findPage(page,cameraInfo);
|
return baseMapper.findPage(page,cameraInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<CameraTreeModel> findModelList(CameraInfo cameraInfo){
|
||||||
|
List<CameraTreeModel> modelList = Lists.newArrayList();
|
||||||
|
List<CameraInfo> list = baseMapper.findList(cameraInfo);
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
CameraInfo entity = list.get(i);
|
||||||
|
CameraTreeModel treeModel = new CameraTreeModel(entity);
|
||||||
|
modelList.add(treeModel);
|
||||||
|
}
|
||||||
|
return modelList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有摄像头信息
|
* 获取所有摄像头信息
|
||||||
* @return
|
* @return
|
||||||
|
@ -906,43 +918,137 @@ public class CameraInfoServiceImpl extends ServiceImpl<CameraInfoMapper, CameraI
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取录像配置
|
* 获取存储设备列表
|
||||||
*
|
*
|
||||||
* @param cameraInfo
|
* @param cameraInfo
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result getRecordCfgs(CameraInfo cameraInfo) throws Exception{
|
public Result getStorageDevice(CameraInfo cameraInfo) throws Exception{
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
sb.append("{");
|
sb.append("{");
|
||||||
sb.append("\"start\"").append(":").append("0,");
|
|
||||||
sb.append("\"limit\"").append(":").append("10,");
|
|
||||||
sb.append("\"filterAnd\"").append(":").append("{");
|
|
||||||
sb.append("\"projectId\"").append(":").append("\"").append(cameraInfo.getProjectId()).append("\",");
|
sb.append("\"projectId\"").append(":").append("\"").append(cameraInfo.getProjectId()).append("\",");
|
||||||
sb.append("\"regionId\"").append(":").append("\"").append(cameraInfo.getRegionId()).append("\"");
|
sb.append("\"regionId\"").append(":").append("\"").append(cameraInfo.getRegionId()).append("\"");
|
||||||
// sb.append("\"ipFloor\"").append(":").append("\"").append(cameraInfo.getIp()).append("\",");
|
|
||||||
// sb.append("\"ipCeiling\"").append(":").append("\"").append(cameraInfo.getIp()).append("\",");
|
|
||||||
// if(cameraInfo.getParentId()!=null&&!cameraInfo.getParentId().equals("")&&!cameraInfo.getParentId().equals("0")){
|
|
||||||
// //存储设备ID
|
|
||||||
// sb.append("\"storageDevId\"").append(":").append("\"").append(cameraInfo.getParentId()).append("\"");
|
|
||||||
// }else{
|
|
||||||
// //SK卡,取自身设备ID
|
|
||||||
// sb.append("\"storageDevId\"").append(":").append("\"").append(cameraInfo.getDeviceIndex()).append("\"");
|
|
||||||
// }
|
|
||||||
sb.append("},");
|
|
||||||
sb.append("\"sort\"").append(":").append("[{");
|
|
||||||
sb.append("\"key\"").append(":").append("\"ip\",");
|
|
||||||
sb.append("\"value\"").append(":").append("\"desc\"");
|
|
||||||
sb.append("}]");
|
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
String res = tumsApi.getRecordCfgs(sb.toString());
|
String res = tumsApi.getStorageDevice(sb.toString());
|
||||||
JSONObject jsonObject = new JSONObject(res);
|
JSONObject jsonObject = new JSONObject(res);
|
||||||
int errorCode = jsonObject.getInt("error_code");
|
int errorCode = jsonObject.getInt("error_code");
|
||||||
if(errorCode == 0){
|
if(errorCode == 0){
|
||||||
return Result.OK("获取录像配置成功!");
|
JSONArray result = jsonObject.getJSONArray("result");
|
||||||
|
List list = Lists.newArrayList();
|
||||||
|
if(result.size() == 0){
|
||||||
|
CameraInfo ci = new CameraInfo();
|
||||||
|
ci.setStorageDevId("0");
|
||||||
|
ci.setStorageDevName("默认存储位置");
|
||||||
|
list.add(ci);
|
||||||
|
}else{
|
||||||
|
for(int i=0;i<result.size();i++){
|
||||||
|
JSONObject json = (JSONObject)result.get(i);
|
||||||
|
CameraInfo ci = new CameraInfo();
|
||||||
|
String storageDevId = json.getStr("storageDevId");
|
||||||
|
ci.setStorageDevId(storageDevId);
|
||||||
|
String storageDevName = json.getStr("storageDevName");
|
||||||
|
ci.setStorageDevName(storageDevName);
|
||||||
|
list.add(ci);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Result.OK(list);
|
||||||
}else{
|
}else{
|
||||||
return Result.error("获取录像配置失败!");
|
return Result.error("获取存储设备列表失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有录像计划列表
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Result getAllRecordPlans(CameraInfo cameraInfo) throws Exception{
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
sb.append("{}");
|
||||||
|
String res = tumsApi.getAllRecordPlans(sb.toString());
|
||||||
|
JSONObject jsonObject = new JSONObject(res);
|
||||||
|
int errorCode = jsonObject.getInt("error_code");
|
||||||
|
if(errorCode == 0){
|
||||||
|
JSONArray result = jsonObject.getJSONArray("result");
|
||||||
|
List list = Lists.newArrayList();
|
||||||
|
if(result.size() == 0){
|
||||||
|
CameraInfo ci = new CameraInfo();
|
||||||
|
ci.setStorageDevId("1");
|
||||||
|
ci.setStorageDevName("全天候模板");
|
||||||
|
list.add(ci);
|
||||||
|
}else{
|
||||||
|
for(int i=0;i<result.size();i++){
|
||||||
|
JSONObject json = (JSONObject)result.get(i);
|
||||||
|
CameraInfo ci = new CameraInfo();
|
||||||
|
String recordPlanId = json.getStr("recordPlanId");
|
||||||
|
ci.setRecordPlanId(recordPlanId);
|
||||||
|
String planName = json.getStr("planName");
|
||||||
|
ci.setPlanName(planName);
|
||||||
|
list.add(ci);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Result.OK(list);
|
||||||
|
}else{
|
||||||
|
return Result.error("获取所有录像计划列表失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加录像计划
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Result addRecordCfgs(CameraInfo cameraInfo) throws Exception{
|
||||||
|
String ids = cameraInfo.getIds();
|
||||||
|
String[] idArr = ids.split(",");
|
||||||
|
StringBuffer idSb = new StringBuffer();
|
||||||
|
for(int i=0;i<idArr.length;i++){
|
||||||
|
idSb.append("\"").append(idArr[i]).append("\",");
|
||||||
|
}
|
||||||
|
String idsStr = idSb.toString();
|
||||||
|
if(idsStr.length()>0){
|
||||||
|
idsStr = idsStr.substring(0,idsStr.length()-1);
|
||||||
|
}
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
sb.append("{");
|
||||||
|
sb.append("\"devIds\"").append(":").append("[").append(idsStr).append("],");
|
||||||
|
sb.append("\"storageList\"").append(":").append("[");
|
||||||
|
sb.append("{");
|
||||||
|
if(cameraInfo.getStorageDevId()!=null&&!cameraInfo.getStorageDevId().equals("")){
|
||||||
|
//存储设备ID
|
||||||
|
sb.append("\"storageDevId\"").append(":").append(cameraInfo.getStorageDevId()).append(",");
|
||||||
|
if(cameraInfo.getStorageDevId().equals("0")){
|
||||||
|
sb.append("\"storageType\"").append(":").append("1").append(",");
|
||||||
|
}else{
|
||||||
|
sb.append("\"storageType\"").append(":").append("2").append(",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sb.append("\"recordPlanId\"").append(":").append(cameraInfo.getRecordPlanId()).append(",");
|
||||||
|
sb.append("\"streamType\"").append(":").append(cameraInfo.getStreamType());
|
||||||
|
sb.append("}");
|
||||||
|
sb.append("]");
|
||||||
|
sb.append("}");
|
||||||
|
String res = tumsApi.addRecordCfgs(sb.toString());
|
||||||
|
JSONObject jsonObject = new JSONObject(res);
|
||||||
|
int errorCode = jsonObject.getInt("error_code");
|
||||||
|
if(errorCode == 0){
|
||||||
|
for(int i=0;i<idArr.length;i++){
|
||||||
|
CameraInfo entity = new CameraInfo();
|
||||||
|
entity.setDeviceIndex(idArr[i]);
|
||||||
|
entity.setRecordPlanId(cameraInfo.getRecordPlanId());
|
||||||
|
baseMapper.updatePlanByDevId(entity);
|
||||||
|
}
|
||||||
|
return Result.OK("添加录像计划成功!计划生效有延迟,请刷新查看!");
|
||||||
|
}else{
|
||||||
|
return Result.error("添加录像计划失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -957,28 +1063,152 @@ public class CameraInfoServiceImpl extends ServiceImpl<CameraInfoMapper, CameraI
|
||||||
public Result setRecordCfgs(CameraInfo cameraInfo) throws Exception{
|
public Result setRecordCfgs(CameraInfo cameraInfo) throws Exception{
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
sb.append("{");
|
sb.append("{");
|
||||||
sb.append("\"ids\"").append(":").append("[").append(cameraInfo.getDeviceIndex()).append("],");
|
sb.append("\"ids\"").append(":").append("[").append(cameraInfo.getIds()).append("],");
|
||||||
sb.append("\"recordSwitch\"").append(":").append(cameraInfo.getRecordSwitch()).append(",");
|
// sb.append("\"streamType\"").append(":").append(cameraInfo.getStreamType()).append(",");
|
||||||
sb.append("\"streamType\"").append(":").append(cameraInfo.getStreamType()).append(",");
|
// if(cameraInfo.getStorageDevId()!=null&&!cameraInfo.getStorageDevId().equals("")&&!cameraInfo.getStorageDevId().equals("0")){
|
||||||
sb.append("\"recordPlanId\"").append(":").append("1,");
|
// //存储设备ID
|
||||||
if(cameraInfo.getParentId()!=null&&!cameraInfo.getParentId().equals("")&&!cameraInfo.getParentId().equals("0")){
|
// sb.append("\"storageDevId\"").append(":").append("\"").append(cameraInfo.getStorageDevId()).append("\",");
|
||||||
//存储设备ID
|
// }
|
||||||
sb.append("\"storageDevId\"").append(":").append("\"").append(cameraInfo.getParentId()).append("\"");
|
// sb.append("\"recordPlanId\"").append(":").append(cameraInfo.getRecordPlanId()).append(",");
|
||||||
}else{
|
sb.append("\"recordSwitch\"").append(":").append(cameraInfo.getRecordSwitch());
|
||||||
//SK卡,取自身设备ID
|
|
||||||
sb.append("\"storageDevId\"").append(":").append("\"").append(cameraInfo.getDeviceIndex()).append("\"");
|
|
||||||
}
|
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
String res = tumsApi.setRecordCfgs(sb.toString());
|
String res = tumsApi.setRecordCfgs(sb.toString());
|
||||||
JSONObject jsonObject = new JSONObject(res);
|
JSONObject jsonObject = new JSONObject(res);
|
||||||
int errorCode = jsonObject.getInt("error_code");
|
int errorCode = jsonObject.getInt("error_code");
|
||||||
if(errorCode == 0){
|
if(errorCode == 0){
|
||||||
return Result.OK("设置录像计划成功!");
|
return Result.OK("设置录像计划成功!计划生效有延迟,请刷新查看!");
|
||||||
}else{
|
}else{
|
||||||
return Result.error("设置录像计划失败!");
|
return Result.error("设置录像计划失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除录像计划
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Result delRecordCfgs(CameraInfo cameraInfo) throws Exception{
|
||||||
|
String ids = cameraInfo.getIds();
|
||||||
|
String devIds = cameraInfo.getDeviceIndex();
|
||||||
|
String[] idArr = ids.split(",");
|
||||||
|
String[] devIdArr = devIds.split(",");
|
||||||
|
StringBuffer idSb = new StringBuffer();
|
||||||
|
for(int i=0;i<idArr.length;i++){
|
||||||
|
idSb.append("\"").append(idArr[i]).append("\",");
|
||||||
|
}
|
||||||
|
String idsStr = idSb.toString();
|
||||||
|
if(idsStr.length()>0){
|
||||||
|
idsStr = idsStr.substring(0,idsStr.length()-1);
|
||||||
|
}
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
sb.append("{");
|
||||||
|
sb.append("\"ids\"").append(":").append("[").append(idsStr).append("]");
|
||||||
|
sb.append("}");
|
||||||
|
String res = tumsApi.delRecordCfgs(sb.toString());
|
||||||
|
JSONObject jsonObject = new JSONObject(res);
|
||||||
|
int errorCode = jsonObject.getInt("error_code");
|
||||||
|
if(errorCode == 0){
|
||||||
|
for(int i=0;i<devIdArr.length;i++){
|
||||||
|
CameraInfo entity = new CameraInfo();
|
||||||
|
entity.setDeviceIndex(devIdArr[i]);
|
||||||
|
entity.setRecordPlanId("-1");
|
||||||
|
baseMapper.updatePlanByDevId(entity);
|
||||||
|
}
|
||||||
|
return Result.OK("删除录像计划成功!计划生效有延迟,请刷新查看!");
|
||||||
|
}else{
|
||||||
|
return Result.error("删除录像计划失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取录像配置
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IPage<CameraInfo> getRecordCfgs(CameraInfo cameraInfo,Integer pageNo,Integer pageSize) throws Exception{
|
||||||
|
IPage<CameraInfo> page = new Page<>();
|
||||||
|
page.setSize(pageSize);
|
||||||
|
page.setCurrent(pageNo);
|
||||||
|
if(cameraInfo.getProjectId()==null||cameraInfo.getProjectId().equals("")){
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
if(cameraInfo.getRegionId()==null||cameraInfo.getRegionId().equals("")){
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
sb.append("{");
|
||||||
|
sb.append("\"start\"").append(":").append((pageNo-1)*pageSize).append(",");
|
||||||
|
sb.append("\"limit\"").append(":").append(pageSize).append(",");
|
||||||
|
sb.append("\"filterAnd\"").append(":").append("{");
|
||||||
|
sb.append("\"projectId\"").append(":").append("\"").append(cameraInfo.getProjectId()).append("\",");
|
||||||
|
sb.append("\"regionId\"").append(":").append("\"").append(cameraInfo.getRegionId()).append("\"");
|
||||||
|
sb.append("},");
|
||||||
|
sb.append("\"sort\"").append(":").append("[{");
|
||||||
|
sb.append("\"key\"").append(":").append("\"ip\",");
|
||||||
|
sb.append("\"value\"").append(":").append("\"desc\"");
|
||||||
|
sb.append("}]");
|
||||||
|
sb.append("}");
|
||||||
|
String res = tumsApi.getRecordCfgs(sb.toString());
|
||||||
|
JSONObject jsonObject = new JSONObject(res);
|
||||||
|
int errorCode = jsonObject.getInt("error_code");
|
||||||
|
if(errorCode == 0){
|
||||||
|
JSONObject result = (JSONObject)jsonObject.get("result");
|
||||||
|
Long total = result.getLong("total");
|
||||||
|
page.setTotal(total);
|
||||||
|
if(total>0){
|
||||||
|
List list = Lists.newArrayList();
|
||||||
|
JSONArray array = result.getJSONArray("list");
|
||||||
|
for(int i=0;i<array.size();i++){
|
||||||
|
CameraInfo ci = new CameraInfo();
|
||||||
|
JSONObject json = (JSONObject)array.get(i);
|
||||||
|
String devId = json.getStr("devId");
|
||||||
|
ci.setDeviceIndex(devId);
|
||||||
|
String devName = json.getStr("devName");
|
||||||
|
ci.setDeviceName(devName);
|
||||||
|
String ip = json.getStr("ip");
|
||||||
|
ci.setIp(ip);
|
||||||
|
JSONArray expand = json.getJSONArray("expand");
|
||||||
|
JSONObject expandJson = (JSONObject)expand.get(0);
|
||||||
|
String id = expandJson.getStr("id");
|
||||||
|
ci.setIds(id);
|
||||||
|
String recordSwitch = expandJson.getStr("recordSwitch");
|
||||||
|
ci.setRecordSwitch(recordSwitch);
|
||||||
|
if(recordSwitch.equals("1")){
|
||||||
|
ci.setRecordSwitchBoolean(true);
|
||||||
|
}else{
|
||||||
|
ci.setRecordSwitchBoolean(false);
|
||||||
|
}
|
||||||
|
int streamType = expandJson.getInt("streamType");
|
||||||
|
ci.setStreamType(streamType);
|
||||||
|
String recordPlanId = expandJson.getStr("recordPlanId");
|
||||||
|
ci.setRecordPlanId(recordPlanId);
|
||||||
|
String recordPlanName = expandJson.getStr("recordPlanName");
|
||||||
|
ci.setPlanName(recordPlanName);
|
||||||
|
String storageType = expandJson.getStr("storageType");
|
||||||
|
ci.setStorageType(storageType);
|
||||||
|
if(storageType.equals("0")){
|
||||||
|
ci.setStorageDevId("0");
|
||||||
|
ci.setStorageDevName("本设备");
|
||||||
|
}else{
|
||||||
|
String storageDevId = expandJson.getStr("storageDevId");
|
||||||
|
ci.setStorageDevId(storageDevId);
|
||||||
|
String storageDevName = expandJson.getStr("storageDevName");
|
||||||
|
ci.setStorageDevName(storageDevName);
|
||||||
|
}
|
||||||
|
list.add(ci);
|
||||||
|
}
|
||||||
|
page.setRecords(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取批量操作录像计划进度
|
* 获取批量操作录像计划进度
|
||||||
*
|
*
|
||||||
|
@ -990,7 +1220,7 @@ public class CameraInfoServiceImpl extends ServiceImpl<CameraInfoMapper, CameraI
|
||||||
public Result getBatchProgress(CameraInfo cameraInfo) throws Exception{
|
public Result getBatchProgress(CameraInfo cameraInfo) throws Exception{
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
sb.append("{");
|
sb.append("{");
|
||||||
sb.append("\"batchType\"").append(":1");
|
sb.append("\"batchType\"").append(":").append(cameraInfo.getBatchType());
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
String res = tumsApi.getBatchProgress(sb.toString());
|
String res = tumsApi.getBatchProgress(sb.toString());
|
||||||
JSONObject jsonObject = new JSONObject(res);
|
JSONObject jsonObject = new JSONObject(res);
|
||||||
|
|
|
@ -53,10 +53,14 @@ public enum ApiEnum {
|
||||||
IPC_SEARCH_VIDEO("/tums/playback/v3/searchVideo","搜索当天的录像数据V3"),
|
IPC_SEARCH_VIDEO("/tums/playback/v3/searchVideo","搜索当天的录像数据V3"),
|
||||||
IPC_ADD_PLAYBACK_CHN("/tums/playback/v2/addPlaybackChn","添加回放通道V2"),
|
IPC_ADD_PLAYBACK_CHN("/tums/playback/v2/addPlaybackChn","添加回放通道V2"),
|
||||||
IPC_GET_MULTITRANS_URL("/tums/playback/v1/getMultitransUrl","获取nvmp设备双向通信URL"),
|
IPC_GET_MULTITRANS_URL("/tums/playback/v1/getMultitransUrl","获取nvmp设备双向通信URL"),
|
||||||
/** =================>暂时无用 **/
|
IPC_ADD_RECORD_CFGS("/tums/record/v1/addRecordCfgs","添加录像配置"),
|
||||||
IPC_GET_RECORD_CFGS("/tums/record/v1/getRecordCfgs","获取录像配置"),
|
|
||||||
IPC_SET_RECORD_CFGS("/tums/record/v1/setRecordCfgs","设置录像计划"),
|
IPC_SET_RECORD_CFGS("/tums/record/v1/setRecordCfgs","设置录像计划"),
|
||||||
|
IPC_DEL_RECORD_CFGS("/tums/record/v1/delRecordCfgs","删除录像计划"),
|
||||||
|
IPC_GET_RECORD_CFGS("/tums/record/v1/getRecordCfgs","获取录像配置"),
|
||||||
IPC_GET_BATCH_PROGRESS("/tums/record/v1/getBatchProgress","获取批量操作录像计划进度"),
|
IPC_GET_BATCH_PROGRESS("/tums/record/v1/getBatchProgress","获取批量操作录像计划进度"),
|
||||||
|
IPC_GET_STORAGE_DEVICE("/tums/record/v1/getStorageDevice","获取存储设备列表"),
|
||||||
|
IPC_GET_ALL_RECORD_PLANS("/tums/record/v1/getAllRecordPlans","获取所有录像计划列表"),
|
||||||
|
/** =================>暂时无用 **/
|
||||||
IPC_MOTION_CTRL("/tums/ptz/v1/motionCtrl","高速球机移动方向控制"),
|
IPC_MOTION_CTRL("/tums/ptz/v1/motionCtrl","高速球机移动方向控制"),
|
||||||
IPC_GET_ALL_PRESETS("/tums/ptz/v1/getAllPresets","获取高速球机的所有预置点"),
|
IPC_GET_ALL_PRESETS("/tums/ptz/v1/getAllPresets","获取高速球机的所有预置点"),
|
||||||
IPC_OPERATE_PRESET("/tums/ptz/v1/operatePreset","操作高速球机的预置点"),
|
IPC_OPERATE_PRESET("/tums/ptz/v1/operatePreset","操作高速球机的预置点"),
|
||||||
|
|
|
@ -457,14 +457,15 @@ public class TumsApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取录像配置
|
* 添加录像计划
|
||||||
* @param jsonRequest
|
* @param jsonRequest
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getRecordCfgs(String jsonRequest){
|
public String addRecordCfgs(String jsonRequest){
|
||||||
this.createTumsClient();
|
this.createTumsClient();
|
||||||
String jsonResponse = tumsClient.request(jsonRequest, ApiEnum.IPC_GET_RECORD_CFGS.getValue());
|
log.info("addRecordCfgs:request:{}",jsonRequest);
|
||||||
log.info("getRecordCfgs:{}",jsonResponse);
|
String jsonResponse = tumsClient.request(jsonRequest, ApiEnum.IPC_ADD_RECORD_CFGS.getValue());
|
||||||
|
log.info("addRecordCfgs:response:{}",jsonResponse);
|
||||||
return jsonResponse;
|
return jsonResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -475,8 +476,35 @@ public class TumsApi {
|
||||||
*/
|
*/
|
||||||
public String setRecordCfgs(String jsonRequest){
|
public String setRecordCfgs(String jsonRequest){
|
||||||
this.createTumsClient();
|
this.createTumsClient();
|
||||||
|
log.info("setRecordCfgs:request:{}",jsonRequest);
|
||||||
String jsonResponse = tumsClient.request(jsonRequest, ApiEnum.IPC_SET_RECORD_CFGS.getValue());
|
String jsonResponse = tumsClient.request(jsonRequest, ApiEnum.IPC_SET_RECORD_CFGS.getValue());
|
||||||
log.info("setRecordCfgs:{}",jsonResponse);
|
log.info("setRecordCfgs:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除录像计划
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String delRecordCfgs(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("delRecordCfgs:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, ApiEnum.IPC_DEL_RECORD_CFGS.getValue());
|
||||||
|
log.info("delRecordCfgs:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取录像配置
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getRecordCfgs(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("getRecordCfgs:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, ApiEnum.IPC_GET_RECORD_CFGS.getValue());
|
||||||
|
log.info("getRecordCfgs:response:{}",jsonResponse);
|
||||||
return jsonResponse;
|
return jsonResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -487,8 +515,35 @@ public class TumsApi {
|
||||||
*/
|
*/
|
||||||
public String getBatchProgress(String jsonRequest){
|
public String getBatchProgress(String jsonRequest){
|
||||||
this.createTumsClient();
|
this.createTumsClient();
|
||||||
|
log.info("getBatchProgress:request:{}",jsonRequest);
|
||||||
String jsonResponse = tumsClient.request(jsonRequest, ApiEnum.IPC_GET_BATCH_PROGRESS.getValue());
|
String jsonResponse = tumsClient.request(jsonRequest, ApiEnum.IPC_GET_BATCH_PROGRESS.getValue());
|
||||||
log.info("getBatchProgress:{}",jsonResponse);
|
log.info("getBatchProgress:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取存储设备列表
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getStorageDevice(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("getStorageDevice:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, ApiEnum.IPC_GET_STORAGE_DEVICE.getValue());
|
||||||
|
log.info("getStorageDevice:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有录像计划列表
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getAllRecordPlans(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("getAllRecordPlans:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, ApiEnum.IPC_GET_ALL_RECORD_PLANS.getValue());
|
||||||
|
log.info("getAllRecordPlans:response:{}",jsonResponse);
|
||||||
return jsonResponse;
|
return jsonResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue