交换机管理,图形监控,策略
This commit is contained in:
+10
-178
@@ -1,9 +1,11 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机管理对象 rm_switch_management
|
||||
@@ -11,6 +13,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
* @author gyt
|
||||
* @date 2025-10-10
|
||||
*/
|
||||
@Data
|
||||
public class RmSwitchManagement extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -36,8 +39,9 @@ public class RmSwitchManagement extends BaseEntity
|
||||
|
||||
/** 在线状态(0-离线,1-在线) */
|
||||
@Excel(name = "在线状态(0-离线,1-在线)")
|
||||
private Integer onlineStatus;
|
||||
|
||||
private String onlineStatus;
|
||||
/** 上机时间 */
|
||||
private Date upTime;
|
||||
/** 心跳监测次数 */
|
||||
@Excel(name = "心跳监测次数")
|
||||
private Long heartbeatCount;
|
||||
@@ -73,179 +77,7 @@ public class RmSwitchManagement extends BaseEntity
|
||||
/** 密码 */
|
||||
@Excel(name = "密码")
|
||||
private String switchPassword;
|
||||
/** 端口备注列表 */
|
||||
private List<RmSwitchInterfaceInfo> switchInterfaceInfoList;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSwitchName(String switchName)
|
||||
{
|
||||
this.switchName = switchName;
|
||||
}
|
||||
|
||||
public String getSwitchName()
|
||||
{
|
||||
return switchName;
|
||||
}
|
||||
|
||||
public void setHardwareSn(String hardwareSn)
|
||||
{
|
||||
this.hardwareSn = hardwareSn;
|
||||
}
|
||||
|
||||
public String getHardwareSn()
|
||||
{
|
||||
return hardwareSn;
|
||||
}
|
||||
|
||||
public void setSnmpAddress(String snmpAddress)
|
||||
{
|
||||
this.snmpAddress = snmpAddress;
|
||||
}
|
||||
|
||||
public String getSnmpAddress()
|
||||
{
|
||||
return snmpAddress;
|
||||
}
|
||||
|
||||
public void setSnmpPort(Long snmpPort)
|
||||
{
|
||||
this.snmpPort = snmpPort;
|
||||
}
|
||||
|
||||
public Long getSnmpPort()
|
||||
{
|
||||
return snmpPort;
|
||||
}
|
||||
|
||||
public void setOnlineStatus(Integer onlineStatus)
|
||||
{
|
||||
this.onlineStatus = onlineStatus;
|
||||
}
|
||||
|
||||
public Integer getOnlineStatus()
|
||||
{
|
||||
return onlineStatus;
|
||||
}
|
||||
|
||||
public void setHeartbeatCount(Long heartbeatCount)
|
||||
{
|
||||
this.heartbeatCount = heartbeatCount;
|
||||
}
|
||||
|
||||
public Long getHeartbeatCount()
|
||||
{
|
||||
return heartbeatCount;
|
||||
}
|
||||
|
||||
public void setHeartbeatInterval(Long heartbeatInterval)
|
||||
{
|
||||
this.heartbeatInterval = heartbeatInterval;
|
||||
}
|
||||
|
||||
public Long getHeartbeatInterval()
|
||||
{
|
||||
return heartbeatInterval;
|
||||
}
|
||||
|
||||
public void setHeartbeatOid(String heartbeatOid)
|
||||
{
|
||||
this.heartbeatOid = heartbeatOid;
|
||||
}
|
||||
|
||||
public String getHeartbeatOid()
|
||||
{
|
||||
return heartbeatOid;
|
||||
}
|
||||
|
||||
public void setSnmpVersion(String snmpVersion)
|
||||
{
|
||||
this.snmpVersion = snmpVersion;
|
||||
}
|
||||
|
||||
public String getSnmpVersion()
|
||||
{
|
||||
return snmpVersion;
|
||||
}
|
||||
|
||||
public void setReadWritePermission(String readWritePermission)
|
||||
{
|
||||
this.readWritePermission = readWritePermission;
|
||||
}
|
||||
|
||||
public String getReadWritePermission()
|
||||
{
|
||||
return readWritePermission;
|
||||
}
|
||||
|
||||
public void setSecurityLevel(String securityLevel)
|
||||
{
|
||||
this.securityLevel = securityLevel;
|
||||
}
|
||||
|
||||
public String getSecurityLevel()
|
||||
{
|
||||
return securityLevel;
|
||||
}
|
||||
|
||||
public void setEncryptionMethod(String encryptionMethod)
|
||||
{
|
||||
this.encryptionMethod = encryptionMethod;
|
||||
}
|
||||
|
||||
public String getEncryptionMethod()
|
||||
{
|
||||
return encryptionMethod;
|
||||
}
|
||||
|
||||
public void setCommunityName(String communityName)
|
||||
{
|
||||
this.communityName = communityName;
|
||||
}
|
||||
|
||||
public String getCommunityName()
|
||||
{
|
||||
return communityName;
|
||||
}
|
||||
|
||||
public void setSwitchPassword(String switchPassword)
|
||||
{
|
||||
this.switchPassword = switchPassword;
|
||||
}
|
||||
|
||||
public String getSwitchPassword()
|
||||
{
|
||||
return switchPassword;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("switchName", getSwitchName())
|
||||
.append("hardwareSn", getHardwareSn())
|
||||
.append("snmpAddress", getSnmpAddress())
|
||||
.append("snmpPort", getSnmpPort())
|
||||
.append("onlineStatus", getOnlineStatus())
|
||||
.append("heartbeatCount", getHeartbeatCount())
|
||||
.append("heartbeatInterval", getHeartbeatInterval())
|
||||
.append("heartbeatOid", getHeartbeatOid())
|
||||
.append("snmpVersion", getSnmpVersion())
|
||||
.append("readWritePermission", getReadWritePermission())
|
||||
.append("securityLevel", getSecurityLevel())
|
||||
.append("encryptionMethod", getEncryptionMethod())
|
||||
.append("communityName", getCommunityName())
|
||||
.append("switchPassword", getSwitchPassword())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
+16
-5
@@ -1,12 +1,15 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.system.domain.RmSwitchInterfaceInfo;
|
||||
import com.ruoyi.system.domain.RmSwitchManagement;
|
||||
import com.ruoyi.system.mapper.RmSwitchInterfaceInfoMapper;
|
||||
import com.ruoyi.system.mapper.RmSwitchManagementMapper;
|
||||
import com.ruoyi.system.service.IRmSwitchManagementService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.RmSwitchManagementMapper;
|
||||
import com.ruoyi.system.domain.RmSwitchManagement;
|
||||
import com.ruoyi.system.service.IRmSwitchManagementService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机管理Service业务层处理
|
||||
@@ -19,6 +22,8 @@ public class RmSwitchManagementServiceImpl implements IRmSwitchManagementService
|
||||
{
|
||||
@Autowired
|
||||
private RmSwitchManagementMapper rmSwitchManagementMapper;
|
||||
@Autowired
|
||||
private RmSwitchInterfaceInfoMapper rmSwitchInterfaceInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询交换机管理
|
||||
@@ -29,7 +34,13 @@ public class RmSwitchManagementServiceImpl implements IRmSwitchManagementService
|
||||
@Override
|
||||
public RmSwitchManagement selectRmSwitchManagementById(Long id)
|
||||
{
|
||||
return rmSwitchManagementMapper.selectRmSwitchManagementById(id);
|
||||
RmSwitchManagement rmSwitchManagement = rmSwitchManagementMapper.selectRmSwitchManagementById(id);
|
||||
// 查询端口备注信息
|
||||
RmSwitchInterfaceInfo queryParam = new RmSwitchInterfaceInfo();
|
||||
queryParam.setHardwareSn(rmSwitchManagement.getHardwareSn());
|
||||
List<RmSwitchInterfaceInfo> interfaceInfos = rmSwitchInterfaceInfoMapper.selectRmSwitchInterfaceInfoList(queryParam);
|
||||
rmSwitchManagement.setSwitchInterfaceInfoList(interfaceInfos);
|
||||
return rmSwitchManagement;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user