sql+=" select er.depart_id , ei.equipment_name 'name' , '维修费用' as 'cost_type',er.total_cost 'cost',er.repair_date 'time' from equipment_repair er , equipment_info ei ";
sql+=" select er.depart_id , ei.equipment_name 'name' , '维修费用' as 'cost_type',er.total_cost 'cost',\tDATE_FORMAT( er.repair_date, '%Y-%m-%d' ) 'time' from equipment_repair er , equipment_info ei ";
sql+=" where er.info_id = ei.id and er.total_cost > 0 and er.repair_date >= '"+startTime+" 00:00:00' and er.repair_date <='"+endTime+" 23:59:59' and er.depart_id = '"+departId+"' ";
StringdeleteSql=" delete from equipment_info_duration where depart_id = '"+departId+"' and date_time >= '"+startTime+"' and date_time <='"+endTime+"' ";
yx_sql+=" select TO_TIMESTAMP(ts ::BIGINT)::DATE AS time,nm as monitorId,v as monitorValue from "+metricMap.get("countTableName")+"_count where nm = '"+metricMap.get("yxExpress")+"' and ts>='"+tsStartTime+"' and ts <'"+tsEndTime+"' ";
yx_sql+=" ) aaa group by aaa.time order by aaa.time asc";
total_sql+=" select TO_TIMESTAMP(ts ::BIGINT)::DATE AS time,nm as monitorId,v as monitorValue from "+metricMap.get("countTableName")+"_count where nm in ("+JSUtils.quoteEach(metricYXTag,",")+") ' and ts>='"+tsStartTime+"' and ts <'"+tsEndTime+"' ";
total_sql+=" ) aaa group by aaa.time order by aaa.time asc";