forked from github/dataease
Merge pull request #9555 from dataease/pr@dev@fixdriver
Pr@dev@fixdriver
This commit is contained in:
commit
71cef0d57e
@ -294,7 +294,7 @@ public class ExportCenterService {
|
||||
// with DataType
|
||||
if ((excelTypes[j].equals(DeTypeConstants.DE_INT) || excelTypes[j].equals(DeTypeConstants.DE_FLOAT)) && rowData[j] != null) {
|
||||
cell.setCellValue(Double.valueOf(rowData[j].toString()));
|
||||
} else if(rowData[j] != null){
|
||||
} else if (rowData[j] != null) {
|
||||
cell.setCellValue(String.valueOf(rowData[j]));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@ -501,7 +501,7 @@ public class ExportCenterService {
|
||||
// with DataType
|
||||
if ((excelTypes[j].equals(DeTypeConstants.DE_INT) || excelTypes[j].equals(DeTypeConstants.DE_FLOAT)) && StringUtils.isNotEmpty(cellValObj.toString())) {
|
||||
cell.setCellValue(Double.valueOf(cellValObj.toString()));
|
||||
} else if(cellValObj != null){
|
||||
} else if (cellValObj != null) {
|
||||
cell.setCellValue(cellValObj.toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@ -533,6 +533,7 @@ public class ExportCenterService {
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(dataPath + "/" + request.getViewName() + ".xlsx")) {
|
||||
wb.write(outputStream);
|
||||
outputStream.flush();
|
||||
}
|
||||
wb.close();
|
||||
|
||||
@ -546,7 +547,7 @@ public class ExportCenterService {
|
||||
exportTask.setExportPogress("100");
|
||||
exportTask.setExportStatus("SUCCESS");
|
||||
|
||||
setFileSize(dataPath + "/" + dataPath + "/" + request.getViewName() + ".xlsx", exportTask);
|
||||
setFileSize(dataPath + "/" + request.getViewName() + ".xlsx", exportTask);
|
||||
} catch (Exception e) {
|
||||
LogUtil.error("Failed to export data", e);
|
||||
exportTask.setExportStatus("FAILED");
|
||||
@ -754,6 +755,7 @@ public class ExportCenterService {
|
||||
exportTaskMapper.updateByPrimaryKey(exportTask);
|
||||
}
|
||||
wb.write(fileOutputStream);
|
||||
fileOutputStream.flush();
|
||||
fileOutputStream.close();
|
||||
wb.close();
|
||||
}
|
||||
|
@ -970,7 +970,7 @@ export default {
|
||||
table.info.replace(/\n/g, '\\n').replace(/\r/g, '\\r')
|
||||
).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.param.keys = JSON.parse(table.info).keys
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user