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