|
|
|
@ -9,9 +9,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<result property="name" column="name" /> |
|
|
|
<result property="name" column="name" /> |
|
|
|
<result property="version" column="version" /> |
|
|
|
<result property="version" column="version" /> |
|
|
|
<result property="ip" column="ip" /> |
|
|
|
<result property="ip" column="ip" /> |
|
|
|
<result property="manufacture" column="manufacture" /> |
|
|
|
<result property="equManuId" column="manufacture" /> |
|
|
|
<result property="location" column="location" /> |
|
|
|
<result property="location" column="location" /> |
|
|
|
<result property="equType" column="equ_type" /> |
|
|
|
<result property="equTypeId" column="equ_type" /> |
|
|
|
<result property="inCharge" column="in_charge" /> |
|
|
|
<result property="inCharge" column="in_charge" /> |
|
|
|
<result property="installDate" column="install_date" /> |
|
|
|
<result property="installDate" column="install_date" /> |
|
|
|
<result property="lifeCycle" column="life_cycle" /> |
|
|
|
<result property="lifeCycle" column="life_cycle" /> |
|
|
|
@ -30,6 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
|
|
|
|
|
|
|
|
</resultMap> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="EquMonitorResult" type="com.alops.system.domain.vo.EquMonitorVO"> |
|
|
|
<resultMap id="EquMonitorResult" type="com.alops.system.domain.vo.EquMonitorVO"> |
|
|
|
|
|
|
|
|
|
|
|
<result property="id" column="id" /> |
|
|
|
<result property="id" column="id" /> |
|
|
|
@ -85,6 +88,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
</update> |
|
|
|
</update> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getEquipmentAssessmentList" |
|
|
|
|
|
|
|
resultType="com.alops.system.domain.dto.equipmentAssessmentDto"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
|
|
b.id AS id, |
|
|
|
|
|
|
|
b.equ_number AS equNumber, |
|
|
|
|
|
|
|
b.name AS name, |
|
|
|
|
|
|
|
b.location AS location, |
|
|
|
|
|
|
|
t.name AS equType, -- 从 equ_type 表取类型名称 |
|
|
|
|
|
|
|
b.device_level AS deviceLevel, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 从 equ_gather 最新一条记录中取数据 |
|
|
|
|
|
|
|
g.health AS health, |
|
|
|
|
|
|
|
g.temperature AS temperature, |
|
|
|
|
|
|
|
g.cpu_utilization AS cpuUtilization, |
|
|
|
|
|
|
|
g.memory_utilization AS memoryUtilization |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FROM equ_base b |
|
|
|
|
|
|
|
LEFT JOIN equ_type t |
|
|
|
|
|
|
|
ON b.equ_type = t.id |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LEFT JOIN ( |
|
|
|
|
|
|
|
SELECT eg1.* |
|
|
|
|
|
|
|
FROM equ_gather eg1 |
|
|
|
|
|
|
|
INNER JOIN ( |
|
|
|
|
|
|
|
SELECT equ_id, MAX(gather_time) AS max_time |
|
|
|
|
|
|
|
FROM equ_gather |
|
|
|
|
|
|
|
GROUP BY equ_id |
|
|
|
|
|
|
|
) eg2 |
|
|
|
|
|
|
|
ON eg1.equ_id = eg2.equ_id AND eg1.gather_time = eg2.max_time |
|
|
|
|
|
|
|
) g |
|
|
|
|
|
|
|
ON b.id = g.equ_id |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WHERE b.status = 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ORDER BY b.id |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="findEquBaseList" resultMap="EquBaseResult"> |
|
|
|
<select id="findEquBaseList" resultMap="EquBaseResult"> |
|
|
|
<include refid="selectEquBaseVo"/> |
|
|
|
<include refid="selectEquBaseVo"/> |
|
|
|
<where> |
|
|
|
<where> |
|
|
|
@ -99,9 +141,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
b.name AS name, |
|
|
|
b.name AS name, |
|
|
|
b.version AS version, |
|
|
|
b.version AS version, |
|
|
|
b.ip AS ip, |
|
|
|
b.ip AS ip, |
|
|
|
|
|
|
|
b.manufacture AS equManuId, |
|
|
|
m.name AS manufacture, |
|
|
|
m.name AS manufacture, |
|
|
|
|
|
|
|
b.supplier_id AS supplierId, |
|
|
|
s.name AS supplierName, |
|
|
|
s.name AS supplierName, |
|
|
|
b.location AS location, |
|
|
|
b.location AS location, |
|
|
|
|
|
|
|
b.equ_type AS equTypeId, |
|
|
|
t.name AS equType, |
|
|
|
t.name AS equType, |
|
|
|
b.in_charge AS inCharge, |
|
|
|
b.in_charge AS inCharge, |
|
|
|
b.install_date AS installDate, |
|
|
|
b.install_date AS installDate, |
|
|
|
@ -370,9 +415,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="name != null">name,</if> |
|
|
|
<if test="name != null">name,</if> |
|
|
|
<if test="version != null">version,</if> |
|
|
|
<if test="version != null">version,</if> |
|
|
|
<if test="ip != null">ip,</if> |
|
|
|
<if test="ip != null">ip,</if> |
|
|
|
<if test="manufacture != null">manufacture,</if> |
|
|
|
<if test="equManuId != null">manufacture,</if> |
|
|
|
<if test="location != null">location,</if> |
|
|
|
<if test="location != null">location,</if> |
|
|
|
<if test="equType != null">equ_type,</if> |
|
|
|
<if test="equTypeId != null">equ_type,</if> |
|
|
|
<if test="inCharge != null">in_charge,</if> |
|
|
|
<if test="inCharge != null">in_charge,</if> |
|
|
|
<if test="installDate != null">install_date,</if> |
|
|
|
<if test="installDate != null">install_date,</if> |
|
|
|
<if test="lifeCycle != null">life_cycle,</if> |
|
|
|
<if test="lifeCycle != null">life_cycle,</if> |
|
|
|
@ -393,9 +438,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="name != null">#{name},</if> |
|
|
|
<if test="name != null">#{name},</if> |
|
|
|
<if test="version != null">#{version},</if> |
|
|
|
<if test="version != null">#{version},</if> |
|
|
|
<if test="ip != null">#{ip},</if> |
|
|
|
<if test="ip != null">#{ip},</if> |
|
|
|
<if test="manufacture != null">#{manufacture},</if> |
|
|
|
<if test="equManuId != null">#{equManuId},</if> |
|
|
|
<if test="location != null">#{location},</if> |
|
|
|
<if test="location != null">#{location},</if> |
|
|
|
<if test="equType != null">#{equType},</if> |
|
|
|
<if test="equTypeId != null">#{equTypeId},</if> |
|
|
|
<if test="inCharge != null">#{inCharge},</if> |
|
|
|
<if test="inCharge != null">#{inCharge},</if> |
|
|
|
<if test="installDate != null">#{installDate},</if> |
|
|
|
<if test="installDate != null">#{installDate},</if> |
|
|
|
<if test="lifeCycle != null">#{lifeCycle},</if> |
|
|
|
<if test="lifeCycle != null">#{lifeCycle},</if> |
|
|
|
@ -419,9 +464,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="name != null">name = #{name},</if> |
|
|
|
<if test="name != null">name = #{name},</if> |
|
|
|
<if test="version != null">version = #{version},</if> |
|
|
|
<if test="version != null">version = #{version},</if> |
|
|
|
<if test="ip != null">ip = #{ip},</if> |
|
|
|
<if test="ip != null">ip = #{ip},</if> |
|
|
|
<if test="manufacture != null">manufacture = #{manufacture},</if> |
|
|
|
<if test="equManuId != null">manufacture = #{equManuId},</if> |
|
|
|
<if test="location != null">location = #{location},</if> |
|
|
|
<if test="location != null">location = #{location},</if> |
|
|
|
<if test="equType != null">equ_type = #{equType},</if> |
|
|
|
<if test="equTypeId != null">equ_type = #{equTypeId},</if> |
|
|
|
<if test="inCharge != null">in_charge = #{inCharge},</if> |
|
|
|
<if test="inCharge != null">in_charge = #{inCharge},</if> |
|
|
|
<if test="installDate != null">install_date = #{installDate},</if> |
|
|
|
<if test="installDate != null">install_date = #{installDate},</if> |
|
|
|
<if test="lifeCycle != null">life_cycle = #{lifeCycle},</if> |
|
|
|
<if test="lifeCycle != null">life_cycle = #{lifeCycle},</if> |
|
|
|
|