增加设备定时更新状态任务
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package org.dromara.sis.api;
|
||||
|
||||
import org.dromara.sis.api.domain.RemoteSisDeviceChannel;
|
||||
import org.dromara.sis.api.domain.RemoteSisDeviceManage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RemoteHikDeviceService {
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有的海康设备信息
|
||||
* @return 返回海康设备列表
|
||||
*/
|
||||
List<RemoteSisDeviceManage> queryHikDevices();
|
||||
|
||||
|
||||
/**
|
||||
* 更新设备在线状态
|
||||
* @param item 设备信息
|
||||
* @return 返回是否操作成功
|
||||
*/
|
||||
Boolean updateDeviceState(RemoteSisDeviceManage item);
|
||||
|
||||
/**
|
||||
* 查询设备通道信息
|
||||
* @param deviceIp 设备ip
|
||||
* @return 返回通道列表
|
||||
*/
|
||||
List<RemoteSisDeviceChannel> queryDeviceChannels(String deviceIp);
|
||||
|
||||
/**
|
||||
* 更新设备通道在线状态
|
||||
* @param deviceIp 设备ip
|
||||
* @return 返回是否成功
|
||||
*/
|
||||
Boolean updateDeviceChannelState(String deviceIp, Integer onLineState);
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
package org.dromara.sis.api;
|
||||
|
||||
import org.dromara.sis.api.domain.RemoteSdkChannel;
|
||||
import org.dromara.sis.api.domain.RemoteSisDeviceManage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RemoteHikSdkService {
|
||||
|
||||
/**
|
||||
* 海康sdk 登录操作
|
||||
* @param item 登录参数
|
||||
* @return 是否登录成功
|
||||
*/
|
||||
Boolean deviceLogin(RemoteSisDeviceManage item);
|
||||
|
||||
/**
|
||||
* 获取nvr设备通道信息
|
||||
* @param deviceIp 设备ip
|
||||
* @return 返回通道信息
|
||||
*/
|
||||
List<RemoteSdkChannel> getDeviceChannel(String deviceIp);
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
package org.dromara.sis.api.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RemoteSdkChannel {
|
||||
|
||||
/**
|
||||
* 通道id
|
||||
*/
|
||||
private Integer channelId;
|
||||
|
||||
/**
|
||||
* 通道名称
|
||||
*/
|
||||
private String channelName;
|
||||
|
||||
/**
|
||||
* 通道设备ip
|
||||
*/
|
||||
private String channelIp;
|
||||
|
||||
/**
|
||||
* 通道设备端口
|
||||
*/
|
||||
private Short channelPort;
|
||||
|
||||
/**
|
||||
* 通道账号
|
||||
*/
|
||||
private String channelAccount;
|
||||
|
||||
/**
|
||||
* 通道密码
|
||||
*/
|
||||
private String channelPwd;
|
||||
|
||||
/**
|
||||
* 通过状态 1: 在线,2:离线
|
||||
*/
|
||||
private Integer channelStatus;
|
||||
|
||||
}
|
@@ -0,0 +1,95 @@
|
||||
package org.dromara.sis.api.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RemoteSisDeviceChannel {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private Long deviceId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String channelName;
|
||||
|
||||
/**
|
||||
* 通道分组组id
|
||||
*/
|
||||
private Long groupId;
|
||||
|
||||
/**
|
||||
* 设备ip
|
||||
*/
|
||||
private String deviceIp;
|
||||
|
||||
/**
|
||||
* 设备端口
|
||||
*/
|
||||
private Integer devicePort;
|
||||
|
||||
private String factoryNo;
|
||||
|
||||
/**
|
||||
* 设备账号
|
||||
*/
|
||||
private String deviceAccount;
|
||||
|
||||
/**
|
||||
* 设备密码
|
||||
*/
|
||||
private String devicePwd;
|
||||
|
||||
/**
|
||||
* 设备
|
||||
*/
|
||||
private String deviceMac;
|
||||
|
||||
/**
|
||||
* 设备通道编号
|
||||
*/
|
||||
private String channelNo;
|
||||
|
||||
/**
|
||||
* 通道状态.0-离线;1-在线
|
||||
*/
|
||||
private Integer channelState;
|
||||
|
||||
/**
|
||||
* nvr 设备厂商编号
|
||||
*/
|
||||
private String nvrFactoryNo;
|
||||
|
||||
/**
|
||||
* nvr设备ip
|
||||
*/
|
||||
private String nvrIp;
|
||||
|
||||
/**
|
||||
* nvr 端口
|
||||
*/
|
||||
private Integer nvrPort;
|
||||
|
||||
/**
|
||||
* nvr 账号
|
||||
*/
|
||||
private String nvrAccount;
|
||||
|
||||
/**
|
||||
* nvr 密码
|
||||
*/
|
||||
private String nvrPwd;
|
||||
|
||||
/**
|
||||
* nvr 通道编号
|
||||
*/
|
||||
private String nvrChannelNo;
|
||||
|
||||
}
|
@@ -0,0 +1,65 @@
|
||||
package org.dromara.sis.api.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 设备远程调用对象
|
||||
*/
|
||||
@Data
|
||||
public class RemoteSisDeviceManage {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 设备ip
|
||||
*/
|
||||
private String deviceIp;
|
||||
|
||||
/**
|
||||
* 设备端口
|
||||
*/
|
||||
private Integer devicePort;
|
||||
|
||||
/**
|
||||
* 设备
|
||||
*/
|
||||
private String deviceMac;
|
||||
|
||||
/**
|
||||
* 设备在线状态 0:离线 1:在线 2:未知
|
||||
*/
|
||||
private Integer deviceStatus;
|
||||
|
||||
/**
|
||||
* 设备账号
|
||||
*/
|
||||
private String deviceAccount;
|
||||
|
||||
/**
|
||||
* 设备密码
|
||||
*/
|
||||
private String devicePwd;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private Integer deviceType;
|
||||
|
||||
/**
|
||||
* 设备厂商编号
|
||||
*/
|
||||
private String factoryNo;
|
||||
|
||||
/**
|
||||
* 设备组id
|
||||
*/
|
||||
private Long groupId;
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
package org.dromara.sis.api.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 设备类型枚举
|
||||
* @author lxj
|
||||
*/
|
||||
@Getter
|
||||
public enum DeviceTypeEnum {
|
||||
IPC(1),
|
||||
NVR(2),
|
||||
DVR(3);
|
||||
|
||||
private final Integer type;
|
||||
|
||||
DeviceTypeEnum(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
package org.dromara.sis.api.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 设备厂商类型枚举
|
||||
* @author lxj
|
||||
*/
|
||||
@Getter
|
||||
public enum FactoryNoEnum {
|
||||
|
||||
HIK("1"),
|
||||
DAHUA("2");
|
||||
|
||||
private final String code;
|
||||
|
||||
FactoryNoEnum(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user