交换机管理,图形监控,策略
This commit is contained in:
+10
-178
@@ -1,9 +1,11 @@
|
|||||||
package com.ruoyi.system.domain;
|
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.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交换机管理对象 rm_switch_management
|
* 交换机管理对象 rm_switch_management
|
||||||
@@ -11,6 +13,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
|
|||||||
* @author gyt
|
* @author gyt
|
||||||
* @date 2025-10-10
|
* @date 2025-10-10
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class RmSwitchManagement extends BaseEntity
|
public class RmSwitchManagement extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@@ -36,8 +39,9 @@ public class RmSwitchManagement extends BaseEntity
|
|||||||
|
|
||||||
/** 在线状态(0-离线,1-在线) */
|
/** 在线状态(0-离线,1-在线) */
|
||||||
@Excel(name = "在线状态(0-离线,1-在线)")
|
@Excel(name = "在线状态(0-离线,1-在线)")
|
||||||
private Integer onlineStatus;
|
private String onlineStatus;
|
||||||
|
/** 上机时间 */
|
||||||
|
private Date upTime;
|
||||||
/** 心跳监测次数 */
|
/** 心跳监测次数 */
|
||||||
@Excel(name = "心跳监测次数")
|
@Excel(name = "心跳监测次数")
|
||||||
private Long heartbeatCount;
|
private Long heartbeatCount;
|
||||||
@@ -73,179 +77,7 @@ public class RmSwitchManagement extends BaseEntity
|
|||||||
/** 密码 */
|
/** 密码 */
|
||||||
@Excel(name = "密码")
|
@Excel(name = "密码")
|
||||||
private String switchPassword;
|
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;
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.common.core.utils.DateUtils;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.system.mapper.RmSwitchManagementMapper;
|
|
||||||
import com.ruoyi.system.domain.RmSwitchManagement;
|
import java.util.List;
|
||||||
import com.ruoyi.system.service.IRmSwitchManagementService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交换机管理Service业务层处理
|
* 交换机管理Service业务层处理
|
||||||
@@ -19,6 +22,8 @@ public class RmSwitchManagementServiceImpl implements IRmSwitchManagementService
|
|||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private RmSwitchManagementMapper rmSwitchManagementMapper;
|
private RmSwitchManagementMapper rmSwitchManagementMapper;
|
||||||
|
@Autowired
|
||||||
|
private RmSwitchInterfaceInfoMapper rmSwitchInterfaceInfoMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询交换机管理
|
* 查询交换机管理
|
||||||
@@ -29,7 +34,13 @@ public class RmSwitchManagementServiceImpl implements IRmSwitchManagementService
|
|||||||
@Override
|
@Override
|
||||||
public RmSwitchManagement selectRmSwitchManagementById(Long id)
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+18
-13
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.mapper.RmSwitchManagementMapper">
|
<mapper namespace="com.ruoyi.system.mapper.RmSwitchManagementMapper">
|
||||||
|
|
||||||
<resultMap type="RmSwitchManagement" id="RmSwitchManagementResult">
|
<resultMap type="RmSwitchManagement" id="RmSwitchManagementResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="switchName" column="switch_name" />
|
<result property="switchName" column="switch_name" />
|
||||||
@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="heartbeatInterval" column="heartbeat_interval" />
|
<result property="heartbeatInterval" column="heartbeat_interval" />
|
||||||
<result property="heartbeatOid" column="heartbeat_oid" />
|
<result property="heartbeatOid" column="heartbeat_oid" />
|
||||||
<result property="snmpVersion" column="snmp_version" />
|
<result property="snmpVersion" column="snmp_version" />
|
||||||
|
<result property="upTime" column="up_time" />
|
||||||
<result property="readWritePermission" column="read_write_permission" />
|
<result property="readWritePermission" column="read_write_permission" />
|
||||||
<result property="securityLevel" column="security_level" />
|
<result property="securityLevel" column="security_level" />
|
||||||
<result property="encryptionMethod" column="encryption_method" />
|
<result property="encryptionMethod" column="encryption_method" />
|
||||||
@@ -27,21 +28,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectRmSwitchManagementVo">
|
<sql id="selectRmSwitchManagementVo">
|
||||||
select id, switch_name, hardware_sn, snmp_address, snmp_port, online_status, heartbeat_count, heartbeat_interval, heartbeat_oid, snmp_version, read_write_permission, security_level, encryption_method, community_name, switch_password, create_time, update_time, create_by, update_by from rm_switch_management
|
select id, switch_name, hardware_sn, snmp_address, snmp_port, online_status, heartbeat_count, heartbeat_interval, heartbeat_oid, snmp_version, up_time, read_write_permission, security_level, encryption_method, community_name, switch_password, create_time, update_time, create_by, update_by from rm_switch_management
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectRmSwitchManagementList" parameterType="RmSwitchManagement" resultMap="RmSwitchManagementResult">
|
<select id="selectRmSwitchManagementList" parameterType="RmSwitchManagement" resultMap="RmSwitchManagementResult">
|
||||||
<include refid="selectRmSwitchManagementVo"/>
|
<include refid="selectRmSwitchManagementVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="switchName != null and switchName != ''"> and switch_name like concat('%', #{switchName}, '%')</if>
|
<if test="switchName != null and switchName != ''"> and switch_name like concat('%', #{switchName}, '%')</if>
|
||||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||||
<if test="snmpAddress != null and snmpAddress != ''"> and snmp_address = #{snmpAddress}</if>
|
<if test="snmpAddress != null and snmpAddress != ''"> and snmp_address = #{snmpAddress}</if>
|
||||||
<if test="snmpPort != null "> and snmp_port = #{snmpPort}</if>
|
<if test="snmpPort != null "> and snmp_port = #{snmpPort}</if>
|
||||||
<if test="onlineStatus != null "> and online_status = #{onlineStatus}</if>
|
<if test="onlineStatus != null and onlineStatus != ''"> and online_status = #{onlineStatus}</if>
|
||||||
<if test="heartbeatCount != null "> and heartbeat_count = #{heartbeatCount}</if>
|
<if test="heartbeatCount != null "> and heartbeat_count = #{heartbeatCount}</if>
|
||||||
<if test="heartbeatInterval != null "> and heartbeat_interval = #{heartbeatInterval}</if>
|
<if test="heartbeatInterval != null "> and heartbeat_interval = #{heartbeatInterval}</if>
|
||||||
<if test="heartbeatOid != null and heartbeatOid != ''"> and heartbeat_oid = #{heartbeatOid}</if>
|
<if test="heartbeatOid != null and heartbeatOid != ''"> and heartbeat_oid = #{heartbeatOid}</if>
|
||||||
<if test="snmpVersion != null and snmpVersion != ''"> and snmp_version = #{snmpVersion}</if>
|
<if test="snmpVersion != null and snmpVersion != ''"> and snmp_version = #{snmpVersion}</if>
|
||||||
|
<if test="upTime != null "> and up_time = #{upTime}</if>
|
||||||
<if test="readWritePermission != null and readWritePermission != ''"> and read_write_permission = #{readWritePermission}</if>
|
<if test="readWritePermission != null and readWritePermission != ''"> and read_write_permission = #{readWritePermission}</if>
|
||||||
<if test="securityLevel != null and securityLevel != ''"> and security_level = #{securityLevel}</if>
|
<if test="securityLevel != null and securityLevel != ''"> and security_level = #{securityLevel}</if>
|
||||||
<if test="encryptionMethod != null and encryptionMethod != ''"> and encryption_method = #{encryptionMethod}</if>
|
<if test="encryptionMethod != null and encryptionMethod != ''"> and encryption_method = #{encryptionMethod}</if>
|
||||||
@@ -49,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="switchPassword != null and switchPassword != ''"> and switch_password = #{switchPassword}</if>
|
<if test="switchPassword != null and switchPassword != ''"> and switch_password = #{switchPassword}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectRmSwitchManagementById" parameterType="Long" resultMap="RmSwitchManagementResult">
|
<select id="selectRmSwitchManagementById" parameterType="Long" resultMap="RmSwitchManagementResult">
|
||||||
<include refid="selectRmSwitchManagementVo"/>
|
<include refid="selectRmSwitchManagementVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@@ -62,11 +64,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="hardwareSn != null and hardwareSn != ''">hardware_sn,</if>
|
<if test="hardwareSn != null and hardwareSn != ''">hardware_sn,</if>
|
||||||
<if test="snmpAddress != null and snmpAddress != ''">snmp_address,</if>
|
<if test="snmpAddress != null and snmpAddress != ''">snmp_address,</if>
|
||||||
<if test="snmpPort != null">snmp_port,</if>
|
<if test="snmpPort != null">snmp_port,</if>
|
||||||
<if test="onlineStatus != null">online_status,</if>
|
<if test="onlineStatus != null and onlineStatus != ''">online_status,</if>
|
||||||
<if test="heartbeatCount != null">heartbeat_count,</if>
|
<if test="heartbeatCount != null">heartbeat_count,</if>
|
||||||
<if test="heartbeatInterval != null">heartbeat_interval,</if>
|
<if test="heartbeatInterval != null">heartbeat_interval,</if>
|
||||||
<if test="heartbeatOid != null and heartbeatOid != ''">heartbeat_oid,</if>
|
<if test="heartbeatOid != null and heartbeatOid != ''">heartbeat_oid,</if>
|
||||||
<if test="snmpVersion != null and snmpVersion != ''">snmp_version,</if>
|
<if test="snmpVersion != null and snmpVersion != ''">snmp_version,</if>
|
||||||
|
<if test="upTime != null">up_time,</if>
|
||||||
<if test="readWritePermission != null">read_write_permission,</if>
|
<if test="readWritePermission != null">read_write_permission,</if>
|
||||||
<if test="securityLevel != null">security_level,</if>
|
<if test="securityLevel != null">security_level,</if>
|
||||||
<if test="encryptionMethod != null">encryption_method,</if>
|
<if test="encryptionMethod != null">encryption_method,</if>
|
||||||
@@ -76,17 +79,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="switchName != null and switchName != ''">#{switchName},</if>
|
<if test="switchName != null and switchName != ''">#{switchName},</if>
|
||||||
<if test="hardwareSn != null and hardwareSn != ''">#{hardwareSn},</if>
|
<if test="hardwareSn != null and hardwareSn != ''">#{hardwareSn},</if>
|
||||||
<if test="snmpAddress != null and snmpAddress != ''">#{snmpAddress},</if>
|
<if test="snmpAddress != null and snmpAddress != ''">#{snmpAddress},</if>
|
||||||
<if test="snmpPort != null">#{snmpPort},</if>
|
<if test="snmpPort != null">#{snmpPort},</if>
|
||||||
<if test="onlineStatus != null">#{onlineStatus},</if>
|
<if test="onlineStatus != null and onlineStatus != ''">#{onlineStatus},</if>
|
||||||
<if test="heartbeatCount != null">#{heartbeatCount},</if>
|
<if test="heartbeatCount != null">#{heartbeatCount},</if>
|
||||||
<if test="heartbeatInterval != null">#{heartbeatInterval},</if>
|
<if test="heartbeatInterval != null">#{heartbeatInterval},</if>
|
||||||
<if test="heartbeatOid != null and heartbeatOid != ''">#{heartbeatOid},</if>
|
<if test="heartbeatOid != null and heartbeatOid != ''">#{heartbeatOid},</if>
|
||||||
<if test="snmpVersion != null and snmpVersion != ''">#{snmpVersion},</if>
|
<if test="snmpVersion != null and snmpVersion != ''">#{snmpVersion},</if>
|
||||||
|
<if test="upTime != null">#{upTime},</if>
|
||||||
<if test="readWritePermission != null">#{readWritePermission},</if>
|
<if test="readWritePermission != null">#{readWritePermission},</if>
|
||||||
<if test="securityLevel != null">#{securityLevel},</if>
|
<if test="securityLevel != null">#{securityLevel},</if>
|
||||||
<if test="encryptionMethod != null">#{encryptionMethod},</if>
|
<if test="encryptionMethod != null">#{encryptionMethod},</if>
|
||||||
@@ -96,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateRmSwitchManagement" parameterType="RmSwitchManagement">
|
<update id="updateRmSwitchManagement" parameterType="RmSwitchManagement">
|
||||||
@@ -106,11 +110,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="hardwareSn != null and hardwareSn != ''">hardware_sn = #{hardwareSn},</if>
|
<if test="hardwareSn != null and hardwareSn != ''">hardware_sn = #{hardwareSn},</if>
|
||||||
<if test="snmpAddress != null and snmpAddress != ''">snmp_address = #{snmpAddress},</if>
|
<if test="snmpAddress != null and snmpAddress != ''">snmp_address = #{snmpAddress},</if>
|
||||||
<if test="snmpPort != null">snmp_port = #{snmpPort},</if>
|
<if test="snmpPort != null">snmp_port = #{snmpPort},</if>
|
||||||
<if test="onlineStatus != null">online_status = #{onlineStatus},</if>
|
<if test="onlineStatus != null and onlineStatus != ''">online_status = #{onlineStatus},</if>
|
||||||
<if test="heartbeatCount != null">heartbeat_count = #{heartbeatCount},</if>
|
<if test="heartbeatCount != null">heartbeat_count = #{heartbeatCount},</if>
|
||||||
<if test="heartbeatInterval != null">heartbeat_interval = #{heartbeatInterval},</if>
|
<if test="heartbeatInterval != null">heartbeat_interval = #{heartbeatInterval},</if>
|
||||||
<if test="heartbeatOid != null and heartbeatOid != ''">heartbeat_oid = #{heartbeatOid},</if>
|
<if test="heartbeatOid != null and heartbeatOid != ''">heartbeat_oid = #{heartbeatOid},</if>
|
||||||
<if test="snmpVersion != null and snmpVersion != ''">snmp_version = #{snmpVersion},</if>
|
<if test="snmpVersion != null and snmpVersion != ''">snmp_version = #{snmpVersion},</if>
|
||||||
|
<if test="upTime != null">up_time = #{upTime},</if>
|
||||||
<if test="readWritePermission != null">read_write_permission = #{readWritePermission},</if>
|
<if test="readWritePermission != null">read_write_permission = #{readWritePermission},</if>
|
||||||
<if test="securityLevel != null">security_level = #{securityLevel},</if>
|
<if test="securityLevel != null">security_level = #{securityLevel},</if>
|
||||||
<if test="encryptionMethod != null">encryption_method = #{encryptionMethod},</if>
|
<if test="encryptionMethod != null">encryption_method = #{encryptionMethod},</if>
|
||||||
@@ -129,7 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteRmSwitchManagementByIds" parameterType="String">
|
<delete id="deleteRmSwitchManagementByIds" parameterType="String">
|
||||||
delete from rm_switch_management where id in
|
delete from rm_switch_management where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|||||||
+24
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 风扇信息Controller
|
* 风扇信息Controller
|
||||||
@@ -95,4 +96,27 @@ public class InitialSwitchFanInfoController extends BaseController
|
|||||||
{
|
{
|
||||||
return toAjax(initialSwitchFanInfoService.deleteInitialSwitchFanInfoByIds(ids));
|
return toAjax(initialSwitchFanInfoService.deleteInitialSwitchFanInfoByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定交换机的风扇名称
|
||||||
|
* @param initialSwitchFanInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:info:list")
|
||||||
|
@PostMapping("/getAllFanName")
|
||||||
|
public AjaxResult getAllFanName(@RequestBody InitialSwitchFanInfo initialSwitchFanInfo){
|
||||||
|
List<Map> list = initialSwitchFanInfoService.getAllFanName(initialSwitchFanInfo);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取风扇基础信息
|
||||||
|
* @param initialSwitchFanInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:info:list")
|
||||||
|
@PostMapping("/getFanMsg")
|
||||||
|
public AjaxResult getFanMsg(@RequestBody InitialSwitchFanInfo initialSwitchFanInfo){
|
||||||
|
List<InitialSwitchFanInfo> list = initialSwitchFanInfoService.getFanMsg(initialSwitchFanInfo);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+33
@@ -119,4 +119,37 @@ public class InitialSwitchInfoController extends BaseController
|
|||||||
Map<String, Object> echartsData = initialSwitchInfoService.switchNetSpeedEcharts(initialSwitchInfo);
|
Map<String, Object> echartsData = initialSwitchInfoService.switchNetSpeedEcharts(initialSwitchInfo);
|
||||||
return success(echartsData);
|
return success(echartsData);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获取网络端口丢包数
|
||||||
|
* @param initialSwitchInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:switchInfo:list")
|
||||||
|
@PostMapping("/switchNetDiscardsEcharts")
|
||||||
|
public AjaxResult switchNetDiscardsEcharts(@RequestBody InitialSwitchInfo initialSwitchInfo){
|
||||||
|
Map<String, Object> echartsData = initialSwitchInfoService.switchNetDiscardsEcharts(initialSwitchInfo);
|
||||||
|
return success(echartsData);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取网络端口bites总数
|
||||||
|
* @param initialSwitchInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:switchInfo:list")
|
||||||
|
@PostMapping("/switchNetTotalEcharts")
|
||||||
|
public AjaxResult switchNetTotalEcharts(@RequestBody InitialSwitchInfo initialSwitchInfo){
|
||||||
|
Map<String, Object> echartsData = initialSwitchInfoService.switchNetTotalEcharts(initialSwitchInfo);
|
||||||
|
return success(echartsData);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取网络端口的错误包数
|
||||||
|
* @param initialSwitchInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:switchInfo:list")
|
||||||
|
@PostMapping("/switchNetErrDiscardsEcharts")
|
||||||
|
public AjaxResult switchNetErrDiscardsEcharts(@RequestBody InitialSwitchInfo initialSwitchInfo){
|
||||||
|
Map<String, Object> echartsData = initialSwitchInfoService.switchNetErrDiscardsEcharts(initialSwitchInfo);
|
||||||
|
return success(echartsData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+57
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MPU信息Controller
|
* MPU信息Controller
|
||||||
@@ -95,4 +96,60 @@ public class InitialSwitchMpuInfoController extends BaseController
|
|||||||
{
|
{
|
||||||
return toAjax(initialSwitchMpuInfoService.deleteInitialSwitchMpuInfoByIds(ids));
|
return toAjax(initialSwitchMpuInfoService.deleteInitialSwitchMpuInfoByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有mpu名称
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:info:list")
|
||||||
|
@PostMapping("/getAllMpuName")
|
||||||
|
public AjaxResult getAllMpuName(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo){
|
||||||
|
List<Map> list = initialSwitchMpuInfoService.getAllMpuName(initialSwitchMpuInfo);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取mpu基础信息
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:info:list")
|
||||||
|
@PostMapping("/getMpuMsg")
|
||||||
|
public AjaxResult getMpuMsg(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo){
|
||||||
|
List<InitialSwitchMpuInfo> list = initialSwitchMpuInfoService.getMpuMsg(initialSwitchMpuInfo);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取mpu的cpu使用率
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:info:list")
|
||||||
|
@PostMapping("/getMpuCpuUse")
|
||||||
|
public AjaxResult getMpuCpuUse(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo){
|
||||||
|
Map<String, Object> echartsData = initialSwitchMpuInfoService.getMpuCpuUse(initialSwitchMpuInfo);
|
||||||
|
return success(echartsData);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取mpu的内存使用率
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:info:list")
|
||||||
|
@PostMapping("/getMpuMemUse")
|
||||||
|
public AjaxResult getMpuMemUse(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo){
|
||||||
|
Map<String, Object> echartsData = initialSwitchMpuInfoService.getMpuMemUse(initialSwitchMpuInfo);
|
||||||
|
return success(echartsData);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取mpu的温度
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:info:list")
|
||||||
|
@PostMapping("/getMpuTemperature")
|
||||||
|
public AjaxResult getMpuTemperature(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo){
|
||||||
|
Map<String, Object> echartsData = initialSwitchMpuInfoService.getMpuTemperature(initialSwitchMpuInfo);
|
||||||
|
return success(echartsData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+55
-16
@@ -1,26 +1,20 @@
|
|||||||
package com.ruoyi.rocketmq.controller;
|
package com.ruoyi.rocketmq.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||||
import java.io.IOException;
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.log.annotation.Log;
|
import com.ruoyi.common.log.annotation.Log;
|
||||||
import com.ruoyi.common.log.enums.BusinessType;
|
import com.ruoyi.common.log.enums.BusinessType;
|
||||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||||
import com.ruoyi.rocketmq.domain.InitialSwitchOpticalModule;
|
import com.ruoyi.rocketmq.domain.InitialSwitchOpticalModule;
|
||||||
import com.ruoyi.rocketmq.service.IInitialSwitchOpticalModuleService;
|
import com.ruoyi.rocketmq.service.IInitialSwitchOpticalModuleService;
|
||||||
import com.ruoyi.common.core.web.controller.BaseController;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 光模块信息Controller
|
* 光模块信息Controller
|
||||||
@@ -102,4 +96,49 @@ public class InitialSwitchOpticalModuleController extends BaseController
|
|||||||
{
|
{
|
||||||
return toAjax(initialSwitchOpticalModuleService.deleteInitialSwitchOpticalModuleByIds(ids));
|
return toAjax(initialSwitchOpticalModuleService.deleteInitialSwitchOpticalModuleByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取该交换机的所有光模块名称
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:module:list")
|
||||||
|
@PostMapping("/getAllModuleName")
|
||||||
|
public AjaxResult getAllModuleName(@RequestBody InitialSwitchOpticalModule initialSwitchOpticalModule){
|
||||||
|
List<Map> list = initialSwitchOpticalModuleService.getAllModuleName(initialSwitchOpticalModule);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取光模块基础信息
|
||||||
|
* @param initialSwitchOpticalModule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:module:list")
|
||||||
|
@PostMapping("/switchOpticalModuleMsg")
|
||||||
|
public AjaxResult switchOpticalModuleMsg(@RequestBody InitialSwitchOpticalModule initialSwitchOpticalModule){
|
||||||
|
|
||||||
|
List<InitialSwitchOpticalModule> list = initialSwitchOpticalModuleService.switchOpticalModuleMsg(initialSwitchOpticalModule);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取光模块的光衰阈值
|
||||||
|
* @param initialSwitchOpticalModule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:module:list")
|
||||||
|
@PostMapping("/opticalModuleLowThreshold")
|
||||||
|
public AjaxResult opticalModuleLowThreshold(@RequestBody InitialSwitchOpticalModule initialSwitchOpticalModule){
|
||||||
|
Map<String, Object> echartsData = initialSwitchOpticalModuleService.opticalModuleLowThreshold(initialSwitchOpticalModule);
|
||||||
|
return success(echartsData);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取光模块的功率
|
||||||
|
* @param initialSwitchOpticalModule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:module:list")
|
||||||
|
@PostMapping("/opticalModulePower")
|
||||||
|
public AjaxResult opticalModulePower(@RequestBody InitialSwitchOpticalModule initialSwitchOpticalModule){
|
||||||
|
Map<String, Object> echartsData = initialSwitchOpticalModuleService.opticalModulePower(initialSwitchOpticalModule);
|
||||||
|
return success(echartsData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+50
-16
@@ -1,26 +1,20 @@
|
|||||||
package com.ruoyi.rocketmq.controller;
|
package com.ruoyi.rocketmq.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||||
import java.io.IOException;
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.log.annotation.Log;
|
import com.ruoyi.common.log.annotation.Log;
|
||||||
import com.ruoyi.common.log.enums.BusinessType;
|
import com.ruoyi.common.log.enums.BusinessType;
|
||||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||||
import com.ruoyi.rocketmq.domain.InitialSwitchOtherCollectData;
|
import com.ruoyi.rocketmq.domain.InitialSwitchOtherCollectData;
|
||||||
import com.ruoyi.rocketmq.service.IInitialSwitchOtherCollectDataService;
|
import com.ruoyi.rocketmq.service.IInitialSwitchOtherCollectDataService;
|
||||||
import com.ruoyi.common.core.web.controller.BaseController;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交换机系统其他信息采集数据Controller
|
* 交换机系统其他信息采集数据Controller
|
||||||
@@ -102,4 +96,44 @@ public class InitialSwitchOtherCollectDataController extends BaseController
|
|||||||
{
|
{
|
||||||
return toAjax(initialSwitchOtherCollectDataService.deleteInitialSwitchOtherCollectDataByIds(ids));
|
return toAjax(initialSwitchOtherCollectDataService.deleteInitialSwitchOtherCollectDataByIds(ids));
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 图形监控交换机监控项基础信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:switchOtherData:list")
|
||||||
|
@PostMapping("/getSwitchMonitorMsg")
|
||||||
|
public AjaxResult getSwitchMonitorMsg(@RequestBody InitialSwitchOtherCollectData initialSwitchOtherCollectData)
|
||||||
|
{
|
||||||
|
List<Map> list = initialSwitchOtherCollectDataService.getSwitchMonitorMsg(initialSwitchOtherCollectData);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 图形监控交换机设备CPU使用率
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:switchOtherData:list")
|
||||||
|
@PostMapping("/getSwitchCpuUseMsg")
|
||||||
|
public AjaxResult getSwitchCpuUseMsg(@RequestBody InitialSwitchOtherCollectData initialSwitchOtherCollectData)
|
||||||
|
{
|
||||||
|
Map<String, Object> echartsData = initialSwitchOtherCollectDataService.getSwitchCpuUseMsg(initialSwitchOtherCollectData);
|
||||||
|
return success(echartsData);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 图形监控交换机设备内存利用率
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:switchOtherData:list")
|
||||||
|
@PostMapping("/getSwitchMemUseMsg")
|
||||||
|
public AjaxResult getSwitchMemUseMsg(@RequestBody InitialSwitchOtherCollectData initialSwitchOtherCollectData)
|
||||||
|
{
|
||||||
|
Map<String, Object> echartsData = initialSwitchOtherCollectDataService.getSwitchMemUseMsg(initialSwitchOtherCollectData);
|
||||||
|
return success(echartsData);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 图形监控交换机设备系统功率
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:switchOtherData:list")
|
||||||
|
@PostMapping("/getSwitchPowerMsg")
|
||||||
|
public AjaxResult getSwitchPowerMsg(@RequestBody InitialSwitchOtherCollectData initialSwitchOtherCollectData)
|
||||||
|
{
|
||||||
|
Map<String, Object> echartsData = initialSwitchOtherCollectDataService.getSwitchPowerMsg(initialSwitchOtherCollectData);
|
||||||
|
return success(echartsData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+45
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电源信息Controller
|
* 电源信息Controller
|
||||||
@@ -95,4 +96,48 @@ public class InitialSwitchPowerSupplyController extends BaseController
|
|||||||
{
|
{
|
||||||
return toAjax(initialSwitchPowerSupplyService.deleteInitialSwitchPowerSupplyByIds(ids));
|
return toAjax(initialSwitchPowerSupplyService.deleteInitialSwitchPowerSupplyByIds(ids));
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获取指定交换机所有电源名称
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:supply:list")
|
||||||
|
@PostMapping("/getAllPwrName")
|
||||||
|
public AjaxResult getAllPwrName(@RequestBody InitialSwitchPowerSupply initialSwitchPowerSupply){
|
||||||
|
List<Map> list = initialSwitchPowerSupplyService.getAllPwrName(initialSwitchPowerSupply);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取电源基础信息
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:supply:list")
|
||||||
|
@PostMapping("/getPwrMsg")
|
||||||
|
public AjaxResult getPwrMsg(@RequestBody InitialSwitchPowerSupply initialSwitchPowerSupply){
|
||||||
|
List<Map> list = initialSwitchPowerSupplyService.getPwrMsg(initialSwitchPowerSupply);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取电源电流
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:supply:list")
|
||||||
|
@PostMapping("/getPwrCurrent")
|
||||||
|
public AjaxResult getPwrCurrent(@RequestBody InitialSwitchPowerSupply initialSwitchPowerSupply){
|
||||||
|
Map<String, Object> echartsData = initialSwitchPowerSupplyService.getPwrCurrent(initialSwitchPowerSupply);
|
||||||
|
return success(echartsData);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取电源电压
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:supply:list")
|
||||||
|
@PostMapping("/getPwrVoltage")
|
||||||
|
public AjaxResult getPwrVoltage(@RequestBody InitialSwitchPowerSupply initialSwitchPowerSupply){
|
||||||
|
Map<String, Object> echartsData = initialSwitchPowerSupplyService.getPwrVoltage(initialSwitchPowerSupply);
|
||||||
|
return success(echartsData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+12
@@ -117,4 +117,16 @@ public class RmMonitorPolicyController extends BaseController
|
|||||||
{
|
{
|
||||||
return toAjax(rmMonitorPolicyService.deleteRmMonitorPolicyByIds(ids));
|
return toAjax(rmMonitorPolicyService.deleteRmMonitorPolicyByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增交换机监控策略
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("rocketmq:policy:add")
|
||||||
|
@Log(title = "资源监控策略", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/addSwitchPolicy")
|
||||||
|
public AjaxResult addSwitchPolicy(@RequestBody RmMonitorPolicy rmMonitorPolicy)
|
||||||
|
{
|
||||||
|
int rows = rmMonitorPolicyService.addSwitchPolicy(rmMonitorPolicy);
|
||||||
|
return toAjax(rows);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.ruoyi.rocketmq.domain;
|
package com.ruoyi.rocketmq.domain;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
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.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MPU信息对象 initial_switch_mpu_info
|
* MPU信息对象 initial_switch_mpu_info
|
||||||
@@ -12,6 +12,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
|
|||||||
* @author gyt
|
* @author gyt
|
||||||
* @date 2025-09-22
|
* @date 2025-09-22
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class InitialSwitchMpuInfo extends BaseEntity
|
public class InitialSwitchMpuInfo extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@@ -46,102 +47,8 @@ public class InitialSwitchMpuInfo extends BaseEntity
|
|||||||
/** 客户端ID */
|
/** 客户端ID */
|
||||||
@Excel(name = "客户端ID")
|
@Excel(name = "客户端ID")
|
||||||
private String clientId;
|
private String clientId;
|
||||||
|
/** 开始时间 */
|
||||||
public void setId(Long id)
|
private String startTime;
|
||||||
{
|
/** 结束时间 */
|
||||||
this.id = id;
|
private String endTime;
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMpuEntIndex(String mpuEntIndex)
|
|
||||||
{
|
|
||||||
this.mpuEntIndex = mpuEntIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMpuEntIndex()
|
|
||||||
{
|
|
||||||
return mpuEntIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMpuName(String mpuName)
|
|
||||||
{
|
|
||||||
this.mpuName = mpuName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMpuName()
|
|
||||||
{
|
|
||||||
return mpuName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMpuEntityCpuUsage(BigDecimal mpuEntityCpuUsage)
|
|
||||||
{
|
|
||||||
this.mpuEntityCpuUsage = mpuEntityCpuUsage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getMpuEntityCpuUsage()
|
|
||||||
{
|
|
||||||
return mpuEntityCpuUsage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMpuEntityMemUsage(BigDecimal mpuEntityMemUsage)
|
|
||||||
{
|
|
||||||
this.mpuEntityMemUsage = mpuEntityMemUsage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getMpuEntityMemUsage()
|
|
||||||
{
|
|
||||||
return mpuEntityMemUsage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMpuPhysicalSoftwareRev(String mpuPhysicalSoftwareRev)
|
|
||||||
{
|
|
||||||
this.mpuPhysicalSoftwareRev = mpuPhysicalSoftwareRev;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMpuPhysicalSoftwareRev()
|
|
||||||
{
|
|
||||||
return mpuPhysicalSoftwareRev;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMpuEntityTemperature(BigDecimal mpuEntityTemperature)
|
|
||||||
{
|
|
||||||
this.mpuEntityTemperature = mpuEntityTemperature;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getMpuEntityTemperature()
|
|
||||||
{
|
|
||||||
return mpuEntityTemperature;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClientId(String clientId)
|
|
||||||
{
|
|
||||||
this.clientId = clientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getClientId()
|
|
||||||
{
|
|
||||||
return clientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("mpuEntIndex", getMpuEntIndex())
|
|
||||||
.append("mpuName", getMpuName())
|
|
||||||
.append("mpuEntityCpuUsage", getMpuEntityCpuUsage())
|
|
||||||
.append("mpuEntityMemUsage", getMpuEntityMemUsage())
|
|
||||||
.append("mpuPhysicalSoftwareRev", getMpuPhysicalSoftwareRev())
|
|
||||||
.append("mpuEntityTemperature", getMpuEntityTemperature())
|
|
||||||
.append("clientId", getClientId())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-101
@@ -1,10 +1,10 @@
|
|||||||
package com.ruoyi.rocketmq.domain;
|
package com.ruoyi.rocketmq.domain;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
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.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 光模块信息对象 initial_switch_optical_module
|
* 光模块信息对象 initial_switch_optical_module
|
||||||
@@ -12,6 +12,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
|
|||||||
* @author gyt
|
* @author gyt
|
||||||
* @date 2025-09-22
|
* @date 2025-09-22
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class InitialSwitchOpticalModule extends BaseEntity
|
public class InitialSwitchOpticalModule extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@@ -46,102 +47,8 @@ public class InitialSwitchOpticalModule extends BaseEntity
|
|||||||
/** 客户端ID */
|
/** 客户端ID */
|
||||||
@Excel(name = "客户端ID")
|
@Excel(name = "客户端ID")
|
||||||
private String clientId;
|
private String clientId;
|
||||||
|
/** 开始时间 */
|
||||||
public void setId(Long id)
|
private String startTime;
|
||||||
{
|
/** 结束时间 */
|
||||||
this.id = id;
|
private String endTime;
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFiberEntIndex(String fiberEntIndex)
|
|
||||||
{
|
|
||||||
this.fiberEntIndex = fiberEntIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFiberEntIndex()
|
|
||||||
{
|
|
||||||
return fiberEntIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFiberPortName(String fiberPortName)
|
|
||||||
{
|
|
||||||
this.fiberPortName = fiberPortName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFiberPortName()
|
|
||||||
{
|
|
||||||
return fiberPortName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHwEntityOpticalTxLowThreshold(BigDecimal hwEntityOpticalTxLowThreshold)
|
|
||||||
{
|
|
||||||
this.hwEntityOpticalTxLowThreshold = hwEntityOpticalTxLowThreshold;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getHwEntityOpticalTxLowThreshold()
|
|
||||||
{
|
|
||||||
return hwEntityOpticalTxLowThreshold;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHwEntityOpticalRxLowThreshold(BigDecimal hwEntityOpticalRxLowThreshold)
|
|
||||||
{
|
|
||||||
this.hwEntityOpticalRxLowThreshold = hwEntityOpticalRxLowThreshold;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getHwEntityOpticalRxLowThreshold()
|
|
||||||
{
|
|
||||||
return hwEntityOpticalRxLowThreshold;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHwEntityOpticalRxPower(BigDecimal hwEntityOpticalRxPower)
|
|
||||||
{
|
|
||||||
this.hwEntityOpticalRxPower = hwEntityOpticalRxPower;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getHwEntityOpticalRxPower()
|
|
||||||
{
|
|
||||||
return hwEntityOpticalRxPower;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHwEntityOpticalTxPower(BigDecimal hwEntityOpticalTxPower)
|
|
||||||
{
|
|
||||||
this.hwEntityOpticalTxPower = hwEntityOpticalTxPower;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getHwEntityOpticalTxPower()
|
|
||||||
{
|
|
||||||
return hwEntityOpticalTxPower;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClientId(String clientId)
|
|
||||||
{
|
|
||||||
this.clientId = clientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getClientId()
|
|
||||||
{
|
|
||||||
return clientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("fiberEntIndex", getFiberEntIndex())
|
|
||||||
.append("fiberPortName", getFiberPortName())
|
|
||||||
.append("hwEntityOpticalTxLowThreshold", getHwEntityOpticalTxLowThreshold())
|
|
||||||
.append("hwEntityOpticalRxLowThreshold", getHwEntityOpticalRxLowThreshold())
|
|
||||||
.append("hwEntityOpticalRxPower", getHwEntityOpticalRxPower())
|
|
||||||
.append("hwEntityOpticalTxPower", getHwEntityOpticalTxPower())
|
|
||||||
.append("clientId", getClientId())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-56
@@ -1,9 +1,8 @@
|
|||||||
package com.ruoyi.rocketmq.domain;
|
package com.ruoyi.rocketmq.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.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交换机系统其他信息采集数据对象 initial_switch_other_collect_data
|
* 交换机系统其他信息采集数据对象 initial_switch_other_collect_data
|
||||||
@@ -11,6 +10,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
|
|||||||
* @author gyt
|
* @author gyt
|
||||||
* @date 2025-09-23
|
* @date 2025-09-23
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class InitialSwitchOtherCollectData extends BaseEntity
|
public class InitialSwitchOtherCollectData extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@@ -29,58 +29,8 @@ public class InitialSwitchOtherCollectData extends BaseEntity
|
|||||||
/** 采集值 */
|
/** 采集值 */
|
||||||
@Excel(name = "采集值")
|
@Excel(name = "采集值")
|
||||||
private String collectValue;
|
private String collectValue;
|
||||||
|
/** 开始时间 */
|
||||||
public void setId(Long id)
|
private String startTime;
|
||||||
{
|
/** 结束时间 */
|
||||||
this.id = id;
|
private String endTime;
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClientId(String clientId)
|
|
||||||
{
|
|
||||||
this.clientId = clientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getClientId()
|
|
||||||
{
|
|
||||||
return clientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCollectType(String collectType)
|
|
||||||
{
|
|
||||||
this.collectType = collectType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCollectType()
|
|
||||||
{
|
|
||||||
return collectType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCollectValue(String collectValue)
|
|
||||||
{
|
|
||||||
this.collectValue = collectValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCollectValue()
|
|
||||||
{
|
|
||||||
return collectValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("clientId", getClientId())
|
|
||||||
.append("collectType", getCollectType())
|
|
||||||
.append("collectValue", getCollectValue())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-89
@@ -1,9 +1,8 @@
|
|||||||
package com.ruoyi.rocketmq.domain;
|
package com.ruoyi.rocketmq.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.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电源信息对象 initial_switch_power_supply
|
* 电源信息对象 initial_switch_power_supply
|
||||||
@@ -11,6 +10,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
|
|||||||
* @author gyt
|
* @author gyt
|
||||||
* @date 2025-09-22
|
* @date 2025-09-22
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class InitialSwitchPowerSupply extends BaseEntity
|
public class InitialSwitchPowerSupply extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@@ -41,91 +41,8 @@ public class InitialSwitchPowerSupply extends BaseEntity
|
|||||||
/** 客户端ID */
|
/** 客户端ID */
|
||||||
@Excel(name = "客户端ID")
|
@Excel(name = "客户端ID")
|
||||||
private String clientId;
|
private String clientId;
|
||||||
|
/** 开始时间 */
|
||||||
public void setId(Long id)
|
private String startTime;
|
||||||
{
|
/** 结束时间 */
|
||||||
this.id = id;
|
private String endTime;
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPwrEntIndex(String pwrEntIndex)
|
|
||||||
{
|
|
||||||
this.pwrEntIndex = pwrEntIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPwrEntIndex()
|
|
||||||
{
|
|
||||||
return pwrEntIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPwrName(String pwrName)
|
|
||||||
{
|
|
||||||
this.pwrName = pwrName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPwrName()
|
|
||||||
{
|
|
||||||
return pwrName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPwrEntityPwrState(String pwrEntityPwrState)
|
|
||||||
{
|
|
||||||
this.pwrEntityPwrState = pwrEntityPwrState;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPwrEntityPwrState()
|
|
||||||
{
|
|
||||||
return pwrEntityPwrState;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPwrEntityPwrCurrent(Long pwrEntityPwrCurrent)
|
|
||||||
{
|
|
||||||
this.pwrEntityPwrCurrent = pwrEntityPwrCurrent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getPwrEntityPwrCurrent()
|
|
||||||
{
|
|
||||||
return pwrEntityPwrCurrent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPwrEntityPwrVoltage(Long pwrEntityPwrVoltage)
|
|
||||||
{
|
|
||||||
this.pwrEntityPwrVoltage = pwrEntityPwrVoltage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getPwrEntityPwrVoltage()
|
|
||||||
{
|
|
||||||
return pwrEntityPwrVoltage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClientId(String clientId)
|
|
||||||
{
|
|
||||||
this.clientId = clientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getClientId()
|
|
||||||
{
|
|
||||||
return clientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("pwrEntIndex", getPwrEntIndex())
|
|
||||||
.append("pwrName", getPwrName())
|
|
||||||
.append("pwrEntityPwrState", getPwrEntityPwrState())
|
|
||||||
.append("pwrEntityPwrCurrent", getPwrEntityPwrCurrent())
|
|
||||||
.append("pwrEntityPwrVoltage", getPwrEntityPwrVoltage())
|
|
||||||
.append("clientId", getClientId())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,4 +69,6 @@ public class RmMonitorPolicy extends BaseEntity
|
|||||||
private String switchType;
|
private String switchType;
|
||||||
/** 部署设备 */
|
/** 部署设备 */
|
||||||
private String deployDevice;
|
private String deployDevice;
|
||||||
|
/** 优先级 */
|
||||||
|
private String priority;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.ruoyi.rocketmq.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum SwitchLogo {
|
||||||
|
设备CPU使用率("hwEntityCpuUsage", "设备CPU使用率"),
|
||||||
|
设备内存使用率("hwEntityMemUsage", "设备内存使用率(%)"),
|
||||||
|
系统平均功率("hwAveragePower", "系统平均功率(%)"),
|
||||||
|
系统实时功率("hwCurrentPower", "系统实时功率(%)");
|
||||||
|
private final String code;
|
||||||
|
private final String msg;
|
||||||
|
SwitchLogo(String code, String msg){
|
||||||
|
this.code = code;
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
}
|
||||||
+15
@@ -3,6 +3,7 @@ package com.ruoyi.rocketmq.mapper;
|
|||||||
import com.ruoyi.rocketmq.domain.InitialSwitchFanInfo;
|
import com.ruoyi.rocketmq.domain.InitialSwitchFanInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 风扇信息Mapper接口
|
* 风扇信息Mapper接口
|
||||||
@@ -66,4 +67,18 @@ public interface InitialSwitchFanInfoMapper
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int insertBatchInitialSwitchFanInfo(List<InitialSwitchFanInfo> list);
|
public int insertBatchInitialSwitchFanInfo(List<InitialSwitchFanInfo> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定交换机的风扇名称
|
||||||
|
* @param initialSwitchFanInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map> getAllFanName(InitialSwitchFanInfo initialSwitchFanInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取风扇基础信息
|
||||||
|
* @param initialSwitchFanInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<InitialSwitchFanInfo> getFanMsg(InitialSwitchFanInfo initialSwitchFanInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
+15
@@ -3,6 +3,7 @@ package com.ruoyi.rocketmq.mapper;
|
|||||||
import com.ruoyi.rocketmq.domain.InitialSwitchMpuInfo;
|
import com.ruoyi.rocketmq.domain.InitialSwitchMpuInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MPU信息Mapper接口
|
* MPU信息Mapper接口
|
||||||
@@ -66,4 +67,18 @@ public interface InitialSwitchMpuInfoMapper
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int insertBatchInitialSwitchMpuInfo(List<InitialSwitchMpuInfo> list);
|
int insertBatchInitialSwitchMpuInfo(List<InitialSwitchMpuInfo> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指定交换机的mpu名称
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map> getAllMpuName(InitialSwitchMpuInfo initialSwitchMpuInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取mpu的基础信息
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<InitialSwitchMpuInfo> getMpuMsg(InitialSwitchMpuInfo initialSwitchMpuInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
+15
@@ -3,6 +3,7 @@ package com.ruoyi.rocketmq.mapper;
|
|||||||
import com.ruoyi.rocketmq.domain.InitialSwitchOpticalModule;
|
import com.ruoyi.rocketmq.domain.InitialSwitchOpticalModule;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 光模块信息Mapper接口
|
* 光模块信息Mapper接口
|
||||||
@@ -65,4 +66,18 @@ public interface InitialSwitchOpticalModuleMapper
|
|||||||
* @param list
|
* @param list
|
||||||
*/
|
*/
|
||||||
int batchInitialSwitchOpticalModule(List<InitialSwitchOpticalModule> list);
|
int batchInitialSwitchOpticalModule(List<InitialSwitchOpticalModule> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光模块基础信息
|
||||||
|
* @param initialSwitchOpticalModule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<InitialSwitchOpticalModule> switchOpticalModuleMsg(InitialSwitchOpticalModule initialSwitchOpticalModule);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光模块名称
|
||||||
|
* @param initialSwitchOpticalModule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map> getAllModuleName(InitialSwitchOpticalModule initialSwitchOpticalModule);
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-1
@@ -1,8 +1,10 @@
|
|||||||
package com.ruoyi.rocketmq.mapper;
|
package com.ruoyi.rocketmq.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.rocketmq.domain.InitialSwitchOtherCollectData;
|
import com.ruoyi.rocketmq.domain.InitialSwitchOtherCollectData;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交换机系统其他信息采集数据Mapper接口
|
* 交换机系统其他信息采集数据Mapper接口
|
||||||
*
|
*
|
||||||
@@ -58,4 +60,11 @@ public interface InitialSwitchOtherCollectDataMapper
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteInitialSwitchOtherCollectDataByIds(Long[] ids);
|
public int deleteInitialSwitchOtherCollectDataByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交换机图形监控监控项基础信息
|
||||||
|
* @param initialSwitchOtherCollectData
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map> getSwitchMonitorMsg(InitialSwitchOtherCollectData initialSwitchOtherCollectData);
|
||||||
}
|
}
|
||||||
|
|||||||
+15
@@ -3,6 +3,7 @@ package com.ruoyi.rocketmq.mapper;
|
|||||||
import com.ruoyi.rocketmq.domain.InitialSwitchPowerSupply;
|
import com.ruoyi.rocketmq.domain.InitialSwitchPowerSupply;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电源信息Mapper接口
|
* 电源信息Mapper接口
|
||||||
@@ -65,4 +66,18 @@ public interface InitialSwitchPowerSupplyMapper
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int insertBatchInitialSwitchPowerSupply(List<InitialSwitchPowerSupply> list);
|
public int insertBatchInitialSwitchPowerSupply(List<InitialSwitchPowerSupply> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定交换机的电源名称
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map> getAllPwrName(InitialSwitchPowerSupply initialSwitchPowerSupply);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电源基础信息
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map> getPwrMsg(InitialSwitchPowerSupply initialSwitchPowerSupply);
|
||||||
}
|
}
|
||||||
|
|||||||
+15
@@ -3,6 +3,7 @@ package com.ruoyi.rocketmq.service;
|
|||||||
import com.ruoyi.rocketmq.domain.InitialSwitchFanInfo;
|
import com.ruoyi.rocketmq.domain.InitialSwitchFanInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 风扇信息Service接口
|
* 风扇信息Service接口
|
||||||
@@ -66,4 +67,18 @@ public interface IInitialSwitchFanInfoService
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int insertBatchInitialSwitchFanInfo(List<InitialSwitchFanInfo> list);
|
public int insertBatchInitialSwitchFanInfo(List<InitialSwitchFanInfo> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定交换机的风扇名称
|
||||||
|
* @param initialSwitchFanInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map> getAllFanName(InitialSwitchFanInfo initialSwitchFanInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取风扇基础信息
|
||||||
|
* @param initialSwitchFanInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<InitialSwitchFanInfo> getFanMsg(InitialSwitchFanInfo initialSwitchFanInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
+21
@@ -81,4 +81,25 @@ public interface IInitialSwitchInfoService
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Map<String, Object> switchNetSpeedEcharts(InitialSwitchInfo initialSwitchInfo);
|
Map<String, Object> switchNetSpeedEcharts(InitialSwitchInfo initialSwitchInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取接口的丢包数
|
||||||
|
* @param initialSwitchInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> switchNetDiscardsEcharts(InitialSwitchInfo initialSwitchInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取接口的bites总数
|
||||||
|
* @param initialSwitchInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> switchNetTotalEcharts(InitialSwitchInfo initialSwitchInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取接口的错误包数
|
||||||
|
* @param initialSwitchInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> switchNetErrDiscardsEcharts(InitialSwitchInfo initialSwitchInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
+36
@@ -3,6 +3,7 @@ package com.ruoyi.rocketmq.service;
|
|||||||
import com.ruoyi.rocketmq.domain.InitialSwitchMpuInfo;
|
import com.ruoyi.rocketmq.domain.InitialSwitchMpuInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MPU信息Service接口
|
* MPU信息Service接口
|
||||||
@@ -66,4 +67,39 @@ public interface IInitialSwitchMpuInfoService
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int insertBatchInitialSwitchMpuInfo(List<InitialSwitchMpuInfo> list);
|
public int insertBatchInitialSwitchMpuInfo(List<InitialSwitchMpuInfo> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取该交换机所有mpu名称
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map> getAllMpuName(InitialSwitchMpuInfo initialSwitchMpuInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mpu基础信息
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<InitialSwitchMpuInfo> getMpuMsg(InitialSwitchMpuInfo initialSwitchMpuInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mpu的cpu使用率
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> getMpuCpuUse(InitialSwitchMpuInfo initialSwitchMpuInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mpu的内存使用率
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> getMpuMemUse(InitialSwitchMpuInfo initialSwitchMpuInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mpu的温度
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> getMpuTemperature(InitialSwitchMpuInfo initialSwitchMpuInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
+29
@@ -3,6 +3,7 @@ package com.ruoyi.rocketmq.service;
|
|||||||
import com.ruoyi.rocketmq.domain.InitialSwitchOpticalModule;
|
import com.ruoyi.rocketmq.domain.InitialSwitchOpticalModule;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 光模块信息Service接口
|
* 光模块信息Service接口
|
||||||
@@ -65,4 +66,32 @@ public interface IInitialSwitchOpticalModuleService
|
|||||||
* @param list
|
* @param list
|
||||||
*/
|
*/
|
||||||
int batchInitialSwitchOpticalModule(List<InitialSwitchOpticalModule> list);
|
int batchInitialSwitchOpticalModule(List<InitialSwitchOpticalModule> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光模块基础信息
|
||||||
|
* @param initialSwitchOpticalModule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<InitialSwitchOpticalModule> switchOpticalModuleMsg(InitialSwitchOpticalModule initialSwitchOpticalModule);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光模块名称查询
|
||||||
|
* @param initialSwitchOpticalModule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map> getAllModuleName(InitialSwitchOpticalModule initialSwitchOpticalModule);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光衰阈值
|
||||||
|
* @param initialSwitchOpticalModule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> opticalModuleLowThreshold(InitialSwitchOpticalModule initialSwitchOpticalModule);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 功率
|
||||||
|
* @param initialSwitchOpticalModule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> opticalModulePower(InitialSwitchOpticalModule initialSwitchOpticalModule);
|
||||||
}
|
}
|
||||||
|
|||||||
+31
-1
@@ -1,8 +1,10 @@
|
|||||||
package com.ruoyi.rocketmq.service;
|
package com.ruoyi.rocketmq.service;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.rocketmq.domain.InitialSwitchOtherCollectData;
|
import com.ruoyi.rocketmq.domain.InitialSwitchOtherCollectData;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交换机系统其他信息采集数据Service接口
|
* 交换机系统其他信息采集数据Service接口
|
||||||
*
|
*
|
||||||
@@ -58,4 +60,32 @@ public interface IInitialSwitchOtherCollectDataService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteInitialSwitchOtherCollectDataById(Long id);
|
public int deleteInitialSwitchOtherCollectDataById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交换机图形监控监控项基础信息
|
||||||
|
* @param initialSwitchOtherCollectData
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map> getSwitchMonitorMsg(InitialSwitchOtherCollectData initialSwitchOtherCollectData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图形监控交换机设备CPU使用率
|
||||||
|
* @param initialSwitchOtherCollectData
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> getSwitchCpuUseMsg(InitialSwitchOtherCollectData initialSwitchOtherCollectData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图形监控交换机设备系统功率
|
||||||
|
* @param initialSwitchOtherCollectData
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> getSwitchPowerMsg(InitialSwitchOtherCollectData initialSwitchOtherCollectData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图形监控交换机设备内存利用率
|
||||||
|
* @param initialSwitchOtherCollectData
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> getSwitchMemUseMsg(InitialSwitchOtherCollectData initialSwitchOtherCollectData);
|
||||||
}
|
}
|
||||||
|
|||||||
+29
@@ -3,6 +3,7 @@ package com.ruoyi.rocketmq.service;
|
|||||||
import com.ruoyi.rocketmq.domain.InitialSwitchPowerSupply;
|
import com.ruoyi.rocketmq.domain.InitialSwitchPowerSupply;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电源信息Service接口
|
* 电源信息Service接口
|
||||||
@@ -66,4 +67,32 @@ public interface IInitialSwitchPowerSupplyService
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int insertBatchInitialSwitchPowerSupply(List<InitialSwitchPowerSupply> list);
|
public int insertBatchInitialSwitchPowerSupply(List<InitialSwitchPowerSupply> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定交换机的电源名称
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map> getAllPwrName(InitialSwitchPowerSupply initialSwitchPowerSupply);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电源的基础信息
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map> getPwrMsg(InitialSwitchPowerSupply initialSwitchPowerSupply);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电源电流
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> getPwrCurrent(InitialSwitchPowerSupply initialSwitchPowerSupply);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电源电压
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> getPwrVoltage(InitialSwitchPowerSupply initialSwitchPowerSupply);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,13 @@ public interface IRmMonitorPolicyService
|
|||||||
|
|
||||||
int addRmMonitorPolicy(RmMonitorPolicy rmMonitorPolicy);
|
int addRmMonitorPolicy(RmMonitorPolicy rmMonitorPolicy);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增交换机监控策略
|
||||||
|
* @param rmMonitorPolicy
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int addSwitchPolicy(RmMonitorPolicy rmMonitorPolicy);
|
||||||
|
|
||||||
Map<String, Object> getRmMonitorPolicyMsgById(Long id);
|
Map<String, Object> getRmMonitorPolicyMsgById(Long id);
|
||||||
|
|
||||||
int issuePolicy(Long id);
|
int issuePolicy(Long id);
|
||||||
|
|||||||
+21
@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 风扇信息Service业务层处理
|
* 风扇信息Service业务层处理
|
||||||
@@ -102,4 +103,24 @@ public class InitialSwitchFanInfoServiceImpl implements IInitialSwitchFanInfoSer
|
|||||||
public int insertBatchInitialSwitchFanInfo(List<InitialSwitchFanInfo> list) {
|
public int insertBatchInitialSwitchFanInfo(List<InitialSwitchFanInfo> list) {
|
||||||
return initialSwitchFanInfoMapper.insertBatchInitialSwitchFanInfo(list);
|
return initialSwitchFanInfoMapper.insertBatchInitialSwitchFanInfo(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定交换机的风扇名称
|
||||||
|
* @param initialSwitchFanInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map> getAllFanName(InitialSwitchFanInfo initialSwitchFanInfo) {
|
||||||
|
return initialSwitchFanInfoMapper.getAllFanName(initialSwitchFanInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取风扇基础信息
|
||||||
|
* @param initialSwitchFanInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<InitialSwitchFanInfo> getFanMsg(InitialSwitchFanInfo initialSwitchFanInfo) {
|
||||||
|
return initialSwitchFanInfoMapper.getFanMsg(initialSwitchFanInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+43
@@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Isolation;
|
import org.springframework.transaction.annotation.Isolation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -144,4 +145,46 @@ public class InitialSwitchInfoServiceImpl implements IInitialSwitchInfoService
|
|||||||
extractors.put("netOutSpeedData", info -> info.getOutSpeed());
|
extractors.put("netOutSpeedData", info -> info.getOutSpeed());
|
||||||
return EchartsDataUtils.buildEchartsData(list, InitialSwitchInfo::getCreateTime, extractors);
|
return EchartsDataUtils.buildEchartsData(list, InitialSwitchInfo::getCreateTime, extractors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 丢包数
|
||||||
|
* @param initialSwitchInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> switchNetDiscardsEcharts(InitialSwitchInfo initialSwitchInfo) {
|
||||||
|
List<InitialSwitchInfo> list = initialSwitchInfoMapper.selectInitialSwitchInfoList(initialSwitchInfo);
|
||||||
|
Map<String, Function<InitialSwitchInfo, ?>> extractors = new LinkedHashMap<>();
|
||||||
|
extractors.put("netInDiscardsData", info -> info.getIfInDiscards());
|
||||||
|
extractors.put("netOutDiscardsData", info -> info.getIfOutDiscards());
|
||||||
|
return EchartsDataUtils.buildEchartsData(list, InitialSwitchInfo::getCreateTime, extractors);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流量总数
|
||||||
|
* @param initialSwitchInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> switchNetTotalEcharts(InitialSwitchInfo initialSwitchInfo) {
|
||||||
|
List<InitialSwitchInfo> list = initialSwitchInfoMapper.selectInitialSwitchInfoList(initialSwitchInfo);
|
||||||
|
Map<String, Function<InitialSwitchInfo, ?>> extractors = new LinkedHashMap<>();
|
||||||
|
extractors.put("netInTotalData", info -> info.getInBytes().multiply(new BigDecimal(8)));
|
||||||
|
extractors.put("netOutTotalData", info -> info.getOutBytes().multiply(new BigDecimal(8)));
|
||||||
|
return EchartsDataUtils.buildEchartsData(list, InitialSwitchInfo::getCreateTime, extractors);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 错误包数
|
||||||
|
* @param initialSwitchInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> switchNetErrDiscardsEcharts(InitialSwitchInfo initialSwitchInfo) {
|
||||||
|
List<InitialSwitchInfo> list = initialSwitchInfoMapper.selectInitialSwitchInfoList(initialSwitchInfo);
|
||||||
|
Map<String, Function<InitialSwitchInfo, ?>> extractors = new LinkedHashMap<>();
|
||||||
|
extractors.put("netInErrDiscardsData", info -> info.getIfInErrors());
|
||||||
|
extractors.put("netOutErrDiscardsData", info -> info.getIfOutErrors());
|
||||||
|
return EchartsDataUtils.buildEchartsData(list, InitialSwitchInfo::getCreateTime, extractors);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+63
@@ -4,10 +4,14 @@ import com.ruoyi.common.core.utils.DateUtils;
|
|||||||
import com.ruoyi.rocketmq.domain.InitialSwitchMpuInfo;
|
import com.ruoyi.rocketmq.domain.InitialSwitchMpuInfo;
|
||||||
import com.ruoyi.rocketmq.mapper.InitialSwitchMpuInfoMapper;
|
import com.ruoyi.rocketmq.mapper.InitialSwitchMpuInfoMapper;
|
||||||
import com.ruoyi.rocketmq.service.IInitialSwitchMpuInfoService;
|
import com.ruoyi.rocketmq.service.IInitialSwitchMpuInfoService;
|
||||||
|
import com.ruoyi.rocketmq.utils.EchartsDataUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MPU信息Service业务层处理
|
* MPU信息Service业务层处理
|
||||||
@@ -103,4 +107,63 @@ public class InitialSwitchMpuInfoServiceImpl implements IInitialSwitchMpuInfoSer
|
|||||||
public int insertBatchInitialSwitchMpuInfo(List<InitialSwitchMpuInfo> list) {
|
public int insertBatchInitialSwitchMpuInfo(List<InitialSwitchMpuInfo> list) {
|
||||||
return initialSwitchMpuInfoMapper.insertBatchInitialSwitchMpuInfo(list);
|
return initialSwitchMpuInfoMapper.insertBatchInitialSwitchMpuInfo(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指定交换机的mpu名称
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map> getAllMpuName(InitialSwitchMpuInfo initialSwitchMpuInfo) {
|
||||||
|
return initialSwitchMpuInfoMapper.getAllMpuName(initialSwitchMpuInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取mpu基础信息
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<InitialSwitchMpuInfo> getMpuMsg(InitialSwitchMpuInfo initialSwitchMpuInfo) {
|
||||||
|
return initialSwitchMpuInfoMapper.getMpuMsg(initialSwitchMpuInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mpu的cpu利用率
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getMpuCpuUse(InitialSwitchMpuInfo initialSwitchMpuInfo) {
|
||||||
|
List<InitialSwitchMpuInfo> list = initialSwitchMpuInfoMapper.selectInitialSwitchMpuInfoList(initialSwitchMpuInfo);
|
||||||
|
Map<String, Function<InitialSwitchMpuInfo, ?>> extractors = new LinkedHashMap<>();
|
||||||
|
extractors.put("cpuUsage", info -> info.getMpuEntityCpuUsage());
|
||||||
|
return EchartsDataUtils.buildEchartsData(list, InitialSwitchMpuInfo::getCreateTime, extractors);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mpu的内存使用率
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getMpuMemUse(InitialSwitchMpuInfo initialSwitchMpuInfo) {
|
||||||
|
List<InitialSwitchMpuInfo> list = initialSwitchMpuInfoMapper.selectInitialSwitchMpuInfoList(initialSwitchMpuInfo);
|
||||||
|
Map<String, Function<InitialSwitchMpuInfo, ?>> extractors = new LinkedHashMap<>();
|
||||||
|
extractors.put("memUsage", info -> info.getMpuEntityMemUsage());
|
||||||
|
return EchartsDataUtils.buildEchartsData(list, InitialSwitchMpuInfo::getCreateTime, extractors);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mpu的温度
|
||||||
|
* @param initialSwitchMpuInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getMpuTemperature(InitialSwitchMpuInfo initialSwitchMpuInfo) {
|
||||||
|
List<InitialSwitchMpuInfo> list = initialSwitchMpuInfoMapper.selectInitialSwitchMpuInfoList(initialSwitchMpuInfo);
|
||||||
|
Map<String, Function<InitialSwitchMpuInfo, ?>> extractors = new LinkedHashMap<>();
|
||||||
|
extractors.put("temperature", info -> info.getMpuEntityTemperature());
|
||||||
|
return EchartsDataUtils.buildEchartsData(list, InitialSwitchMpuInfo::getCreateTime, extractors);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+52
@@ -4,10 +4,14 @@ import com.ruoyi.common.core.utils.DateUtils;
|
|||||||
import com.ruoyi.rocketmq.domain.InitialSwitchOpticalModule;
|
import com.ruoyi.rocketmq.domain.InitialSwitchOpticalModule;
|
||||||
import com.ruoyi.rocketmq.mapper.InitialSwitchOpticalModuleMapper;
|
import com.ruoyi.rocketmq.mapper.InitialSwitchOpticalModuleMapper;
|
||||||
import com.ruoyi.rocketmq.service.IInitialSwitchOpticalModuleService;
|
import com.ruoyi.rocketmq.service.IInitialSwitchOpticalModuleService;
|
||||||
|
import com.ruoyi.rocketmq.utils.EchartsDataUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 光模块信息Service业务层处理
|
* 光模块信息Service业务层处理
|
||||||
@@ -102,4 +106,52 @@ public class InitialSwitchOpticalModuleServiceImpl implements IInitialSwitchOpti
|
|||||||
public int batchInitialSwitchOpticalModule(List<InitialSwitchOpticalModule> list) {
|
public int batchInitialSwitchOpticalModule(List<InitialSwitchOpticalModule> list) {
|
||||||
return initialSwitchOpticalModuleMapper.batchInitialSwitchOpticalModule(list);
|
return initialSwitchOpticalModuleMapper.batchInitialSwitchOpticalModule(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光模块基础信息
|
||||||
|
* @param initialSwitchOpticalModule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<InitialSwitchOpticalModule> switchOpticalModuleMsg(InitialSwitchOpticalModule initialSwitchOpticalModule) {
|
||||||
|
return initialSwitchOpticalModuleMapper.switchOpticalModuleMsg(initialSwitchOpticalModule);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光模块名称查询
|
||||||
|
* @param initialSwitchOpticalModule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map> getAllModuleName(InitialSwitchOpticalModule initialSwitchOpticalModule) {
|
||||||
|
return initialSwitchOpticalModuleMapper.getAllModuleName(initialSwitchOpticalModule);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光衰阈值
|
||||||
|
* @param initialSwitchOpticalModule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> opticalModuleLowThreshold(InitialSwitchOpticalModule initialSwitchOpticalModule) {
|
||||||
|
List<InitialSwitchOpticalModule> list = initialSwitchOpticalModuleMapper.selectInitialSwitchOpticalModuleList(initialSwitchOpticalModule);
|
||||||
|
Map<String, Function<InitialSwitchOpticalModule, ?>> extractors = new LinkedHashMap<>();
|
||||||
|
extractors.put("TxLowThreshold", info -> info.getHwEntityOpticalTxLowThreshold());
|
||||||
|
extractors.put("RxLowThreshold", info -> info.getHwEntityOpticalRxLowThreshold());
|
||||||
|
return EchartsDataUtils.buildEchartsData(list, InitialSwitchOpticalModule::getCreateTime, extractors);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 功率
|
||||||
|
* @param initialSwitchOpticalModule
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> opticalModulePower(InitialSwitchOpticalModule initialSwitchOpticalModule) {
|
||||||
|
List<InitialSwitchOpticalModule> list = initialSwitchOpticalModuleMapper.selectInitialSwitchOpticalModuleList(initialSwitchOpticalModule);
|
||||||
|
Map<String, Function<InitialSwitchOpticalModule, ?>> extractors = new LinkedHashMap<>();
|
||||||
|
extractors.put("TxPower", info -> info.getHwEntityOpticalTxPower());
|
||||||
|
extractors.put("RxPower", info -> info.getHwEntityOpticalRxPower());
|
||||||
|
return EchartsDataUtils.buildEchartsData(list, InitialSwitchOpticalModule::getCreateTime, extractors);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+104
-1
@@ -2,12 +2,17 @@ package com.ruoyi.rocketmq.service.impl;
|
|||||||
|
|
||||||
import com.ruoyi.common.core.utils.DateUtils;
|
import com.ruoyi.common.core.utils.DateUtils;
|
||||||
import com.ruoyi.rocketmq.domain.InitialSwitchOtherCollectData;
|
import com.ruoyi.rocketmq.domain.InitialSwitchOtherCollectData;
|
||||||
|
import com.ruoyi.rocketmq.enums.SwitchLogo;
|
||||||
import com.ruoyi.rocketmq.mapper.InitialSwitchOtherCollectDataMapper;
|
import com.ruoyi.rocketmq.mapper.InitialSwitchOtherCollectDataMapper;
|
||||||
import com.ruoyi.rocketmq.service.IInitialSwitchOtherCollectDataService;
|
import com.ruoyi.rocketmq.service.IInitialSwitchOtherCollectDataService;
|
||||||
|
import com.ruoyi.rocketmq.utils.EchartsDataUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交换机系统其他信息采集数据Service业务层处理
|
* 交换机系统其他信息采集数据Service业务层处理
|
||||||
@@ -93,4 +98,102 @@ public class InitialSwitchOtherCollectDataServiceImpl implements IInitialSwitchO
|
|||||||
{
|
{
|
||||||
return initialSwitchOtherCollectDataMapper.deleteInitialSwitchOtherCollectDataById(id);
|
return initialSwitchOtherCollectDataMapper.deleteInitialSwitchOtherCollectDataById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map> getSwitchMonitorMsg(InitialSwitchOtherCollectData initialSwitchOtherCollectData) {
|
||||||
|
|
||||||
|
return initialSwitchOtherCollectDataMapper.getSwitchMonitorMsg(initialSwitchOtherCollectData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图形监控交换机设备CPU使用率
|
||||||
|
* @param initialSwitchOtherCollectData
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getSwitchCpuUseMsg(InitialSwitchOtherCollectData initialSwitchOtherCollectData) {
|
||||||
|
initialSwitchOtherCollectData.setCollectType(SwitchLogo.设备CPU使用率.getCode());
|
||||||
|
List<InitialSwitchOtherCollectData> list = initialSwitchOtherCollectDataMapper.selectInitialSwitchOtherCollectDataList(initialSwitchOtherCollectData);
|
||||||
|
|
||||||
|
Map<String, Function<InitialSwitchOtherCollectData, ?>> extractors = new LinkedHashMap<>();
|
||||||
|
extractors.put("switchCpuUse", InitialSwitchOtherCollectData::getCollectValue);
|
||||||
|
|
||||||
|
return EchartsDataUtils.buildEchartsData(list,InitialSwitchOtherCollectData::getCreateTime, extractors);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图形监控交换机设备系统功率
|
||||||
|
* @param initialSwitchOtherCollectData
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getSwitchPowerMsg(InitialSwitchOtherCollectData initialSwitchOtherCollectData) {
|
||||||
|
initialSwitchOtherCollectData.setCollectType(SwitchLogo.系统平均功率.getCode());
|
||||||
|
List<InitialSwitchOtherCollectData> avgList = initialSwitchOtherCollectDataMapper.selectInitialSwitchOtherCollectDataList(initialSwitchOtherCollectData);
|
||||||
|
initialSwitchOtherCollectData.setCollectType(SwitchLogo.系统实时功率.getCode());
|
||||||
|
List<InitialSwitchOtherCollectData> currentList = initialSwitchOtherCollectDataMapper.selectInitialSwitchOtherCollectDataList(initialSwitchOtherCollectData);
|
||||||
|
// 先按时间排序
|
||||||
|
avgList.sort(Comparator.comparing(InitialSwitchOtherCollectData::getCreateTime));
|
||||||
|
currentList.sort(Comparator.comparing(InitialSwitchOtherCollectData::getCreateTime));
|
||||||
|
|
||||||
|
// 提取x轴数据(以平均功率的时间为准)
|
||||||
|
List<String> xData = avgList.stream()
|
||||||
|
.map(data -> {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd HH:mm");
|
||||||
|
return sdf.format(data.getCreateTime());
|
||||||
|
})
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 提取y轴数据
|
||||||
|
List<Object> avgPowerData = avgList.stream()
|
||||||
|
.map(data -> {
|
||||||
|
try {
|
||||||
|
return Double.parseDouble(data.getCollectValue());
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
List<Object> currentPowerData = new ArrayList<>();
|
||||||
|
// 如果两个列表的时间点不完全一致,需要匹配时间
|
||||||
|
for (InitialSwitchOtherCollectData avgData : avgList) {
|
||||||
|
Optional<InitialSwitchOtherCollectData> match = currentList.stream()
|
||||||
|
.filter(current -> current.getCreateTime().equals(avgData.getCreateTime()))
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
|
if (match.isPresent()) {
|
||||||
|
try {
|
||||||
|
currentPowerData.add(Double.parseDouble(match.get().getCollectValue()));
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
currentPowerData.add(0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
currentPowerData.add(0); // 没有对应时间点的数据用0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Map<String, Object> yData = new HashMap<>();
|
||||||
|
yData.put("switchAvgPower", avgPowerData);
|
||||||
|
yData.put("switchcurrentPower", currentPowerData);
|
||||||
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
|
resultMap.put("xData", xData);
|
||||||
|
resultMap.put("yData", yData);
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图形监控交换机设备内存使用率
|
||||||
|
* @param initialSwitchOtherCollectData
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getSwitchMemUseMsg(InitialSwitchOtherCollectData initialSwitchOtherCollectData) {
|
||||||
|
initialSwitchOtherCollectData.setCollectType(SwitchLogo.设备内存使用率.getCode());
|
||||||
|
List<InitialSwitchOtherCollectData> list = initialSwitchOtherCollectDataMapper.selectInitialSwitchOtherCollectDataList(initialSwitchOtherCollectData);
|
||||||
|
|
||||||
|
Map<String, Function<InitialSwitchOtherCollectData, ?>> extractors = new LinkedHashMap<>();
|
||||||
|
extractors.put("switchMemUse", InitialSwitchOtherCollectData::getCollectValue);
|
||||||
|
|
||||||
|
return EchartsDataUtils.buildEchartsData(list,InitialSwitchOtherCollectData::getCreateTime, extractors);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+50
@@ -4,10 +4,14 @@ import com.ruoyi.common.core.utils.DateUtils;
|
|||||||
import com.ruoyi.rocketmq.domain.InitialSwitchPowerSupply;
|
import com.ruoyi.rocketmq.domain.InitialSwitchPowerSupply;
|
||||||
import com.ruoyi.rocketmq.mapper.InitialSwitchPowerSupplyMapper;
|
import com.ruoyi.rocketmq.mapper.InitialSwitchPowerSupplyMapper;
|
||||||
import com.ruoyi.rocketmq.service.IInitialSwitchPowerSupplyService;
|
import com.ruoyi.rocketmq.service.IInitialSwitchPowerSupplyService;
|
||||||
|
import com.ruoyi.rocketmq.utils.EchartsDataUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电源信息Service业务层处理
|
* 电源信息Service业务层处理
|
||||||
@@ -102,4 +106,50 @@ public class InitialSwitchPowerSupplyServiceImpl implements IInitialSwitchPowerS
|
|||||||
public int insertBatchInitialSwitchPowerSupply(List<InitialSwitchPowerSupply> list){
|
public int insertBatchInitialSwitchPowerSupply(List<InitialSwitchPowerSupply> list){
|
||||||
return initialSwitchPowerSupplyMapper.insertBatchInitialSwitchPowerSupply(list);
|
return initialSwitchPowerSupplyMapper.insertBatchInitialSwitchPowerSupply(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定交换机的电源名称
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map> getAllPwrName(InitialSwitchPowerSupply initialSwitchPowerSupply) {
|
||||||
|
return initialSwitchPowerSupplyMapper.getAllPwrName(initialSwitchPowerSupply);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电源基础信息
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map> getPwrMsg(InitialSwitchPowerSupply initialSwitchPowerSupply) {
|
||||||
|
return initialSwitchPowerSupplyMapper.getPwrMsg(initialSwitchPowerSupply);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电源电流
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getPwrCurrent(InitialSwitchPowerSupply initialSwitchPowerSupply) {
|
||||||
|
List<InitialSwitchPowerSupply> list = initialSwitchPowerSupplyMapper.selectInitialSwitchPowerSupplyList(initialSwitchPowerSupply);
|
||||||
|
Map<String, Function<InitialSwitchPowerSupply, ?>> extractors = new LinkedHashMap<>();
|
||||||
|
extractors.put("pwrCurrent", info -> info.getPwrEntityPwrCurrent());
|
||||||
|
return EchartsDataUtils.buildEchartsData(list, InitialSwitchPowerSupply::getCreateTime, extractors);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电源电压
|
||||||
|
* @param initialSwitchPowerSupply
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getPwrVoltage(InitialSwitchPowerSupply initialSwitchPowerSupply) {
|
||||||
|
List<InitialSwitchPowerSupply> list = initialSwitchPowerSupplyMapper.selectInitialSwitchPowerSupplyList(initialSwitchPowerSupply);
|
||||||
|
Map<String, Function<InitialSwitchPowerSupply, ?>> extractors = new LinkedHashMap<>();
|
||||||
|
extractors.put("pwrVoltage", info -> info.getPwrEntityPwrVoltage());
|
||||||
|
return EchartsDataUtils.buildEchartsData(list, InitialSwitchPowerSupply::getCreateTime, extractors);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+47
-4
@@ -3,15 +3,13 @@ package com.ruoyi.rocketmq.service.impl;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.ruoyi.common.core.enums.MsgEnum;
|
import com.ruoyi.common.core.enums.MsgEnum;
|
||||||
import com.ruoyi.common.core.utils.DateUtils;
|
import com.ruoyi.common.core.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||||
import com.ruoyi.rocketmq.domain.*;
|
import com.ruoyi.rocketmq.domain.*;
|
||||||
import com.ruoyi.rocketmq.domain.vo.CollectVo;
|
import com.ruoyi.rocketmq.domain.vo.CollectVo;
|
||||||
import com.ruoyi.rocketmq.domain.vo.RegisterSwitchVo;
|
import com.ruoyi.rocketmq.domain.vo.RegisterSwitchVo;
|
||||||
import com.ruoyi.rocketmq.domain.vo.RmMonitorPolicyVo;
|
import com.ruoyi.rocketmq.domain.vo.RmMonitorPolicyVo;
|
||||||
import com.ruoyi.rocketmq.domain.vo.SwitchOidVo;
|
import com.ruoyi.rocketmq.domain.vo.SwitchOidVo;
|
||||||
import com.ruoyi.rocketmq.mapper.RmMonitorPolicyMapper;
|
import com.ruoyi.rocketmq.mapper.*;
|
||||||
import com.ruoyi.rocketmq.mapper.RmMonitorTemplateMapper;
|
|
||||||
import com.ruoyi.rocketmq.mapper.RmTemplateLinuxMapper;
|
|
||||||
import com.ruoyi.rocketmq.mapper.RmTemplateSwitchMapper;
|
|
||||||
import com.ruoyi.rocketmq.model.ProducerMode;
|
import com.ruoyi.rocketmq.model.ProducerMode;
|
||||||
import com.ruoyi.rocketmq.producer.MessageProducer;
|
import com.ruoyi.rocketmq.producer.MessageProducer;
|
||||||
import com.ruoyi.rocketmq.service.IRmMonitorPolicyService;
|
import com.ruoyi.rocketmq.service.IRmMonitorPolicyService;
|
||||||
@@ -53,6 +51,8 @@ public class RmMonitorPolicyServiceImpl implements IRmMonitorPolicyService
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RmMonitorTemplateMapper rmMonitorTemplateMapper;
|
private RmMonitorTemplateMapper rmMonitorTemplateMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private RmInitialMonitorItemMapper rmInitialMonitorItemMapper;
|
||||||
|
@Autowired
|
||||||
private DataProcessUtil dataProcessUtil;
|
private DataProcessUtil dataProcessUtil;
|
||||||
|
|
||||||
|
|
||||||
@@ -237,6 +237,49 @@ public class RmMonitorPolicyServiceImpl implements IRmMonitorPolicyService
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int addSwitchPolicy(RmMonitorPolicy rmMonitorPolicy) {
|
||||||
|
// 保存策略信息
|
||||||
|
rmMonitorPolicy.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
rmMonitorPolicyMapper.insertRmMonitorPolicy(rmMonitorPolicy);
|
||||||
|
// 拿到采集周期
|
||||||
|
List<RmMonitorPolicyVo> collectionAndIdList = rmMonitorPolicy.getCollectionAndIdList();
|
||||||
|
if(!collectionAndIdList.isEmpty()){
|
||||||
|
if("linux".equals(rmMonitorPolicy.getResourceType())){
|
||||||
|
for (RmMonitorPolicyVo rmMonitorPolicyVo : collectionAndIdList) {
|
||||||
|
RmInitialMonitorItem monitorItems = rmInitialMonitorItemMapper.selectRmInitialMonitorItemById(rmMonitorPolicyVo.getId());
|
||||||
|
RmTemplateLinux linuxItem = new RmTemplateLinux();
|
||||||
|
linuxItem.setPolicyId(rmMonitorPolicy.getId());
|
||||||
|
linuxItem.setMetricKey(monitorItems.getMetricKey());
|
||||||
|
linuxItem.setMetricName(monitorItems.getMetricName());
|
||||||
|
linuxItem.setDataType(monitorItems.getDataType());
|
||||||
|
linuxItem.setItemType(monitorItems.getItemType());
|
||||||
|
linuxItem.setCollectionCycle(rmMonitorPolicyVo.getCollectionCycle());
|
||||||
|
rmTemplateLinuxMapper.insertRmTemplateLinux(linuxItem);
|
||||||
|
}
|
||||||
|
}else if("switch".equals(rmMonitorPolicy.getResourceType())){
|
||||||
|
for (RmMonitorPolicyVo rmMonitorPolicyVo : collectionAndIdList) {
|
||||||
|
// 根据监控信息id查询详细信息
|
||||||
|
RmInitialMonitorItem monitorItems = rmInitialMonitorItemMapper.selectRmInitialMonitorItemById(rmMonitorPolicyVo.getId());
|
||||||
|
RmTemplateSwitch switchItem = new RmTemplateSwitch();
|
||||||
|
switchItem.setPolicyId(rmMonitorPolicy.getId());
|
||||||
|
switchItem.setMetricKey(monitorItems.getMetricKey());
|
||||||
|
switchItem.setMetricName(monitorItems.getMetricName());
|
||||||
|
switchItem.setOid(monitorItems.getOid());
|
||||||
|
switchItem.setFilterValue(monitorItems.getFilterValue());
|
||||||
|
switchItem.setSwitchDescription(monitorItems.getMonitorDescription());
|
||||||
|
switchItem.setDataType(monitorItems.getDataType());
|
||||||
|
switchItem.setItemType(monitorItems.getItemType());
|
||||||
|
switchItem.setCollectionCycle(rmMonitorPolicyVo.getCollectionCycle());
|
||||||
|
rmTemplateSwitchMapper.insertRmTemplateSwitch(switchItem);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询监控策略详情
|
* 根据id查询监控策略详情
|
||||||
* @param id
|
* @param id
|
||||||
|
|||||||
@@ -110,4 +110,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
<select id="getAllFanName" parameterType="InitialSwitchFanInfo" resultType="java.util.Map">
|
||||||
|
select fan_name fanName from initial_switch_fan_info
|
||||||
|
<where>
|
||||||
|
<if test="fanEntIndex != null and fanEntIndex != ''"> and fan_ent_index = #{fanEntIndex}</if>
|
||||||
|
<if test="fanName != null and fanName != ''"> and fan_name like concat('%', #{fanName}, '%')</if>
|
||||||
|
<if test="fanEntityFanState != null and fanEntityFanState != ''"> and fan_entity_fan_state = #{fanEntityFanState}</if>
|
||||||
|
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||||
|
</where>
|
||||||
|
group by fan_name
|
||||||
|
</select>
|
||||||
|
<select id="getFanMsg" parameterType="InitialSwitchFanInfo" resultMap="InitialSwitchFanInfoResult">
|
||||||
|
<include refid="selectInitialSwitchFanInfoVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="fanEntIndex != null and fanEntIndex != ''"> and fan_ent_index = #{fanEntIndex}</if>
|
||||||
|
<if test="fanName != null and fanName != ''"> and fan_name like concat('%', #{fanName}, '%')</if>
|
||||||
|
<if test="fanEntityFanState != null and fanEntityFanState != ''"> and fan_entity_fan_state = #{fanEntityFanState}</if>
|
||||||
|
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||||
|
</where>
|
||||||
|
order by create_time desc limit 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -33,6 +33,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="mpuPhysicalSoftwareRev != null and mpuPhysicalSoftwareRev != ''"> and mpu_physical_software_rev = #{mpuPhysicalSoftwareRev}</if>
|
<if test="mpuPhysicalSoftwareRev != null and mpuPhysicalSoftwareRev != ''"> and mpu_physical_software_rev = #{mpuPhysicalSoftwareRev}</if>
|
||||||
<if test="mpuEntityTemperature != null "> and mpu_entity_temperature = #{mpuEntityTemperature}</if>
|
<if test="mpuEntityTemperature != null "> and mpu_entity_temperature = #{mpuEntityTemperature}</if>
|
||||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||||
|
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||||
|
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -131,4 +133,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
<select id="getMpuMsg" parameterType="InitialSwitchMpuInfo" resultMap="InitialSwitchMpuInfoResult">
|
||||||
|
<include refid="selectInitialSwitchMpuInfoVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="mpuEntIndex != null and mpuEntIndex != ''"> and mpu_ent_index = #{mpuEntIndex}</if>
|
||||||
|
<if test="mpuName != null and mpuName != ''"> and mpu_name like concat('%', #{mpuName}, '%')</if>
|
||||||
|
<if test="mpuEntityCpuUsage != null "> and mpu_entity_cpu_usage = #{mpuEntityCpuUsage}</if>
|
||||||
|
<if test="mpuEntityMemUsage != null "> and mpu_entity_mem_usage = #{mpuEntityMemUsage}</if>
|
||||||
|
<if test="mpuPhysicalSoftwareRev != null and mpuPhysicalSoftwareRev != ''"> and mpu_physical_software_rev = #{mpuPhysicalSoftwareRev}</if>
|
||||||
|
<if test="mpuEntityTemperature != null "> and mpu_entity_temperature = #{mpuEntityTemperature}</if>
|
||||||
|
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||||
|
</where>
|
||||||
|
order by create_time desc limit 1
|
||||||
|
</select>
|
||||||
|
<select id="getAllMpuName" parameterType="InitialSwitchMpuInfo" resultType="java.util.Map">
|
||||||
|
select mpu_name mpuName from initial_switch_mpu_info
|
||||||
|
<where>
|
||||||
|
<if test="mpuEntIndex != null and mpuEntIndex != ''"> and mpu_ent_index = #{mpuEntIndex}</if>
|
||||||
|
<if test="mpuName != null and mpuName != ''"> and mpu_name like concat('%', #{mpuName}, '%')</if>
|
||||||
|
<if test="mpuEntityCpuUsage != null "> and mpu_entity_cpu_usage = #{mpuEntityCpuUsage}</if>
|
||||||
|
<if test="mpuEntityMemUsage != null "> and mpu_entity_mem_usage = #{mpuEntityMemUsage}</if>
|
||||||
|
<if test="mpuPhysicalSoftwareRev != null and mpuPhysicalSoftwareRev != ''"> and mpu_physical_software_rev = #{mpuPhysicalSoftwareRev}</if>
|
||||||
|
<if test="mpuEntityTemperature != null "> and mpu_entity_temperature = #{mpuEntityTemperature}</if>
|
||||||
|
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||||
|
</where>
|
||||||
|
group by mpu_name
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
+29
@@ -33,6 +33,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="hwEntityOpticalRxPower != null "> and hw_entity_optical_rx_power = #{hwEntityOpticalRxPower}</if>
|
<if test="hwEntityOpticalRxPower != null "> and hw_entity_optical_rx_power = #{hwEntityOpticalRxPower}</if>
|
||||||
<if test="hwEntityOpticalTxPower != null "> and hw_entity_optical_tx_power = #{hwEntityOpticalTxPower}</if>
|
<if test="hwEntityOpticalTxPower != null "> and hw_entity_optical_tx_power = #{hwEntityOpticalTxPower}</if>
|
||||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||||
|
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||||
|
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -131,4 +133,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
<select id="switchOpticalModuleMsg" parameterType="InitialSwitchOpticalModule" resultMap="InitialSwitchOpticalModuleResult">
|
||||||
|
<include refid="selectInitialSwitchOpticalModuleVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="fiberEntIndex != null and fiberEntIndex != ''"> and fiber_ent_index = #{fiberEntIndex}</if>
|
||||||
|
<if test="fiberPortName != null and fiberPortName != ''"> and fiber_port_name like concat('%', #{fiberPortName}, '%')</if>
|
||||||
|
<if test="hwEntityOpticalTxLowThreshold != null "> and hw_entity_optical_tx_low_threshold = #{hwEntityOpticalTxLowThreshold}</if>
|
||||||
|
<if test="hwEntityOpticalRxLowThreshold != null "> and hw_entity_optical_rx_low_threshold = #{hwEntityOpticalRxLowThreshold}</if>
|
||||||
|
<if test="hwEntityOpticalRxPower != null "> and hw_entity_optical_rx_power = #{hwEntityOpticalRxPower}</if>
|
||||||
|
<if test="hwEntityOpticalTxPower != null "> and hw_entity_optical_tx_power = #{hwEntityOpticalTxPower}</if>
|
||||||
|
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||||
|
</where>
|
||||||
|
order by create_time desc limit 1
|
||||||
|
</select>
|
||||||
|
<select id="getAllModuleName" parameterType="InitialSwitchOpticalModule" resultType="java.util.Map">
|
||||||
|
select fiber_port_name fiberPortName from initial_switch_optical_module
|
||||||
|
<where>
|
||||||
|
<if test="fiberEntIndex != null and fiberEntIndex != ''"> and fiber_ent_index = #{fiberEntIndex}</if>
|
||||||
|
<if test="fiberPortName != null and fiberPortName != ''"> and fiber_port_name like concat('%', #{fiberPortName}, '%')</if>
|
||||||
|
<if test="hwEntityOpticalTxLowThreshold != null "> and hw_entity_optical_tx_low_threshold = #{hwEntityOpticalTxLowThreshold}</if>
|
||||||
|
<if test="hwEntityOpticalRxLowThreshold != null "> and hw_entity_optical_rx_low_threshold = #{hwEntityOpticalRxLowThreshold}</if>
|
||||||
|
<if test="hwEntityOpticalRxPower != null "> and hw_entity_optical_rx_power = #{hwEntityOpticalRxPower}</if>
|
||||||
|
<if test="hwEntityOpticalTxPower != null "> and hw_entity_optical_tx_power = #{hwEntityOpticalTxPower}</if>
|
||||||
|
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||||
|
</where>
|
||||||
|
group by fiber_port_name
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
+2
@@ -25,6 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||||
<if test="collectType != null and collectType != ''"> and collect_type = #{collectType}</if>
|
<if test="collectType != null and collectType != ''"> and collect_type = #{collectType}</if>
|
||||||
<if test="collectValue != null and collectValue != ''"> and collect_value = #{collectValue}</if>
|
<if test="collectValue != null and collectValue != ''"> and collect_value = #{collectValue}</if>
|
||||||
|
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||||
|
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="pwrEntityPwrCurrent != null "> and pwr_entity_pwr_current = #{pwrEntityPwrCurrent}</if>
|
<if test="pwrEntityPwrCurrent != null "> and pwr_entity_pwr_current = #{pwrEntityPwrCurrent}</if>
|
||||||
<if test="pwrEntityPwrVoltage != null "> and pwr_entity_pwr_voltage = #{pwrEntityPwrVoltage}</if>
|
<if test="pwrEntityPwrVoltage != null "> and pwr_entity_pwr_voltage = #{pwrEntityPwrVoltage}</if>
|
||||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||||
|
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||||
|
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -124,4 +126,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
<select id="getAllPwrName" parameterType="InitialSwitchPowerSupply" resultType="java.util.Map">
|
||||||
|
select pwr_name pwrName from initial_switch_power_supply
|
||||||
|
<where>
|
||||||
|
<if test="pwrEntIndex != null and pwrEntIndex != ''"> and pwr_ent_index = #{pwrEntIndex}</if>
|
||||||
|
<if test="pwrName != null and pwrName != ''"> and pwr_name like concat('%', #{pwrName}, '%')</if>
|
||||||
|
<if test="pwrEntityPwrState != null and pwrEntityPwrState != ''"> and pwr_entity_pwr_state = #{pwrEntityPwrState}</if>
|
||||||
|
<if test="pwrEntityPwrCurrent != null "> and pwr_entity_pwr_current = #{pwrEntityPwrCurrent}</if>
|
||||||
|
<if test="pwrEntityPwrVoltage != null "> and pwr_entity_pwr_voltage = #{pwrEntityPwrVoltage}</if>
|
||||||
|
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||||
|
</where>
|
||||||
|
group by pwr_name
|
||||||
|
</select>
|
||||||
|
<select id="getPwrMsg" parameterType="InitialSwitchPowerSupply" resultMap="InitialSwitchPowerSupplyResult">
|
||||||
|
<include refid="selectInitialSwitchPowerSupplyVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="pwrEntIndex != null and pwrEntIndex != ''"> and pwr_ent_index = #{pwrEntIndex}</if>
|
||||||
|
<if test="pwrName != null and pwrName != ''"> and pwr_name like concat('%', #{pwrName}, '%')</if>
|
||||||
|
<if test="pwrEntityPwrState != null and pwrEntityPwrState != ''"> and pwr_entity_pwr_state = #{pwrEntityPwrState}</if>
|
||||||
|
<if test="pwrEntityPwrCurrent != null "> and pwr_entity_pwr_current = #{pwrEntityPwrCurrent}</if>
|
||||||
|
<if test="pwrEntityPwrVoltage != null "> and pwr_entity_pwr_voltage = #{pwrEntityPwrVoltage}</if>
|
||||||
|
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||||
|
</where>
|
||||||
|
order by create_time desc limit 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
+21
@@ -79,4 +79,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
<select id="getSwitchMonitorMsg" parameterType="InitialSwitchOtherCollectData" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
MAX(CASE WHEN t.collect_type = 'sysDescr' THEN t.collect_value END) as sysDescr,
|
||||||
|
MAX(CASE WHEN t.collect_type = 'sysObjectID' THEN t.collect_value END) as sysObjectID,
|
||||||
|
MAX(CASE WHEN t.collect_type = 'sysUpTime' THEN t.collect_value END) as sysUpTime,
|
||||||
|
MAX(CASE WHEN t.collect_type = 'sysContact' THEN t.collect_value END) as sysContact,
|
||||||
|
MAX(CASE WHEN t.collect_type = 'sysName' THEN t.collect_value END) as sysName,
|
||||||
|
MAX(CASE WHEN t.collect_type = 'sysLocation' THEN t.collect_value END) as sysLocation,
|
||||||
|
MAX(CASE WHEN t.collect_type = 'hwStackSystemMac' THEN t.collect_value END) as hwStackSystemMac,
|
||||||
|
MAX(CASE WHEN t.collect_type = 'entIndex' THEN t.collect_value END) as entIndex,
|
||||||
|
MAX(CASE WHEN t.collect_type = 'entPhysicalName' THEN t.collect_value END) as entPhysicalName,
|
||||||
|
MAX(CASE WHEN t.collect_type = 'entPhysicalSoftwareRev' THEN t.collect_value END) as entPhysicalSoftwareRev
|
||||||
|
FROM `initial_switch_other_collect_data` t
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT client_id, MAX(create_time) as max_time
|
||||||
|
FROM `initial_switch_other_collect_data`
|
||||||
|
WHERE client_id = #{clientId}
|
||||||
|
GROUP BY client_id
|
||||||
|
) latest ON t.client_id = latest.client_id AND t.create_time = latest.max_time
|
||||||
|
WHERE t.client_id = #{clientId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user