IFNULL(temp1.alarmEquipNum,0) AS alarmEquipNum, temp1.type_code,temp.code
FROM
...
...
@@ -4163,12 +4163,6 @@
FROM wl_equipment_alarm_report_day report
where report.equipment_code = a.code
and FIND_IN_SET(a.system_id,report.system_ids)
and( report.index_type LIKE CONCAT('%','FireAlarm','%')
or report.index_type LIKE CONCAT('%','Fault','%')
or report.index_type LIKE CONCAT('%','Shield','%')
or report.index_type LIKE CONCAT('%','Open','%')
or report.index_type LIKE CONCAT('%','OilLeak','%')
or report.index_type LIKE CONCAT('%','Alarm','%') )
and report.index_true_num > 0 and report.report_date >= #{startDate} and
report.report_date <= #{endDate}) as exepctionNum
FROM(
...
...
@@ -4176,7 +4170,7 @@
s.id as system_id,
equipment.code,
equipment.name,
count(1) AS num
(select count(1) from wl_equipment_specific s where FIND_IN_SET( #{systemId}, s.system_id ) AND equipment.is_iot = 1 and s.equipment_code = equipment.code ) AS num
FROM
wl_equipment_specific spec
LEFT JOIN wl_equipment_detail detail ON spec.equipment_detail_id = detail.id
...
...
@@ -4240,7 +4234,8 @@
)temp1 on temp.system_id = temp1.systemId and temp.code = temp1.code
group by code, type_code
ORDER BY temp.name
ORDER BY temp.name ) d where type_code is not null