@@ -267,7 +267,7 @@ public class EmergencyRiskEventServiceImpl extends ServiceImpl<EmergencyRiskEven
// 风险排查
sql+=" left join ( select depart_id ,count(id) 'count' from danger_inspection_record where report_date >= '"+startDate+" 00:00:00' and report_date <='"+endDate+" 23:59:59' group by depart_id ) bb on bb.depart_id = d.id ";
//实际完成数量
sql+=" left join ( select depart_id ,count(id) 'count' from danger_inspection_record where status = '2' and end_date >= '"+startDate+" 00:00:00' and end_date <='"+endDate+" 23:59:59' group by depart_id ) eee on eee.depart_id = d.id ";
sql+=" left join ( select depart_id ,count(id) 'count' from danger_inspection_record where status = '2' and end_date >= '"+startDate+" 00:00:00' and end_date <='"+endDate+" 23:59:59' group by depart_id ) ee on ee.depart_id = d.id ";
// 异常
sql+=" left join ( select t.depart_id , count(1) 'count' from problem_report_plan t where t.report_time >='"+startDate+"' and t.report_time <='"+endDate+"' group by t.depart_id) cc on cc.depart_id = d.id";
sql+=" left join (select er.id 'info_id', er.depart_id , ei.equipment_name , GROUP_CONCAT(er.fault_content) fault_content , GROUP_CONCAT( er.fault_library_id) fault_library_id from equipment_repair er , equipment_info ei ";
sql+=" where er.info_id = ei.id and repair_date >= '"+startDate+" 00:00:00' and repair_date <='"+endDate+" 23:59:59' ";
sql+=" where er.info_id = ei.id and and ei.equipment_level = '6bf727eb7e7cca6a95c694dab0036b2c' and repair_date >= '"+startDate+" 00:00:00' and repair_date <='"+endDate+" 23:59:59' ";
sql+=" group by er.depart_id ,er.info_id )aaa on aaa.depart_id = d.id ";