Compare commits

..

No commits in common. '534a16070240d41e4cefd2848dec15aba8f5458d' and '62be1abd27bf225978968051fc47d5946062fb0d' have entirely different histories.

  1. 2
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquInterface.java
  2. 2
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquRouting.java
  3. 5
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquVeneer.java
  4. 2
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/EquBaseQueryDto.java
  5. 1
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/EquMonitorHomeDto.java
  6. 14
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/MonitorLastDto.java
  7. 9
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/MonitorListDto.java
  8. 80
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquBaseMapper.xml
  9. 2
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquVlanMapper.xml

@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @date 2025-08-20
*/
@Data
public class EquInterface
public class EquInterface extends BaseEntity
{
private static final long serialVersionUID = 1L;

@ -14,7 +14,7 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2025-08-15
*/
@Data
public class EquRouting
public class EquRouting extends BaseEntity
{
private static final long serialVersionUID = 1L;

@ -14,7 +14,7 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2025-08-15
*/
@Data
public class EquVeneer
public class EquVeneer extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -34,7 +34,8 @@ public class EquVeneer
@Excel(name = "采集id")
private String equGatherId;
@Excel(name = "采集+预警同一批标志")
private String batchId;
public void setId(String id)
{

@ -19,8 +19,6 @@ public class EquBaseQueryDto implements Serializable {
/** 设备类型 (equ_type, varchar) */
private String equTypeId;
/** 设备类型 (equ_type, varchar) */
private String equTypeId;
/** 设备类型 (equ_type, varchar) */
private String equType;
/** 设备名称 (name, varchar) */
private String name;

@ -10,7 +10,6 @@ import java.util.Date;
@Data
public class EquMonitorHomeDto {
private String id;
private String equNumber; //设备编号
private String name; // 设备名称
private String location; // 设备位置
private Float cpuUtilization; // CPU 使用率

@ -18,8 +18,7 @@ public class MonitorLastDto {
private String temperature;
// equ_base 表
private String id;
private String equNumber;
private Long id;
private String name;
private String version;
private String deviceLevel;
@ -27,24 +26,19 @@ public class MonitorLastDto {
private String location;
private Date installDate;
private String inCharge;
private String status;
private int failureFrequency;
private int warranty;
private String equImage;
// equ_type
private String equTypeId;
private String equTypeName;
private String equType;
// equ_manu
private String equManuId;
private String equManuName;
private String manufacture;
private String ContactBy;
private String ContactWay;
// equ_supplier
private String supplierId;
private String supplierName;
private int AlertCount;
private String unhandledAlertCount;
}

@ -12,22 +12,19 @@ public class MonitorListDto {
private String id;
private String name;
private String ip;
private String equTypeId;
private String equTypeName;
private String equManuId;
private String equManuName;
private String equType;
private String manufacture;
private String version;
private String deviceLevel;
private String location;
private String status;
private int failureFrequency;
// 监控指标
private Float cpuUtilization;
private String health;
private int fanSpeed;
private String contWorkPeriod;
private int AlertCount;;
private int unhandledAlertCount;
}

@ -57,8 +57,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="cpuUtilization" column="cpu_utilization"/>
<result property="memoryUtilization" column="memory_utilization"/>
<result property="health" column="health"/>
<result property="equImage" column="equ_image" />
<result property="equNumber" column="equ_number" />
<result property="contWorkPeriod" column="cont_work_period"/>
<association property="manufactureVO" columnPrefix="equ_manu_" autoMapping="true" />
<association property="equTypeVO" columnPrefix="equ_type_" autoMapping="true" />
@ -181,43 +179,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) tmp ON eg.equ_id = tmp.equ_id AND eg.gather_time = tmp.max_time
) g ON b.id = g.equ_id
<where>
<if test="name != null and name != ''">
AND b.name LIKE CONCAT('%', #{name}, '%')
</if>
<if test="location != null and location != ''">
AND b.location LIKE CONCAT('%', #{location}, '%')
</if>
<if test="minTime != null">
AND b.create_date &gt;= #{minTime}
</if>
<if test="maxTime != null">
AND b.create_date &lt;= #{maxTime}
</if>
<if test="status != null">
AND b.status = #{status}
</if>
</where>
</select>
<select id="selectEquMonitorListPaged" resultType="MonitorListDto">
SELECT
c.id,
c.name,
c.ip,
c.equTypeId,
c.equTypeName,
c.equManuId,
c.equManuName,
c.version,
c.deviceLevel,
c.location,
c.status,
c.cpuUtilization,
c.health,
c.fanSpeed,
c.contWorkPeriod,
c.unhandledAlertCount,
c.AlertCount
t.id,
t.name,
t.ip,
t.equType,
t.manufacture,
t.version,
t.deviceLevel,
t.location,
t.status,
t.cpuUtilization,
t.health,
t.fanSpeed,
t.contWorkPeriod,
t.failureFrequency,
t.unhandledAlertCount
FROM (
SELECT
b.id,
b.name,
b.ip,
b.equ_type AS equTypeId,
t.name AS equTypeName,
b.manufacture AS equManuId,
m.name AS equManuName,
t.name AS equType,
m.name AS manufacture,
b.version,
b.device_level AS deviceLevel,
b.location,
@ -226,26 +229,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
g.health,
g.fan_speed AS fanSpeed,
g.cont_work_period AS contWorkPeriod,
b.failure_frequency AS failureFrequency,
(SELECT COUNT(1)
FROM alert_message a
WHERE a.equ_id = b.id AND a.status = 'UNHANDLED') AS unhandledAlertCount,
(SELECT COUNT(1)
FROM alert_message a
WHERE a.equ_id = b.id ) AS AlertCount,
WHERE a.equ_id = b.id AND a.status = 'HANDLED') AS unhandledAlertCount,
ROW_NUMBER() OVER (PARTITION BY b.id ORDER BY g.gather_time DESC) AS rn
FROM equ_base b
LEFT JOIN equ_type t ON b.equ_type = t.id
LEFT JOIN equ_manu m ON b.manufacture = m.id
LEFT JOIN equ_gather g ON b.id = g.equ_id
) c
WHERE c.rn = 1
ORDER BY c.id
) t
WHERE t.rn = 1
ORDER BY t.id
</select>
<select id="selectLatestEquMonitorList" resultType="com.alops.system.domain.dto.EquMonitorHomeDto">
SELECT
t.id,
t.equNumber,
t.name,
t.location,
t.cpuUtilization,
@ -257,7 +256,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM (
SELECT
b.id,
b.equ_number as equNumber,
b.name,
b.location,
g.cpu_utilization AS cpuUtilization,
@ -280,18 +278,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
g.cont_work_period AS contWorkPeriod,
b.equ_image AS equImage,
b.id,
b.equ_number as equNumber,
b.name,
b.version,
b.device_level AS deviceLevel,
b.equ_type as equTypeId,
t.name as equTypeName,
t.name as equType,
b.status,
b.manufacture as equManuId,
m.name as equManuName,
b.supplier_id as supplierId,
s.name as supplierName,
m.name as manufacture,
s.name as supplierId,
s.contact_by AS ContactBy,
s.contact_way AS ContactWay,
b.warranty,
@ -301,13 +295,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.install_date AS installDate,
b.in_charge AS inCharge,
(SELECT COUNT(1)
FROM alert_message a
WHERE a.equ_id = b.id ) AS AlertCount,
b.failure_frequency AS failureFrequency,
-- 新增列:统计未处理告警数量
(SELECT COUNT(1)
FROM alert_message a
WHERE a.equ_id = b.id AND a.status = 'UNHANDLED') AS unhandledAlertCount,
WHERE a.equ_id = b.id AND a.status = 'HANDLED') AS unhandledAlertCount,
g.fan_speed AS fanSpeed,
g.cpu_utilization AS cpuUtilization,

@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<sql id="selectEquVlanVoJoinGather">
select vl.id, g.equ_id as equId, equ_gather_id, main_id, ip_address, subnet_mask, create_time, update_by, vlan_id from equ_vlan vl LEFT JOIN equ_gather g ON vl.equ_gather_id = g.id
select vl.id, g.equ_id, equ_gather_id, main_id, ip_address, subnet_mask, create_time, update_by, vlan_id from equ_vlan vl LEFT JOIN equ_gather g ON vl.equ_gather_id = g.id
</sql>
<select id="selectEquVlanList" parameterType="EquVlan" resultMap="EquVlanResult">

Loading…
Cancel
Save