forked from github/dataease
Merge pull request #7576 from dataease/pr@dev@feat_page
feat: sqlServer根据版本区分明细表分页模式
This commit is contained in:
commit
baa202f883
@ -294,7 +294,7 @@ public class ChartViewService {
|
||||
if (ObjectUtils.isNotEmpty(datasetTable)) {
|
||||
result.setDatasetMode(datasetTable.getMode());
|
||||
Datasource datasource = datasourceService.get(datasetTable.getDataSourceId());
|
||||
result.setDatasourceType(datasource != null ? datasource.getType() : null);
|
||||
buildDsType(datasource, result);
|
||||
}
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
@ -322,7 +322,7 @@ public class ChartViewService {
|
||||
if (ObjectUtils.isNotEmpty(datasetTable)) {
|
||||
view.setDatasetMode(datasetTable.getMode());
|
||||
Datasource datasource = datasourceService.get(datasetTable.getDataSourceId());
|
||||
view.setDatasourceType(datasource != null ? datasource.getType() : null);
|
||||
buildDsType(datasource, view);
|
||||
}
|
||||
// 如果是从仪表板获取视图数据,则仪表板的查询模式,查询结果的数量,覆盖视图对应的属性
|
||||
if (CommonConstants.VIEW_RESULT_MODE.CUSTOM.equals(request.getResultMode())) {
|
||||
@ -2349,4 +2349,24 @@ public class ChartViewService {
|
||||
view.setCustomFilter(gson.toJson(tree));
|
||||
}
|
||||
}
|
||||
|
||||
public void buildDsType(Datasource datasource, ChartViewDTO result) {
|
||||
if (datasource != null) {
|
||||
if (StringUtils.equalsIgnoreCase(datasource.getType(), "sqlServer")) {
|
||||
if (datasource.getVersion() == null) {
|
||||
result.setDatasourceType(datasource.getType());
|
||||
} else {
|
||||
if (Integer.parseInt(datasource.getVersion()) < 11) {
|
||||
result.setDatasourceType(datasource.getType() + "_all");
|
||||
} else {
|
||||
result.setDatasourceType(datasource.getType());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result.setDatasourceType(datasource.getType());
|
||||
}
|
||||
} else {
|
||||
result.setDatasourceType(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1216,7 +1216,7 @@ export const CHART_FONT_LETTER_SPACE = [
|
||||
{ name: '10px', value: '10' }
|
||||
]
|
||||
|
||||
export const NOT_SUPPORT_PAGE_DATASET = ['kylin', 'es', 'presto', 'StarRocks']
|
||||
export const NOT_SUPPORT_PAGE_DATASET = ['kylin', 'sqlServer_all', 'es', 'presto', 'StarRocks']
|
||||
|
||||
export const SUPPORT_Y_M = ['y', 'y_M', 'y_M_d']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user