Merge branch 'master' of http://47.115.223.229:8888/yangjun/nursing_unit_java
This commit is contained in:
commit
e14fc99fdb
|
@ -0,0 +1,363 @@
|
||||||
|
package com.nu.modules.iot.tplink.controller;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
||||||
|
import com.nu.modules.iot.tplink.entity.AppCameraInfo;
|
||||||
|
import com.nu.modules.iot.tplink.service.IAppCameraInfoService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元-物联管理-摄像头信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-01-17
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="护理单元-物联管理-摄像头信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/nuIpadApi/iot/tplink/cameraInfo")
|
||||||
|
@Slf4j
|
||||||
|
public class AppCameraInfoController extends JeecgController<AppCameraInfo, IAppCameraInfoService> {
|
||||||
|
@Autowired
|
||||||
|
private IAppCameraInfoService service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param CameraInfo
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "护理单元-物联管理-摄像头信息-分页列表查询")
|
||||||
|
@ApiOperation(value="护理单元-物联管理-摄像头信息-分页列表查询", notes="护理单元-物联管理-摄像头信息-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<AppCameraInfo>> queryPageList(AppCameraInfo CameraInfo,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
Page<AppCameraInfo> page = new Page<AppCameraInfo>(pageNo, pageSize);
|
||||||
|
IPage<AppCameraInfo> pageList = service.findPage(page, CameraInfo);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value="护理单元分页列表查询", notes="护理单元分页列表查询")
|
||||||
|
@GetMapping(value = "/nuList")
|
||||||
|
public Result<IPage<AppCameraInfo>> queryNuPageList(AppCameraInfo CameraInfo,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
Page<AppCameraInfo> page = new Page<AppCameraInfo>(pageNo, pageSize);
|
||||||
|
IPage<AppCameraInfo> pageList = service.findNuPage(page, CameraInfo);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value="护理单元-物联管理-摄像头信息-查询", notes="护理单元-物联管理-摄像头信息-查询")
|
||||||
|
@GetMapping(value = "/getByNuId")
|
||||||
|
public Result<AppCameraInfo> getByNuId(AppCameraInfo CameraInfo) {
|
||||||
|
AppCameraInfo entity = service.getByNuId(CameraInfo);
|
||||||
|
return Result.OK(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重启摄像头
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/rebootDevice", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> rebootDevice(@RequestBody AppCameraInfo cameraInfo) {
|
||||||
|
service.rebootDevice(cameraInfo);
|
||||||
|
return Result.OK("重启成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取画面基本信息
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/getImageCommon")
|
||||||
|
public Result<JSONObject> getImageCommon(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.getImageCommon(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置画面基本信息
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/setImageCommon")
|
||||||
|
public Result setImageCommon(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.setImageCommon(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取OSD能力集
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/getOsdCapability")
|
||||||
|
public Result<JSONObject> getOsdCapability(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.getOsdCapability(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取OSD参数
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/getOsd")
|
||||||
|
public Result<JSONObject> getOsd(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.getOsd(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置OSD参数
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/setOsd")
|
||||||
|
public Result<String> setOsd(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.setOsd(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取码率参数
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/getVideoParams")
|
||||||
|
public Result<JSONObject> getVideoParams(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.getVideoParams(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置码率参数
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/setVideoParams")
|
||||||
|
public Result setVideoParams(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.setVideoParams(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 恢复画面默认值
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/configRecovery")
|
||||||
|
public Result configRecovery(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.configRecovery(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取摄像头实时播放地址
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getPreviewUrl")
|
||||||
|
public Result<Map<String,String>> getPreviewUrl(AppCameraInfo cameraInfo) {
|
||||||
|
return service.getPreviewUrl(cameraInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取镜头遮挡参数
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/getTamperDet")
|
||||||
|
public Result<JSONObject> getTamperDet(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.getTamperDet(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置镜头遮挡参数
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/setTamperDet")
|
||||||
|
public Result<String> setTamperDet(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.setTamperDet(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取镜头遮挡处理方式
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/getTamperNotif")
|
||||||
|
public Result<JSONObject> getTamperNotif(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.getTamperNotif(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置镜头遮挡处理方式
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/setTamperNotif")
|
||||||
|
public Result setTamperNotif(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.setTamperNotif(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警声音试听
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/testAudio")
|
||||||
|
public Result testAudio(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.testAudio(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取白光/声音告警参数
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/getAlarmInfo")
|
||||||
|
public Result<JSONObject> getAlarmInfo(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.getAlarmInfo(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置白光/声音告警参数
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/setAlarmInfo")
|
||||||
|
public Result<String> setAlarmInfo(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.setAlarmInfo(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取白光/声音告警布防时间
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/getAlarmPlan")
|
||||||
|
public Result<JSONObject> getAlarmPlan(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.getAlarmPlan(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置白光/声音告警布防时间
|
||||||
|
*
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/setAlarmPlan")
|
||||||
|
public Result setAlarmPlan(@RequestBody Map<String,Object> map) {
|
||||||
|
return service.setAlarmPlan(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索某天的录像数据
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/searchVideo")
|
||||||
|
public Result<IPage<AppCameraInfo>> searchVideo(AppCameraInfo cameraInfo,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
return service.searchVideo(pageNo, pageSize, cameraInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取摄像头录像回放地址
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getPlaybackUrlList")
|
||||||
|
public Result<Map<String,Object>> getPlaybackUrlList(AppCameraInfo cameraInfo) {
|
||||||
|
return service.getPlaybackUrlList(cameraInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除回放通道
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/deletePlaybackChn")
|
||||||
|
public Result<String> deletePlaybackChn(AppCameraInfo cameraInfo) {
|
||||||
|
return service.deletePlaybackChn(cameraInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取摄像头录像回放地址
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getMultitransUrl")
|
||||||
|
public Result<Map<String,Object>> getMultitransUrl(AppCameraInfo cameraInfo) throws Exception{
|
||||||
|
return service.getMultitransUrl(cameraInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回放视频转mp4上传
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/uploadToServer")
|
||||||
|
public Result uploadToServer(AppCameraInfo cameraInfo) throws Exception{
|
||||||
|
return service.uploadToServer(cameraInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停止转存MP4上传任务
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/stopUploadToServer")
|
||||||
|
public Result<String> stopUploadToServer(AppCameraInfo cameraInfo) throws Exception{
|
||||||
|
return service.stopUploadToServer(cameraInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取转存MP4上传任务进度
|
||||||
|
*
|
||||||
|
* @param cameraInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getUploadToServerProcess")
|
||||||
|
public Result getUploadToServerProcess(AppCameraInfo cameraInfo) throws Exception{
|
||||||
|
return service.getUploadToServerProcess(cameraInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,281 @@
|
||||||
|
package com.nu.modules.iot.tplink.entity;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元-物联管理-TPLINK摄像头信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-01-17
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("nu_iot_tplink_camera")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="nu_iot_tplink_camera对象", description="护理单元-物联管理-TPLINK摄像头信息")
|
||||||
|
public class AppCameraInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**ID*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
private Integer id;
|
||||||
|
/**设备序号*/
|
||||||
|
@Excel(name = "设备序号", width = 15)
|
||||||
|
@ApiModelProperty(value = "设备序号")
|
||||||
|
private String deviceIndex;
|
||||||
|
/**设备名称*/
|
||||||
|
@Excel(name = "设备名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "设备名称")
|
||||||
|
private String deviceName;
|
||||||
|
/**设备类型*/
|
||||||
|
@Excel(name = "设备类型", width = 15)
|
||||||
|
@ApiModelProperty(value = "设备类型")
|
||||||
|
private String deviceType;
|
||||||
|
/**设备状态 0 离线 1 在线 2 重启中 3 升级中 4 配置中 5 同步中*/
|
||||||
|
@Excel(name = "设备状态 0 离线 1 在线 2 重启中 3 升级中 4 配置中 5 同步中", width = 15, dicCode = "tplink_status")
|
||||||
|
@Dict(dicCode = "tplink_status")
|
||||||
|
@ApiModelProperty(value = "设备状态 0 离线 1 在线 2 重启中 3 升级中 4 配置中 5 同步中")
|
||||||
|
private String deviceStatus;
|
||||||
|
/**设备型号*/
|
||||||
|
@Excel(name = "设备型号", width = 15)
|
||||||
|
@ApiModelProperty(value = "设备型号")
|
||||||
|
private String deviceModel;
|
||||||
|
/**IP地址*/
|
||||||
|
@Excel(name = "IP地址", width = 15)
|
||||||
|
@ApiModelProperty(value = "IP地址")
|
||||||
|
private String ip;
|
||||||
|
/**MAC地址*/
|
||||||
|
@Excel(name = "MAC地址", width = 15)
|
||||||
|
@ApiModelProperty(value = "MAC地址")
|
||||||
|
private String mac;
|
||||||
|
/**分组ID*/
|
||||||
|
@Excel(name = "分组ID", width = 15)
|
||||||
|
@ApiModelProperty(value = "分组ID")
|
||||||
|
private String regionId;
|
||||||
|
/**分组名称*/
|
||||||
|
@Excel(name = "分组名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "分组名称")
|
||||||
|
private String regionName;
|
||||||
|
/**父设备ID*/
|
||||||
|
@Excel(name = "父设备ID", width = 15)
|
||||||
|
@ApiModelProperty(value = "父设备ID")
|
||||||
|
private String parentId;
|
||||||
|
/**父设备名称*/
|
||||||
|
@Excel(name = "父设备名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "父设备名称")
|
||||||
|
private String parentDeviceName;
|
||||||
|
/**项目ID*/
|
||||||
|
@Excel(name = "项目ID", width = 15)
|
||||||
|
@ApiModelProperty(value = "项目ID")
|
||||||
|
private String projectId;
|
||||||
|
/**项目名称*/
|
||||||
|
@Excel(name = "项目名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "项目名称")
|
||||||
|
private String projectName;
|
||||||
|
/**软件版本*/
|
||||||
|
@Excel(name = "软件版本", width = 15)
|
||||||
|
@ApiModelProperty(value = "软件版本")
|
||||||
|
private String firmwareVer;
|
||||||
|
/**硬件版本*/
|
||||||
|
@Excel(name = "硬件版本", width = 15)
|
||||||
|
@ApiModelProperty(value = "硬件版本")
|
||||||
|
private String hardwareVer;
|
||||||
|
/**用户权限类型 -1 无权限 0 可读 1 可控制 2 可配置 3 可控制/配置 4 所有*/
|
||||||
|
@Excel(name = "用户权限类型 -1 无权限 0 可读 1 可控制 2 可配置 3 可控制/配置 4 所有", width = 15, dicCode = "tplink_manager_auth_type")
|
||||||
|
@Dict(dicCode = "tplink_manager_auth_type")
|
||||||
|
@ApiModelProperty(value = "用户权限类型 -1 无权限 0 可读 1 可控制 2 可配置 3 可控制/配置 4 所有")
|
||||||
|
private String managerAuthType;
|
||||||
|
/**告警消息权限 1 有权限 -1 无权限*/
|
||||||
|
@Excel(name = "告警消息权限 1 有权限 -1 无权限", width = 15, dicCode = "tplink_msg_auth_type")
|
||||||
|
@Dict(dicCode = "tplink_msg_auth_type")
|
||||||
|
@ApiModelProperty(value = "告警消息权限 1 有权限 -1 无权限")
|
||||||
|
private String msgAuthType;
|
||||||
|
/**扩展信息*/
|
||||||
|
@Excel(name = "扩展信息", width = 15)
|
||||||
|
@ApiModelProperty(value = "扩展信息")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private JSONObject extend;
|
||||||
|
/**国标编码*/
|
||||||
|
@Excel(name = "国标编码", width = 15)
|
||||||
|
@ApiModelProperty(value = "国标编码")
|
||||||
|
private String sipCode;
|
||||||
|
/**位置名称*/
|
||||||
|
@Excel(name = "位置名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "位置名称")
|
||||||
|
private String locationName;
|
||||||
|
/**系统类型 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")
|
||||||
|
@Dict(dicCode = "tplink_system_type")
|
||||||
|
@ApiModelProperty(value = "系统类型 public 通用 vms 监控 nms 网络 evcs 新能源充电桩 rms 客控 nbs 音箱 bas 楼控 ams 门禁 smart_agriculture 智慧农业 vps 停车管理 aaa 认证计费")
|
||||||
|
private String systemType;
|
||||||
|
/**协议类型*/
|
||||||
|
@Excel(name = "协议类型", width = 15)
|
||||||
|
@ApiModelProperty(value = "协议类型")
|
||||||
|
private String protocol;
|
||||||
|
/**置顶的时间*/
|
||||||
|
@Excel(name = "用户设置置顶的时间,毫秒级时间戳", width = 15)
|
||||||
|
@ApiModelProperty(value = "用户设置置顶的时间,毫秒级时间戳")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String topTime;
|
||||||
|
/**护理单元*/
|
||||||
|
@ApiModelProperty(value = "护理单元ID")
|
||||||
|
@Dict(dictTable ="nu_base_info",dicText = "nu_name",dicCode = "id")
|
||||||
|
private String nuId;
|
||||||
|
/**护理单元*/
|
||||||
|
@ApiModelProperty(value = "护理单元")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String nuName;
|
||||||
|
@ApiModelProperty(value = "码流类型 0 代表主码流,1 代码子码流")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private int streamType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 能力集属性 ==>
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "运动检测")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String motionDetection;
|
||||||
|
@ApiModelProperty(value = "视频封面")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String videoCover;
|
||||||
|
@ApiModelProperty(value = "云台")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String ptz;
|
||||||
|
@ApiModelProperty(value = "motor")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String motor;
|
||||||
|
@ApiModelProperty(value = "smartCode")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String smartCode;
|
||||||
|
@ApiModelProperty(value = "强制在H.264编码过程中生成IDR帧的函数")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String forceIdrFrame;
|
||||||
|
@ApiModelProperty(value = "音频")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String audio;
|
||||||
|
@ApiModelProperty(value = "本地存储")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String localStorage;
|
||||||
|
@ApiModelProperty(value = "回放API本版")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String playbackApiVersionTwo;
|
||||||
|
@ApiModelProperty(value = "多变性")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String multitrans;
|
||||||
|
@ApiModelProperty(value = "客流")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String passengerFlow;
|
||||||
|
@ApiModelProperty(value = "获取预览缩略图")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String getPreviewThumbnail;
|
||||||
|
@ApiModelProperty(value = "JPG预览缩略图")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String previewThumbnailJpeg;
|
||||||
|
@ApiModelProperty(value = "走廊")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String corridorMod;
|
||||||
|
@ApiModelProperty(value = "背光共存")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String backlightCoexistence;
|
||||||
|
/**
|
||||||
|
* <== 能力集属性
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "查询日期")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dataDate;
|
||||||
|
@ApiModelProperty(value = "设备索引")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String videoDevId;
|
||||||
|
@ApiModelProperty(value = "存储设备ID")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String storageDevId;
|
||||||
|
@ApiModelProperty(value = "存储设备名称")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String storageDevName;
|
||||||
|
@ApiModelProperty(value = "双摄IPC通道ID,双摄IPC的全景摄像头,其值为0.双摄IPC的特写摄像头,其值为1")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String channelId;
|
||||||
|
@ApiModelProperty(value = "当录像存在存储池中, 录像所属的nvs的ID")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String nvsIdInPoolList;
|
||||||
|
@ApiModelProperty(value = "录像开始时间. GMT时间,即1970.1.1零时至今的秒数")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String startTime;
|
||||||
|
@ApiModelProperty(value = "录像结束时间. GMT时间,即1970.1.1零时至今的秒数")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String endTime;
|
||||||
|
@ApiModelProperty(value = "录像开始时间,YYYY-MM-DD HH:MI:SS")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String startTimeFt;
|
||||||
|
@ApiModelProperty(value = "录像结束时间,YYYY-MM-DD HH:MI:SS")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String endTimeFt;
|
||||||
|
@ApiModelProperty(value = "录像时长,HH:MI:SS")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String duration;
|
||||||
|
@ApiModelProperty(value = "回放录像类型。1: 定时录像; 2: 移动侦测等")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String videoType;
|
||||||
|
@ApiModelProperty(value = "录像片段大小,单位字节")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String size;
|
||||||
|
@ApiModelProperty(value = "错误码")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String errorCode;
|
||||||
|
@ApiModelProperty(value = "错误描述")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String errorMsg;
|
||||||
|
@ApiModelProperty(value = "录像存储设备类型 -1:未找到,0:ipc,1:nvr,2:nvs:3:server,4:vcs,5:storagePool")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String storageType;
|
||||||
|
@ApiModelProperty(value = "预览/回放url")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String url;
|
||||||
|
@ApiModelProperty(value = "预览/回放备用url")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String backupUrl;
|
||||||
|
@ApiModelProperty(value = "ws连接传输视频地址")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String wsUrl;
|
||||||
|
@ApiModelProperty(value = "wss接传输视频地址")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String wssUrl;
|
||||||
|
@ApiModelProperty(value = "预览/回放通道对应的sessionId")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String sessionId;
|
||||||
|
@ApiModelProperty(value = "双摄IPC通道ID")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String videoChannelId;
|
||||||
|
@ApiModelProperty(value = "回放速率")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String scale;
|
||||||
|
@ApiModelProperty(value = "回放api访问前缀")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String queryAddress;
|
||||||
|
@ApiModelProperty(value = "录像开关;枚举:[0:表示关,1:表示开]")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String recordSwitch;
|
||||||
|
@ApiModelProperty(value = "任务taskId")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String taskId;
|
||||||
|
@ApiModelProperty(value = "上传mp4文件名称")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String fileName;
|
||||||
|
@ApiModelProperty(value = "上传进度")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String process;
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.nu.modules.iot.tplink.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元-物联管理-TPLINK错误码
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("nu_iot_tplink_error_code")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="nu_iot_tplink_error_code对象", description="护理单元-物联管理-TPLINK错误码")
|
||||||
|
public class AppErrorCode implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**错误码*/
|
||||||
|
@Excel(name = "错误码", width = 15)
|
||||||
|
@ApiModelProperty(value = "错误码")
|
||||||
|
private String errorCode;
|
||||||
|
/**错误描述*/
|
||||||
|
@Excel(name = "错误描述", width = 15)
|
||||||
|
@ApiModelProperty(value = "错误描述")
|
||||||
|
private String errorMsg;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
package com.nu.modules.iot.tplink.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元-物联管理-TPLINK图门系统配置信息
|
||||||
|
* @Author: caolei
|
||||||
|
* @Date: 2025-03-31
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("nu_iot_tplink_tums_base")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="nu_iot_tplink_tums_base", description="护理单元-物联管理-TPLINK图门系统配置信息")
|
||||||
|
public class AppTumsConfig implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**ID*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
private Integer id;
|
||||||
|
private String tumsUrl; //获取图门系统地址
|
||||||
|
private String tumsProjectId; //图门系统登录项目ID
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String tumsProjectName; //图门系统登录项目ID
|
||||||
|
private String tumsUserId; // 图门系统登录用户ID
|
||||||
|
private String tumsUsername; // 获取图门系统用户
|
||||||
|
private String tumsPassword; //获取图门系统密码
|
||||||
|
private String tumsRoleId; //图门系统角色ID
|
||||||
|
private String ftpIp; //回放视频转FTP上传IP
|
||||||
|
private String ftpPort; //回放视频转FTP上传端口
|
||||||
|
private String ftpUsername; //回放视频转FTP上传用户
|
||||||
|
private String ftpPassword; //回放视频转FTP上传密码
|
||||||
|
private String ftpUploadpath; //回放视频转FTP上传路径
|
||||||
|
private String orgCode; //机构编码
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.nu.modules.iot.tplink.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口枚举类
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public enum AppApiEnum {
|
||||||
|
//前缀对应相应设备的API,无前缀则是公用API
|
||||||
|
//IPC 视频
|
||||||
|
//NVS 存储服务器
|
||||||
|
//AUDIO 音箱
|
||||||
|
//ROUTER 路由器
|
||||||
|
//SWITCH 交换机
|
||||||
|
//AP 无线路由器
|
||||||
|
//AC ⽆线控制器
|
||||||
|
|
||||||
|
GET_ENCRYPT_KEY_FOR_LOGIN("/tums/account/v1/getEncryptKeyForLogin","获取登录公钥"),
|
||||||
|
LOGIN("/tums/account/v2/login","登录"),
|
||||||
|
LOGOUT("/tums/account/v1/logout","注销"),
|
||||||
|
SET_CURRENT_PROJECT("/tums/resource/v2/setCurrentProject","设置当前项目"),
|
||||||
|
REBOOT_DEVICE_LIST("/tums/deviceManager/v2/rebootDeviceList","重启设备"),
|
||||||
|
IPC_PASSTHROUGH("/tums/devConfig/v1/passthrough","设备配置信息"),
|
||||||
|
IPC_ADD_PREVIEW_CHN("/tums/preview/v1/addPreviewChn","添加预览通道"),
|
||||||
|
IPC_GET_PREVIEW_URL("/tums/preview/v1/getPreviewUrl","获取预览通道的url"),
|
||||||
|
IPC_GET_PLAYBACK_URL("/tums/playback/v1/getPlaybackUrl","获取回放通道的url"),
|
||||||
|
IPC_SUSPEND_PLAYBACK("/tums/playback/v1/suspendPlayback","暂停通道回放"),
|
||||||
|
IPC_DELETE_PLAYBACK_CHN("/tums/playback/v1/deletePlaybackChn","删除回放通道"),
|
||||||
|
IPC_GET_STORAGES_BY_ID("/tums/playback/v1/getStoragesById","获取指定监控点的存储设备列表"),
|
||||||
|
IPC_SEARCH_VIDEO("/tums/playback/v3/searchVideo","搜索当天的录像数据V3"),
|
||||||
|
IPC_ADD_PLAYBACK_CHN("/tums/playback/v2/addPlaybackChn","添加回放通道V2"),
|
||||||
|
IPC_GET_MULTITRANS_URL("/tums/playback/v1/getMultitransUrl","获取nvmp设备双向通信URL"),
|
||||||
|
IPC_UPLOAD_TO_SERVER("/tums/playback/v1/uploadToServer","回放视频转mp4上传"),
|
||||||
|
IPC_STOP_UPLOAD_TO_SERVER("/tums/preview/v1/stopUploadToServer","停止转存MP4上传任务"),
|
||||||
|
IPC_GET_UPLOAD_TO_SERVER_PROCESS("/tums/preview/v1/getUploadToServerProcess","获取转存MP4上传任务进度");
|
||||||
|
|
||||||
|
private final String value;//自定义属性,枚举值,获取:如ApiEnum.GET_ENCRYPT_KEY_FOR_LOGIN.getValue();
|
||||||
|
private final String remark;//自定义属性,枚举描述,获取:如ApiEnum.GET_ENCRYPT_KEY_FOR_LOGIN.getRemark();
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.nu.modules.iot.tplink.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.nu.modules.iot.tplink.entity.AppCameraInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元-物联管理-摄像头信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-01-17
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface AppCameraInfoMapper extends BaseMapper<AppCameraInfo> {
|
||||||
|
IPage<AppCameraInfo> findPage(Page<AppCameraInfo> page, @Param("params") AppCameraInfo cameraInfo);
|
||||||
|
List<AppCameraInfo> findAllList();
|
||||||
|
IPage<AppCameraInfo> findNuPage(Page<AppCameraInfo> page, @Param("params") AppCameraInfo cameraInfo);
|
||||||
|
AppCameraInfo getByDeviceId(AppCameraInfo cameraInfo);
|
||||||
|
AppCameraInfo getByNuId(AppCameraInfo cameraInfo);
|
||||||
|
AppCameraInfo getCapabilityByDeviceId(AppCameraInfo cameraInfo);
|
||||||
|
void insertCapability(AppCameraInfo cameraInfo);
|
||||||
|
void updateCapabilityById(AppCameraInfo cameraInfo);
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.nu.modules.iot.tplink.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.nu.modules.iot.tplink.entity.AppErrorCode;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元-物联管理-错误码
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface AppErrorCodeMapper extends BaseMapper<AppErrorCode> {
|
||||||
|
AppErrorCode getByCode(String errorCode);
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.nu.modules.iot.tplink.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.nu.modules.iot.tplink.entity.AppTumsConfig;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元-物联管理-错误码
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface AppTumsConfigMapper extends BaseMapper<AppTumsConfig> {
|
||||||
|
AppTumsConfig getByCode(String orgCode);
|
||||||
|
AppTumsConfig findProjectByCodeOrId(AppTumsConfig tumsConfig);
|
||||||
|
}
|
|
@ -0,0 +1,246 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.nu.modules.iot.tplink.mapper.AppCameraInfoMapper">
|
||||||
|
|
||||||
|
<select id="findPage" parameterType="com.nu.modules.iot.tplink.entity.AppCameraInfo" resultType="com.nu.modules.iot.tplink.entity.AppCameraInfo">
|
||||||
|
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,
|
||||||
|
a.nu_id as nuId,
|
||||||
|
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
|
||||||
|
left join nu_iot_tplink_camera_capability c on a.device_index = c.device_index
|
||||||
|
<where>
|
||||||
|
<if test="params.deviceIndex != null and params.deviceIndex != ''">
|
||||||
|
AND a.device_index = #{params.deviceIndex}
|
||||||
|
</if>
|
||||||
|
<if test="params.deviceStatus != null and params.deviceStatus != ''">
|
||||||
|
AND a.device_status = #{params.deviceStatus}
|
||||||
|
</if>
|
||||||
|
<if test="params.deviceName != null and params.deviceName != ''">
|
||||||
|
AND a.device_name = #{params.deviceName}
|
||||||
|
</if>
|
||||||
|
<if test="params.projectName != null and params.projectName != ''">
|
||||||
|
AND a.project_name LIKE concat('%',#{params.projectName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.regionName != null and params.regionName != ''">
|
||||||
|
AND a.region_name LIKE concat('%',#{params.regionName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.nuName != null and params.nuName != ''">
|
||||||
|
AND b.nu_name LIKE concat('%',#{params.nuName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.projectId != null and params.projectId != ''">
|
||||||
|
AND a.project_id = #{params.projectId}
|
||||||
|
</if>
|
||||||
|
<if test="params.regionId != null and params.regionId != ''">
|
||||||
|
AND a.region_id = #{params.regionId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findAllList" parameterType="com.nu.modules.iot.tplink.entity.AppCameraInfo" resultType="com.nu.modules.iot.tplink.entity.AppCameraInfo">
|
||||||
|
select a.id,
|
||||||
|
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,
|
||||||
|
nu_id as nuId
|
||||||
|
from nu_iot_tplink_camera a
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findNuPage" parameterType="com.nu.modules.iot.tplink.entity.AppCameraInfo" resultType="com.nu.modules.iot.tplink.entity.AppCameraInfo">
|
||||||
|
select
|
||||||
|
id as nuId,
|
||||||
|
nu_name as nuName
|
||||||
|
from nu_base_info b
|
||||||
|
<where>
|
||||||
|
<if test="params.nuId != null and params.nuId != ''">
|
||||||
|
AND b.id = #{params.nuId}
|
||||||
|
</if>
|
||||||
|
<if test="params.nuName != null and params.nuName != ''">
|
||||||
|
AND b.nu_name LIKE concat('%',#{params.nuName},'%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByDeviceId" parameterType="com.nu.modules.iot.tplink.entity.AppCameraInfo" resultType="com.nu.modules.iot.tplink.entity.AppCameraInfo">
|
||||||
|
select a.id,
|
||||||
|
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,
|
||||||
|
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 device_index = #{deviceIndex}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getByNuId" parameterType="com.nu.modules.iot.tplink.entity.AppCameraInfo" resultType="com.nu.modules.iot.tplink.entity.AppCameraInfo">
|
||||||
|
select a.id,
|
||||||
|
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,
|
||||||
|
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 a.nu_id = #{nuId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getCapabilityByDeviceId" parameterType="com.nu.modules.iot.tplink.entity.AppCameraInfo" resultType="com.nu.modules.iot.tplink.entity.AppCameraInfo">
|
||||||
|
select a.id,
|
||||||
|
device_index as deviceIndex,
|
||||||
|
motion_detection as motionDetection,
|
||||||
|
video_cover as videoCover,
|
||||||
|
ptz,
|
||||||
|
motor,
|
||||||
|
smart_code as smartCode,
|
||||||
|
force_idr_frame as forceIdrFrame,
|
||||||
|
audio,
|
||||||
|
local_storage as localStorage,
|
||||||
|
playback_api_version_two as playbackApiVersionTwo,
|
||||||
|
multitrans,
|
||||||
|
passenger_flow as passengerFlow,
|
||||||
|
get_preview_thumbnail as getPreviewThumbnail,
|
||||||
|
preview_thumbnail_jpeg as previewThumbnailJpeg,
|
||||||
|
corridor_mod as corridorMod,
|
||||||
|
backlight_coexistence as backlightCoexistence
|
||||||
|
from nu_iot_tplink_camera_capability a
|
||||||
|
where device_index = #{deviceIndex}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertCapability">
|
||||||
|
insert into nu_iot_tplink_camera_capability (
|
||||||
|
id,
|
||||||
|
device_index,
|
||||||
|
motion_detection,
|
||||||
|
video_cover,
|
||||||
|
ptz,
|
||||||
|
motor,
|
||||||
|
smart_code,
|
||||||
|
force_idr_frame,
|
||||||
|
audio,
|
||||||
|
local_storage,
|
||||||
|
playback_api_version_two,
|
||||||
|
multitrans,
|
||||||
|
passenger_flow,
|
||||||
|
get_preview_thumbnail,
|
||||||
|
preview_thumbnail_jpeg,
|
||||||
|
corridor_mod,
|
||||||
|
backlight_coexistence
|
||||||
|
)
|
||||||
|
values (
|
||||||
|
#{id},
|
||||||
|
#{deviceIndex},
|
||||||
|
#{motionDetection},
|
||||||
|
#{videoCover},
|
||||||
|
#{ptz},
|
||||||
|
#{motor},
|
||||||
|
#{smartCode},
|
||||||
|
#{forceIdrFrame},
|
||||||
|
#{audio},
|
||||||
|
#{localStorage},
|
||||||
|
#{playbackApiVersionTwo},
|
||||||
|
#{multitrans},
|
||||||
|
#{passengerFlow},
|
||||||
|
#{getPreviewThumbnail},
|
||||||
|
#{previewThumbnailJpeg},
|
||||||
|
#{corridorMod},
|
||||||
|
#{backlightCoexistence}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateCapabilityById">
|
||||||
|
UPDATE nu_iot_tplink_camera_capability
|
||||||
|
SET
|
||||||
|
device_index = #{deviceIndex},
|
||||||
|
motion_detection = #{motionDetection},
|
||||||
|
video_cover = #{videoCover},
|
||||||
|
ptz = #{ptz},
|
||||||
|
motor = #{motor},
|
||||||
|
smart_code = #{smartCode},
|
||||||
|
force_idr_frame = #{forceIdrFrame},
|
||||||
|
audio = #{audio},
|
||||||
|
local_storage = #{localStorage},
|
||||||
|
playback_api_version_two = #{playbackApiVersionTwo},
|
||||||
|
multitrans = #{multitrans},
|
||||||
|
passenger_flow = #{passengerFlow},
|
||||||
|
get_preview_thumbnail = #{getPreviewThumbnail},
|
||||||
|
preview_thumbnail_jpeg = #{previewThumbnailJpeg},
|
||||||
|
corridor_mod = #{corridorMod},
|
||||||
|
backlight_coexistence = #{backlightCoexistence}
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.nu.modules.iot.tplink.mapper.AppErrorCodeMapper">
|
||||||
|
|
||||||
|
<select id="getByCode" parameterType="String" resultType="com.nu.modules.iot.tplink.entity.AppErrorCode">
|
||||||
|
select
|
||||||
|
error_code as errorCode,
|
||||||
|
error_msg as errorMsg
|
||||||
|
from nu_iot_tplink_error_code
|
||||||
|
where error_code = #{errorCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.nu.modules.iot.tplink.mapper.AppTumsConfigMapper">
|
||||||
|
|
||||||
|
<select id="getByCode" parameterType="String" resultType="com.nu.modules.iot.tplink.entity.AppTumsConfig">
|
||||||
|
select
|
||||||
|
id,
|
||||||
|
tums_url as tumsUrl,
|
||||||
|
tums_project_id as tumsProjectId,
|
||||||
|
tums_userId as tumsUserId,
|
||||||
|
tums_username as tumsUsername,
|
||||||
|
tums_password as tumsPassword,
|
||||||
|
tums_roleId as tumsRoleId,
|
||||||
|
ftp_ip as ftpIp,
|
||||||
|
ftp_port as ftpPort,
|
||||||
|
ftp_username as ftpUsername,
|
||||||
|
ftp_password as ftpPassword,
|
||||||
|
ftp_uploadpath as ftpUploadpath,
|
||||||
|
org_code as orgCode
|
||||||
|
from nu_iot_tplink_tums_base
|
||||||
|
<where>
|
||||||
|
<if test="orgCode != null and orgCode != ''">
|
||||||
|
AND org_code = #{orgCode}
|
||||||
|
</if>
|
||||||
|
<if test="orgCode == null or orgCode == ''">
|
||||||
|
AND ifnull(org_code,'') = ''
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by id desc
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findProjectByCodeOrId" parameterType="String" resultType="com.nu.modules.iot.tplink.entity.AppTumsConfig">
|
||||||
|
select p.project_id as tumsProjectId,
|
||||||
|
p.project_name as tumsProjectName
|
||||||
|
from nu_iot_tplink_project p
|
||||||
|
inner join sys_depart d on p.institution_id = d.id
|
||||||
|
<where>
|
||||||
|
<if test="tumsProjectId != null and tumsProjectId != ''">
|
||||||
|
AND p.project_id = #{tumsProjectId}
|
||||||
|
</if>
|
||||||
|
<if test="tumsProjectId == null or tumsProjectId == ''">
|
||||||
|
AND d.org_code = #{orgCode}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.nu.modules.iot.tplink.service;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.nu.modules.iot.tplink.entity.AppCameraInfo;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元-物联管理-摄像头信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-01-17
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IAppCameraInfoService extends IService<AppCameraInfo> {
|
||||||
|
IPage<AppCameraInfo> findPage(Page<AppCameraInfo> page, AppCameraInfo cameraInfo);
|
||||||
|
IPage<AppCameraInfo> findNuPage(Page<AppCameraInfo> page, AppCameraInfo cameraInfo);
|
||||||
|
AppCameraInfo getByNuId(AppCameraInfo cameraInfo);
|
||||||
|
void rebootDevice(AppCameraInfo cameraInfo);
|
||||||
|
Result<JSONObject> getImageCommon(Map<String,Object> map);
|
||||||
|
Result setImageCommon(Map<String,Object> map);
|
||||||
|
Result<JSONObject> getOsdCapability(Map<String,Object> map);
|
||||||
|
Result<JSONObject> getOsd(Map<String,Object> map);
|
||||||
|
Result<String> setOsd(Map<String,Object> map);
|
||||||
|
Result<JSONObject> getVideoParams(Map<String,Object> map);
|
||||||
|
Result setVideoParams(Map<String,Object> map);
|
||||||
|
Result configRecovery(Map<String,Object> map);
|
||||||
|
Result<Map<String,String>> getPreviewUrl(AppCameraInfo cameraInfo);
|
||||||
|
Result<JSONObject> getTamperDet(Map<String,Object> map);
|
||||||
|
Result<String> setTamperDet(Map<String,Object> map);
|
||||||
|
Result<JSONObject> getTamperNotif(Map<String,Object> map);
|
||||||
|
Result setTamperNotif(Map<String,Object> map);
|
||||||
|
Result testAudio(Map<String,Object> map);
|
||||||
|
Result<JSONObject> getAlarmInfo(Map<String,Object> map);
|
||||||
|
Result<String> setAlarmInfo(Map<String,Object> map);
|
||||||
|
Result<JSONObject> getAlarmPlan(Map<String,Object> map);
|
||||||
|
Result setAlarmPlan(Map<String,Object> map);
|
||||||
|
Result<IPage<AppCameraInfo>> searchVideo(Integer pageNo, Integer pageSize, AppCameraInfo cameraInfo);
|
||||||
|
Result<Map<String,Object>> getPlaybackUrlList(AppCameraInfo cameraInfo);
|
||||||
|
Result<String> deletePlaybackChn(AppCameraInfo cameraInfo);
|
||||||
|
Result<Map<String,Object>> getMultitransUrl(AppCameraInfo cameraInfo) throws Exception;
|
||||||
|
Result uploadToServer(AppCameraInfo cameraInfo);
|
||||||
|
Result<String> stopUploadToServer(AppCameraInfo cameraInfo);
|
||||||
|
Result getUploadToServerProcess(AppCameraInfo cameraInfo);
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.nu.modules.iot.tplink.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.nu.modules.iot.tplink.entity.AppErrorCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元-物联管理-错误码
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IAppErrorCodeService extends IService<AppErrorCode> {
|
||||||
|
AppErrorCode getByCode(String errorCode);
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.nu.modules.iot.tplink.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.nu.modules.iot.tplink.entity.AppTumsConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元-物联管理-图门系统配置
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: caolei
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IAppTumsConfigService extends IService<AppTumsConfig> {
|
||||||
|
AppTumsConfig getByCode(String orgCode);
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,24 @@
|
||||||
|
package com.nu.modules.iot.tplink.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.nu.modules.iot.tplink.entity.AppErrorCode;
|
||||||
|
import com.nu.modules.iot.tplink.mapper.AppErrorCodeMapper;
|
||||||
|
import com.nu.modules.iot.tplink.service.IAppErrorCodeService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元-物联管理-错误码
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AppErrorCodeServiceImpl extends ServiceImpl<AppErrorCodeMapper, AppErrorCode> implements IAppErrorCodeService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AppErrorCode getByCode(String errorCode){
|
||||||
|
return baseMapper.getByCode(errorCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.nu.modules.iot.tplink.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.nu.modules.iot.tplink.entity.AppTumsConfig;
|
||||||
|
import com.nu.modules.iot.tplink.mapper.AppTumsConfigMapper;
|
||||||
|
import com.nu.modules.iot.tplink.service.IAppTumsConfigService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 护理单元-物联管理-图门系统配置
|
||||||
|
* @Author: caolei
|
||||||
|
* @Date: 2025-03-31
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AppTumsConfigServiceImpl extends ServiceImpl<AppTumsConfigMapper, AppTumsConfig> implements IAppTumsConfigService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AppTumsConfig getByCode(String orgCode){
|
||||||
|
return baseMapper.getByCode(orgCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,271 @@
|
||||||
|
package com.nu.modules.iot.tplink.utils;
|
||||||
|
|
||||||
|
import com.nu.modules.iot.tplink.entity.AppTumsConfig;
|
||||||
|
import com.nu.modules.iot.tplink.enums.AppApiEnum;
|
||||||
|
import com.nu.modules.iot.tplink.mapper.AppTumsConfigMapper;
|
||||||
|
import com.tplink.ignite.libs.developersdk.api.TumsClient;
|
||||||
|
import com.tplink.ignite.libs.developersdk.vo.ResultVO;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.jeecg.common.system.vo.LoginUser;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class AppTumsApi {
|
||||||
|
|
||||||
|
TumsClient tumsClient;
|
||||||
|
|
||||||
|
AppTumsConfig tumsConfig;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AppTumsConfigMapper tumsConfigMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建tumsClient
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public TumsClient createTumsClient(){
|
||||||
|
if(this.tumsClient==null){
|
||||||
|
login();
|
||||||
|
}
|
||||||
|
return this.tumsClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销毁tumsClient
|
||||||
|
*/
|
||||||
|
public void destroyTumsClient(){
|
||||||
|
if(this.tumsClient!=null){
|
||||||
|
logout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initTumsConfig(){
|
||||||
|
if(tumsConfig==null){
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
tumsConfig = tumsConfigMapper.getByCode(sysUser.getOrgCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public void login(){
|
||||||
|
initTumsConfig();
|
||||||
|
TumsClient tc = new TumsClient(tumsConfig.getTumsUsername(), tumsConfig.getTumsPassword(), tumsConfig.getTumsUrl());
|
||||||
|
ResultVO loginResult = tc.login();
|
||||||
|
// 判断是否登录成功
|
||||||
|
if (loginResult.getErrorCode() != 0) {
|
||||||
|
log.error("login fail, fail message:[{}]", loginResult.getMsg());
|
||||||
|
tumsClient = null;
|
||||||
|
} else {
|
||||||
|
log.info("login success");
|
||||||
|
String cookie = tc.getCookie();
|
||||||
|
String rsaKey = tc.getRsaKey();
|
||||||
|
log.info("cookie",cookie);
|
||||||
|
log.info("rsaKey",rsaKey);
|
||||||
|
tumsClient = tc;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注销
|
||||||
|
*/
|
||||||
|
public void logout(){
|
||||||
|
ResultVO logoutResult = tumsClient.logout();
|
||||||
|
if (logoutResult.getErrorCode() != 0) {
|
||||||
|
log.error("logout fail, errorCode:{}", logoutResult.getErrorCode());
|
||||||
|
} else {
|
||||||
|
log.info("logout success");
|
||||||
|
tumsClient = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置当前项目
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String setCurrentProject(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("setCurrentProject:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.SET_CURRENT_PROJECT.getValue());
|
||||||
|
log.info("setCurrentProject:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重启设备
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String rebootDeviceList(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("rebootDeviceList:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.REBOOT_DEVICE_LIST.getValue());
|
||||||
|
log.info("rebootDeviceList:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备配置信息
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String passthrough(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("passthrough:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.IPC_PASSTHROUGH.getValue());
|
||||||
|
log.info("passthrough:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加预览通道
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String addPreviewChn(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("addPreviewChn:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.IPC_ADD_PREVIEW_CHN.getValue());
|
||||||
|
log.info("addPreviewChn:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取预览通道的url
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getPreviewUrl(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("getPreviewUrl:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.IPC_GET_PREVIEW_URL.getValue());
|
||||||
|
log.info("getPreviewUrl:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索当天的录像数据
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String searchVideo(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("searchVideo:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.IPC_SEARCH_VIDEO.getValue());
|
||||||
|
log.info("searchVideo:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定监控点的存储设备列表
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getStoragesById(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("getStoragesById:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.IPC_GET_STORAGES_BY_ID.getValue());
|
||||||
|
log.info("getStoragesById:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加回放通道V2
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String addPlaybackChn(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("addPlaybackChn:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.IPC_ADD_PLAYBACK_CHN.getValue());
|
||||||
|
log.info("addPlaybackChn:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取回放通道的url
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getPlaybackUrl(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("getPlaybackUrl:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.IPC_GET_PLAYBACK_URL.getValue());
|
||||||
|
log.info("getPlaybackUrl:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除回放通道
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String deletePlaybackChn(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("deletePlaybackChn:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.IPC_DELETE_PLAYBACK_CHN.getValue());
|
||||||
|
log.info("deletePlaybackChn:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取nvmp设备双向通信URL
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getMultitransUrl(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("getMultitransUrl:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.IPC_GET_MULTITRANS_URL.getValue());
|
||||||
|
log.info("getMultitransUrl:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 回放视频转mp4上传
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String uploadToServer(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("uploadToServer:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.IPC_UPLOAD_TO_SERVER.getValue());
|
||||||
|
log.info("uploadToServer:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停止转存MP4上传任务
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String stopUploadToServer(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("stopUploadToServer:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.IPC_STOP_UPLOAD_TO_SERVER.getValue());
|
||||||
|
log.info("stopUploadToServer:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取转存MP4上传任务进度
|
||||||
|
* @param jsonRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getUploadToServerProcess(String jsonRequest){
|
||||||
|
this.createTumsClient();
|
||||||
|
log.info("getUploadToServerProcess:request:{}",jsonRequest);
|
||||||
|
String jsonResponse = tumsClient.request(jsonRequest, AppApiEnum.IPC_GET_UPLOAD_TO_SERVER_PROCESS.getValue());
|
||||||
|
log.info("getUploadToServerProcess:response:{}",jsonResponse);
|
||||||
|
return jsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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,24 +59,39 @@ 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