//String factorySql = "select fi.depart_id ,d.depart_name, fi.pro_scale*10000 'pro_scale' from sys_factory_info fi , sys_depart d where fi.depart_id = d.id and d.depart_type =1 and d.id in("+departIdssss+")";
StringfactorySql="select group_concat(fi.depart_id) from sys_factory_info fi , sys_depart d where fi.depart_id = d.id and d.depart_type =1 and d.id in("+departIdssss+")";
sql+=" ROUND( v3.DLHJ / 10000, 2 ) AS dh,v3.qy,v3.ysl AS xssyl,ROUND(0.123*v3.DLHJ/10000 +1.4286*v3.qy,4) AS zhnyxhl ,ROUND(3*v3.qy+0.703*10*v3.DLHJ/1000,4) AS eyhtpfl,ROUND( v3.DLHJ / aaa.CSL, 2 ) AS dsdh";
sql+=" FROM sys_depart d ";
sql+=" LEFT JOIN sys_factory_info f ON f.depart_id = d.id ";
sql+=" left join ("+dataViewName2+") aaa on d.id = aaa.depart_id";
sql+=" left join ("+dataViewName3+") v3 on v3.depart_id = d.id";