Merge pull request #9555 from dataease/pr@dev@fixdriver

Pr@dev@fixdriver
This commit is contained in:
taojinlong 2024-05-09 12:01:35 +08:00 committed by GitHub
commit 71cef0d57e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View File

@ -533,6 +533,7 @@ public class ExportCenterService {
try (FileOutputStream outputStream = new FileOutputStream(dataPath + "/" + request.getViewName() + ".xlsx")) { try (FileOutputStream outputStream = new FileOutputStream(dataPath + "/" + request.getViewName() + ".xlsx")) {
wb.write(outputStream); wb.write(outputStream);
outputStream.flush();
} }
wb.close(); wb.close();
@ -546,7 +547,7 @@ public class ExportCenterService {
exportTask.setExportPogress("100"); exportTask.setExportPogress("100");
exportTask.setExportStatus("SUCCESS"); exportTask.setExportStatus("SUCCESS");
setFileSize(dataPath + "/" + dataPath + "/" + request.getViewName() + ".xlsx", exportTask); setFileSize(dataPath + "/" + request.getViewName() + ".xlsx", exportTask);
} catch (Exception e) { } catch (Exception e) {
LogUtil.error("Failed to export data", e); LogUtil.error("Failed to export data", e);
exportTask.setExportStatus("FAILED"); exportTask.setExportStatus("FAILED");
@ -754,6 +755,7 @@ public class ExportCenterService {
exportTaskMapper.updateByPrimaryKey(exportTask); exportTaskMapper.updateByPrimaryKey(exportTask);
} }
wb.write(fileOutputStream); wb.write(fileOutputStream);
fileOutputStream.flush();
fileOutputStream.close(); fileOutputStream.close();
wb.close(); wb.close();
} }

View File

@ -970,7 +970,7 @@ export default {
table.info.replace(/\n/g, '\\n').replace(/\r/g, '\\r') table.info.replace(/\n/g, '\\n').replace(/\r/g, '\\r')
).sql ).sql
} }
if (JSON.parse(table.info).hasOwn('setKey')) { if (JSON.parse(table.info).hasOwnProperty('setKey')) {
this.$set(this.param, 'setKey', JSON.parse(table.info).setKey) this.$set(this.param, 'setKey', JSON.parse(table.info).setKey)
this.param.keys = JSON.parse(table.info).keys this.param.keys = JSON.parse(table.info).keys
} }