Commit 3731e53d authored by 高建强's avatar 高建强

item:修改top5告警查询

parent 9c4e9754
...@@ -488,40 +488,33 @@ ...@@ -488,40 +488,33 @@
ala.id, ala.id,
ala.equipment_specific_id AS pointId, ala.equipment_specific_id AS pointId,
'monitorEquipment' AS type, 'monitorEquipment' AS type,
spe. CODE, spe.CODE,
ala.equipment_specific_index_name, ala.equipment_specific_index_name,
CONCAT( CONCAT(
ala.equipment_specific_index_name, ala.equipment_specific_index_name,
'(', '(',
ala.equipment_specific_name, ala.equipment_specific_name,
')', ')',
IF
IF (
( (
ISNULL(ws.full_name) ( ISNULL( ws.full_name ) AND ISNULL( sd.description ) ),
AND ISNULL(sd.description)
),
'', '',
CONCAT( CONCAT( '【', IFNULL( ws.full_name, '' ), ' ', IFNULL( sd.description, '' ), '】' )
'【',
IFNULL(ws.full_name, ''),
' ',
IFNULL(sd.description, ''),
'】'
)
) )
) AS label, ) AS label,
ala.create_date AS changeDate ala.create_date AS changeDate
FROM FROM
wl_equipment_specific_alarm AS ala wl_equipment_specific_alarm_log AS ala
LEFT JOIN wl_equipment_specific AS spe ON ala.equipment_specific_id = spe.id LEFT JOIN wl_equipment_specific AS spe ON ala.equipment_specific_id = spe.id
LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = spe.id LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = spe.id
LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id
WHERE ala.status = true WHERE
AND (ala.org_code = #{orgCode} OR ala.org_code like CONCAT(#{orgCode},'-%')) ala.equipment_specific_index_value = 'true'
AND ala.org_code = 10
AND ala.type = 'FIREALARM' AND ala.type = 'FIREALARM'
ORDER BY ala.create_date DESC ORDER BY
limit 0,5 ala.create_date DESC
LIMIT 0,5
</select> </select>
<select id="getEquipStatusTop5" resultType="com.yeejoin.amos.fas.business.bo.SafetyExecuteBo"> <select id="getEquipStatusTop5" resultType="com.yeejoin.amos.fas.business.bo.SafetyExecuteBo">
......
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