diff --git a/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java b/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java index 42aaacbcea..00e6c103e1 100644 --- a/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java @@ -185,7 +185,7 @@ public class DorisQueryProvider extends QueryProvider { // 处理横轴字段 xFields.add(getXFields(x, originField, fieldAlias)); // 处理横轴过滤 - xWheres.addAll(getXWheres(x, originField, fieldAlias)); +// xWheres.addAll(getXWheres(x, originField, fieldAlias)); // 处理横轴排序 if (StringUtils.isNotEmpty(x.getSort()) && !StringUtils.equalsIgnoreCase(x.getSort(), "none")) { xOrders.add(SQLObj.builder() @@ -283,7 +283,7 @@ public class DorisQueryProvider extends QueryProvider { // 处理横轴字段 xFields.add(getXFields(x, originField, fieldAlias)); // 处理横轴过滤 - xWheres.addAll(getXWheres(x, originField, fieldAlias)); +// xWheres.addAll(getXWheres(x, originField, fieldAlias)); // 处理横轴排序 if (StringUtils.isNotEmpty(x.getSort()) && !StringUtils.equalsIgnoreCase(x.getSort(), "none")) { xOrders.add(SQLObj.builder() diff --git a/backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java b/backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java index 98647c50eb..92764f6c69 100644 --- a/backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/mysql/MysqlQueryProvider.java @@ -175,7 +175,7 @@ public class MysqlQueryProvider extends QueryProvider { // 处理横轴字段 xFields.add(getXFields(x, originField, fieldAlias)); // 处理横轴过滤 - xWheres.addAll(getXWheres(x, originField, fieldAlias)); +// xWheres.addAll(getXWheres(x, originField, fieldAlias)); // 处理横轴排序 if (StringUtils.isNotEmpty(x.getSort()) && !StringUtils.equalsIgnoreCase(x.getSort(), "none")) { xOrders.add(SQLObj.builder() @@ -274,7 +274,7 @@ public class MysqlQueryProvider extends QueryProvider { // 处理横轴字段 xFields.add(getXFields(x, originField, fieldAlias)); // 处理横轴过滤 - xWheres.addAll(getXWheres(x, originField, fieldAlias)); +// xWheres.addAll(getXWheres(x, originField, fieldAlias)); // 处理横轴排序 if (StringUtils.isNotEmpty(x.getSort()) && !StringUtils.equalsIgnoreCase(x.getSort(), "none")) { xOrders.add(SQLObj.builder() diff --git a/backend/src/main/java/io/dataease/provider/oracle/OracleQueryProvider.java b/backend/src/main/java/io/dataease/provider/oracle/OracleQueryProvider.java index c943f779b7..7bc7c2c4ac 100644 --- a/backend/src/main/java/io/dataease/provider/oracle/OracleQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/oracle/OracleQueryProvider.java @@ -210,7 +210,7 @@ public class OracleQueryProvider extends QueryProvider { // 处理横轴字段 xFields.add(getXFields(x, originField, fieldAlias)); // 处理横轴过滤 - xWheres.addAll(getXWheres(x, originField, fieldAlias)); +// xWheres.addAll(getXWheres(x, originField, fieldAlias)); // 处理横轴排序 if (StringUtils.isNotEmpty(x.getSort()) && !StringUtils.equalsIgnoreCase(x.getSort(), "none")) { xOrders.add(SQLObj.builder() @@ -308,7 +308,7 @@ public class OracleQueryProvider extends QueryProvider { // 处理横轴字段 xFields.add(getXFields(x, originField, fieldAlias)); // 处理横轴过滤 - xWheres.addAll(getXWheres(x, originField, fieldAlias)); +// xWheres.addAll(getXWheres(x, originField, fieldAlias)); // 处理横轴排序 if (StringUtils.isNotEmpty(x.getSort()) && !StringUtils.equalsIgnoreCase(x.getSort(), "none")) { xOrders.add(SQLObj.builder() diff --git a/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java b/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java index 593f12c13a..e49ee0bfa4 100644 --- a/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java +++ b/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java @@ -267,6 +267,9 @@ public class ExtractDataService { }); String dorisTablColumnSql = createDorisTablColumnSql(datasetTableFields); + boolean msg = false; + JobStatus jobStatus = JobStatus.Completed; + Long execTime = null; switch (updateType) { case all_scope: // 全量更新 try { @@ -281,29 +284,22 @@ public class ExtractDataService { } else { generateJobFile("all_scope", datasetTable, String.join(",", datasetTableFields.stream().map(DatasetTableField::getDataeaseName).collect(Collectors.toList()))); } - Long execTime = System.currentTimeMillis(); + execTime = System.currentTimeMillis(); extractData(datasetTable, "all_scope"); replaceTable(DorisTableUtils.dorisName(datasetTableId)); saveSucessLog(datasetTableTaskLog); - - sendWebMsg(datasetTable, datasetTableTask, datasetTableTaskLog, true); - - deleteFile("all_scope", datasetTableId); - - updateTableStatus(datasetTableId, datasetTable, JobStatus.Completed, execTime); - - dataSetTableTaskService.updateTaskStatus(datasetTableTask, JobStatus.Completed); - + msg = true; + jobStatus = JobStatus.Completed; } catch (Exception e) { saveErrorLog(datasetTableId, taskId, e); - - dataSetTableTaskService.updateTaskStatus(datasetTableTask, JobStatus.Error); - - sendWebMsg(datasetTable, datasetTableTask, datasetTableTaskLog,false); - updateTableStatus(datasetTableId, datasetTable, JobStatus.Error, null); - dropDorisTable(DorisTableUtils.dorisTmpName(DorisTableUtils.dorisName(datasetTableId))); - deleteFile("all_scope", datasetTableId); + msg = false; + jobStatus = JobStatus.Error; } finally { + try { deleteFile("all_scope", datasetTableId); }catch (Exception ignore){} + try { sendWebMsg(datasetTable, datasetTableTask, datasetTableTaskLog, msg); }catch (Exception ignore){} + try { dataSetTableTaskService.updateTaskStatus(datasetTableTask, jobStatus); }catch (Exception ignore){} + try { updateTableStatus(datasetTableId, datasetTable, jobStatus, execTime); }catch (Exception ignore){} + try { dropDorisTable(DorisTableUtils.dorisTmpName(DorisTableUtils.dorisName(datasetTableId))); }catch (Exception ignore){} } break; @@ -323,7 +319,7 @@ public class ExtractDataService { if (datasetTableTask == null ) { datasetTableTaskLog = writeDatasetTableTaskLog(datasetTableId, taskId); } - Long execTime = System.currentTimeMillis(); + execTime = System.currentTimeMillis(); if (StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalAdd()) && StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalAdd().replace(" ", ""))) {// 增量添加 String sql = datasetTableIncrementalConfig.getIncrementalAdd().replace(lastUpdateTime, datasetTable.getLastUpdateTime().toString()) .replace(currentUpdateTime, Long.valueOf(System.currentTimeMillis()).toString()); @@ -341,28 +337,17 @@ public class ExtractDataService { } saveSucessLog(datasetTableTaskLog); - sendWebMsg(datasetTable, datasetTableTask, datasetTableTaskLog,true); - - deleteFile("incremental_add", datasetTableId); - deleteFile("incremental_delete", datasetTableId); - - updateTableStatus(datasetTableId, datasetTable, JobStatus.Completed, execTime); - - dataSetTableTaskService.updateTaskStatus(datasetTableTask, JobStatus.Completed); + msg = true; + jobStatus = JobStatus.Completed; } catch (Exception e) { saveErrorLog(datasetTableId, taskId, e); - sendWebMsg(datasetTable, datasetTableTask, datasetTableTaskLog,false); - updateTableStatus(datasetTableId, datasetTable, JobStatus.Error, null); - - dataSetTableTaskService.updateTaskStatus(datasetTableTask, JobStatus.Error); - - deleteFile("incremental_add", datasetTableId); - deleteFile("incremental_delete", datasetTableId); + msg = false; + jobStatus = JobStatus.Error; } finally { - if (datasetTableTask.getRate().equalsIgnoreCase(ScheduleType.SIMPLE.toString())) { - datasetTableTask.setStatus(TaskStatus.Stopped.name()); - dataSetTableTaskService.update(datasetTableTask); - } + try { deleteFile("incremental_add", datasetTableId); deleteFile("incremental_delete", datasetTableId); }catch (Exception ignore){} + try { sendWebMsg(datasetTable, datasetTableTask, datasetTableTaskLog, msg); }catch (Exception ignore){} + try { dataSetTableTaskService.updateTaskStatus(datasetTableTask, jobStatus); }catch (Exception ignore){} + try { updateTableStatus(datasetTableId, datasetTable, jobStatus, execTime); }catch (Exception ignore){} } break; } diff --git a/backend/src/main/resources/db/migration/V16__update_chart_filter.sql b/backend/src/main/resources/db/migration/V16__update_chart_filter.sql new file mode 100644 index 0000000000..05600e6900 --- /dev/null +++ b/backend/src/main/resources/db/migration/V16__update_chart_filter.sql @@ -0,0 +1 @@ +UPDATE `chart_view` SET `custom_filter` = '[]'; \ No newline at end of file diff --git a/backend/src/main/resources/db/migration/V16__alter_chart_view.sql b/backend/src/main/resources/db/migration/V17__alter_chart_view.sql similarity index 74% rename from backend/src/main/resources/db/migration/V16__alter_chart_view.sql rename to backend/src/main/resources/db/migration/V17__alter_chart_view.sql index d4b1c5b501..fbc971300f 100644 --- a/backend/src/main/resources/db/migration/V16__alter_chart_view.sql +++ b/backend/src/main/resources/db/migration/V17__alter_chart_view.sql @@ -1,4 +1,3 @@ ALTER TABLE `chart_view` ADD COLUMN `ext_stack` LONGTEXT COMMENT '堆叠项' AFTER `y_axis`; UPDATE `chart_view` SET `ext_stack` = '[]'; -UPDATE `chart_view` SET `custom_filter` = '[]'; \ No newline at end of file diff --git a/backend/src/main/resources/db/migration/V17__area_mapping.sql b/backend/src/main/resources/db/migration/V18__area_mapping.sql similarity index 100% rename from backend/src/main/resources/db/migration/V17__area_mapping.sql rename to backend/src/main/resources/db/migration/V18__area_mapping.sql diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 50530bd824..af50191417 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -507,14 +507,20 @@ - + + diff --git a/frontend/src/views/dataset/add/AddExcel.vue b/frontend/src/views/dataset/add/AddExcel.vue index c7aee57a3e..b777f543ba 100644 --- a/frontend/src/views/dataset/add/AddExcel.vue +++ b/frontend/src/views/dataset/add/AddExcel.vue @@ -270,7 +270,7 @@ export default { type: 'excel', mode: parseInt(this.mode), // info: '{"data":"' + this.path + '"}', - info: JSON.stringify({ data: this.path }), + info: JSON.stringify({ data: this.path, sheets: [this.sheets[0]] }), editType: this.param.editType ? this.param.editType : 0 } } diff --git a/frontend/src/views/dataset/data/FieldEdit.vue b/frontend/src/views/dataset/data/FieldEdit.vue index 0647d94a02..65d9266e0a 100644 --- a/frontend/src/views/dataset/data/FieldEdit.vue +++ b/frontend/src/views/dataset/data/FieldEdit.vue @@ -16,7 +16,7 @@ {{ $t('dataset.add_calc_field') }} - +