Commit 569572b8 authored by maoying's avatar maoying

修改组态图指标内容显示

parent e434e9df
...@@ -9,11 +9,14 @@ import lombok.Data; ...@@ -9,11 +9,14 @@ import lombok.Data;
@Data @Data
@ApiModel(description = "性能指标类") @ApiModel(description = "性能指标类")
public class SpeIndexVo { public class SpeIndexVo {
private String key;
private String name; private String key = "";
private String value;
private String name = "";
private String value = "";
private String typeCode; private String typeCode = "";
private Long equipmentSpecificId; private Long equipmentSpecificId;
} }
...@@ -398,7 +398,7 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -398,7 +398,7 @@ public class FireFightingSystemController extends AbstractBaseController {
/** /**
* 设备报警信息 * 设备指标数据查询
* *
* @param id * @param id
* @return * @return
......
...@@ -325,21 +325,53 @@ ...@@ -325,21 +325,53 @@
p_point p p_point p
</select> </select>
<select id="getSpeIndex" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo"> <select id="getSpeIndex" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo">
select * from ( SELECT
select *
eqin.name_key as `key`, FROM
eqin.name as name, (
eqin.type_code, SELECT
spein.update_date as updateDate, eqin.name_key AS `key`,
if (eqin.unit is null, spein.value,concat(spein.value,eqin.unit)) as value eqin.`name` AS `name`,
from eqin.type_code,
wl_equipment_specific_index as spein spein.update_date AS updateDate,
left join wl_equipment_index as eqin on spein.equipment_index_id = eqin.id spein.equipment_specific_id as equipmentSpecificId,
where IF (
spein.equipment_specific_id = #{id} eqin.unit IS NULL,
order by eqin.sort_num) as dat IF (
where `key` is not null and `key` != '' (
ORDER BY dat.updateDate DESC 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>
<select id="getSpeIndexIn" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo"> <select id="getSpeIndexIn" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo">
select * from ( 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