List<Map<String,Object>>list=masterDB.queryForList("select item_code as indexCode,item_alias as indexName,unit as indexUnit from f_report_item where report_id='"+reportId+"' and is_use_power_analyse='1' order by sort_num");
List<Map<String,Object>>list=null;
if("formula".equals(reportId)){
list=masterDB.queryForList("select formula_code as indexCode,formula_name as indexName,formula_unit as indexUnit from f_report_itemv_formula where report_id='"+reportId+"' and formula_granularity='"+granularity+"' order by sort_num");
}else{
list=masterDB.queryForList("select item_code as indexCode,item_alias as indexName,unit as indexUnit from f_report_item where report_id='"+reportId+"' and is_use_power_analyse='1' order by sort_num");
StringqueryDataFillFieldSql="select item_code,report_id from f_report_item where report_id in(select id from f_report_manage where status='1' and pro_status='1' and time_type='"+granularity+"')";
") a left join (select * from sys_depart where id in("+Arrays.stream(departIds.split(",")).map(id->"'"+id+"'").collect(Collectors.joining(","))+")) b on 1=1)";
inttag=1;
Stringsql="select aa.time,aa.depart_id as departId,aa.depart_name as departName"+selectPart+" from "+baseViewName+" aa ";