feat: 表格支持分页

This commit is contained in:
taojinlong 2022-11-08 17:05:36 +08:00
parent aedae12348
commit b91a14d417

View File

@ -939,8 +939,12 @@ public class ChartViewService {
querySql = qp.getSQLAsTmp(sql, xAxis, yAxis, fieldCustomFilter, rowPermissionsTree, extFilterList, view); querySql = qp.getSQLAsTmp(sql, xAxis, yAxis, fieldCustomFilter, rowPermissionsTree, extFilterList, view);
} }
} }
datasourceRequest.setQuery(totalPageSql); if (StringUtils.isNotEmpty(totalPageSql)) {
totalPage = Long.valueOf(datasourceProvider.getData(datasourceRequest).get(0)[0]); datasourceRequest.setQuery(totalPageSql);
totalPage = Long.valueOf(datasourceProvider.getData(datasourceRequest).get(0)[0]);
totalPage = totalPage / pageInfo.getPageSize() + totalPage % pageInfo.getPageSize() > 0 ? 1 : 0;
}
datasourceRequest.setQuery(querySql); datasourceRequest.setQuery(querySql);
data = datasourceProvider.getData(datasourceRequest); data = datasourceProvider.getData(datasourceRequest);
if (CollectionUtils.isNotEmpty(assistFields)) { if (CollectionUtils.isNotEmpty(assistFields)) {