Commit 09b26ec2 authored by 高建强's avatar 高建强

Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6

parents 6b883ebe ffb6040c
......@@ -2662,9 +2662,9 @@
(
SELECT
a.equipName,
count( DISTINCT wesa.equipment_specific_id ) AS totalAlarmNum,
count( DISTINCT wesi.equipment_specific_id ) AS totalAlarmNum,
a.`code`,
count( a.id ) AS totalNum
count( DISTINCT a.id ) AS totalNum
FROM
(
SELECT
......@@ -2679,9 +2679,8 @@
WHERE
FIND_IN_SET( #{id}, wes.system_id ) > 0
) a
LEFT JOIN wl_equipment_specific_alarm wesa ON wesa.equipment_id = a.equipmentId
AND wesa.`status` = 1
AND FIND_IN_SET( #{id}, wesa.system_ids ) > 0
LEFT JOIN wl_equipment_specific_index wesi ON wesi.equipment_specific_id = a.id
AND ((wesi.`is_alarm` = 1 and wesi.`value` = 'true') or (wesi.`is_alarm` = 0 and wesi.`value` = 'false'))
GROUP BY
a.equipmentId
) b
......@@ -4702,14 +4701,16 @@
<select id="getSystemStatus" resultType="java.lang.Integer">
SELECT
IFNULL( sum( `status` ), 0 ) AS isAlarm
count( DISTINCT equipment_specific_id ) AS isAlarm
FROM
wl_equipment_specific_alarm
wl_equipment_specific_index
WHERE
equipment_specific_id IN
( SELECT id FROM wl_equipment_specific
WHERE FIND_IN_SET( #{id}, system_id ) > 0
AND biz_org_code LIKE concat(#{bizOrgCode}, '%') )
equipment_specific_id IN ( SELECT id FROM wl_equipment_specific WHERE FIND_IN_SET( #{id}, system_id ) > 0 AND biz_org_code LIKE concat(#{bizOrgCode}, '%') )
AND ((
`is_alarm` = 1
AND `value` = 'true'
)
OR ( `is_alarm` = 0 AND `value` = 'false' ))
</select>
<select id="queryStartAndStopBySpecificId" resultType="java.util.Map">
SELECT
......
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