forked from github/dataease
fix: sql 数据集不允许有重复字段
This commit is contained in:
parent
fac31a30b5
commit
d5a0f9a9c6
@ -648,6 +648,7 @@ public class DataSetTableService {
|
||||
datasourceRequest.setPreviewData(true);
|
||||
try {
|
||||
datasourceRequest.setPageable(true);
|
||||
System.out.println(datasourceRequest.getQuery());
|
||||
data.addAll(datasourceProvider.getData(datasourceRequest));
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage());
|
||||
@ -887,7 +888,9 @@ public class DataSetTableService {
|
||||
List<String[]> data = result.get("dataList");
|
||||
List<TableFiled> fields = result.get("fieldList");
|
||||
String[] fieldArray = fields.stream().map(TableFiled::getFieldName).toArray(String[]::new);
|
||||
|
||||
if (checkIsRepeat(fieldArray)) {
|
||||
DataEaseException.throwException(Translator.get("i18n_excel_field_repeat"));
|
||||
}
|
||||
List<Map<String, Object>> jsonArray = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(data)) {
|
||||
jsonArray = data.stream().map(ele -> {
|
||||
|
@ -265,7 +265,7 @@ i18n_sql_add_not_matching=The data column of incremental SQL does not match the
|
||||
i18n_sql_delete_not_matching=The data column of incremental delete SQL does not match the dataset,
|
||||
i18n_cst_ds_tb_or_field_deleted=Custom dataset union data is deleted or field changed,can not display
|
||||
i18n_no_all_delete_privilege_folder=This folder have sources which have no manage or view privilege,Can Not Be Deleted.
|
||||
i18n_excel_field_repeat=Excel exists repeat field,please fix and upload again.
|
||||
i18n_excel_field_repeat=Exists repeat field,please fix and retry.
|
||||
i18n_schema_is_empty=Database schema is empty
|
||||
站内消息=Internal Messages
|
||||
所有消息=All Messages
|
||||
|
@ -264,7 +264,7 @@ i18n_sql_add_not_matching=增量添加 SQL 的数据列与数据集不匹配,
|
||||
i18n_sql_delete_not_matching=增量删除 SQL 的数据列与数据集不匹配,
|
||||
i18n_cst_ds_tb_or_field_deleted=自定义数据集所关联数据被删除或字段发生变化,无法正常显示
|
||||
i18n_no_all_delete_privilege_folder=该目录下存在没有管理权限或查看权限的资源,无法删除
|
||||
i18n_excel_field_repeat=Excel存在重复字段,请修改后重新上传
|
||||
i18n_excel_field_repeat=存在重复字段,请修改后重试
|
||||
i18n_schema_is_empty=数据库 Schema 为空
|
||||
站内消息=站内消息
|
||||
所有消息=所有消息
|
||||
|
@ -267,7 +267,7 @@ i18n_sql_add_not_matching=增量添加 sql 的數據列與數據集不匹配,
|
||||
i18n_sql_delete_not_matching=增量刪除 sql 的數據列與數據集不匹配,
|
||||
i18n_cst_ds_tb_or_field_deleted=自定義數據集所關聯數據被刪除或字段發生變化,無法正常顯示
|
||||
i18n_no_all_delete_privilege_folder=該目錄下存在沒有管理權限或查看權限的資源,無法刪除
|
||||
i18n_excel_field_repeat=Excel存在重復字段,請修改後重新上傳
|
||||
i18n_excel_field_repeat=存在重復字段,請修改後重试
|
||||
i18n_schema_is_empty=數據庫 Schema 為空
|
||||
站内消息=站內消息
|
||||
所有消息=所有消息
|
||||
|
Loading…
Reference in New Issue
Block a user