//step.1 根据id获取该动态报表的配置参数
Map<String, Object> cgReportMap = null;
try{
cgReportMap = cgReportService.queryCgReportConfig(configId);
if(cgReportMap.size()<=0){
throw new CgReportNotFoundException("动态报表配置不存在!");
}
}catch (Exception e) {
throw new CgReportNotFoundException("查找动态报表配置失败!"+e.getMessage());
}
//step.2 获取该配置的查询SQL
Map configM = (Map) cgReportMap.get(CgReportConstant.MAIN);
String querySql = (String) configM.get(CgReportConstant.CONFIG_SQL);
List<Map<String,Object>> items = (List<Map<String, Object>>) cgReportMap.get(CgReportConstant.ITEMS);