Commit 569572b8 authored by maoying's avatar maoying

修改组态图指标内容显示

parent e434e9df
......@@ -9,11 +9,14 @@ import lombok.Data;
@Data
@ApiModel(description = "性能指标类")
public class SpeIndexVo {
private String key;
private String name;
private String value;
private String key = "";
private String name = "";
private String value = "";
private String typeCode;
private String typeCode = "";
private Long equipmentSpecificId;
}
......@@ -398,7 +398,7 @@ public class FireFightingSystemController extends AbstractBaseController {
/**
* 设备报警信息
* 设备指标数据查询
*
* @param id
* @return
......
......@@ -325,21 +325,53 @@
p_point p
</select>
<select id="getSpeIndex" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo">
select * from (
select
eqin.name_key as `key`,
eqin.name as name,
eqin.type_code,
spein.update_date as updateDate,
if (eqin.unit is null, spein.value,concat(spein.value,eqin.unit)) as value
from
wl_equipment_specific_index as spein
left join wl_equipment_index as eqin on spein.equipment_index_id = eqin.id
where
spein.equipment_specific_id = #{id}
order by eqin.sort_num) as dat
where `key` is not null and `key` != ''
ORDER BY dat.updateDate DESC
SELECT
*
FROM
(
SELECT
eqin.name_key AS `key`,
eqin.`name` AS `name`,
eqin.type_code,
spein.update_date AS updateDate,
spein.equipment_specific_id as equipmentSpecificId,
IF (
eqin.unit IS NULL,
IF (
(
ISNULL(spein.value_label)
OR spein.value_label = ''
),
spein.`value`,
spein.value_label
),
concat(
IF (
(
ISNULL(spein.value_label)
OR spein.value_label = ''
),
spein.`value`,
spein.value_label
),
' ',
eqin.unit
)
) AS `value`
FROM
wl_equipment_specific_index AS spein
LEFT JOIN wl_equipment_index AS eqin ON spein.equipment_index_id = eqin.id
WHERE
spein.equipment_specific_id = #{id}
ORDER BY
eqin.sort_num
) AS dat
WHERE
`key` IS NOT NULL
AND `key` != ''
ORDER BY
dat.updateDate DESC
</select>
<select id="getSpeIndexIn" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo">
select * from (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment