mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
fix: 修复桌面版上传Excel错误
This commit is contained in:
parent
5571fae31b
commit
078b71577a
@ -45,8 +45,13 @@ public class H2EngineProvider extends EngineProvider {
|
|||||||
for (int i = 0; i < strings.length; i++) {
|
for (int i = 0; i < strings.length; i++) {
|
||||||
if (tableFields.get(i).isChecked()) {
|
if (tableFields.get(i).isChecked()) {
|
||||||
if (StringUtils.isEmpty(strings[i])) {
|
if (StringUtils.isEmpty(strings[i])) {
|
||||||
strings1[length] = null;
|
if (tableFields.get(i).getFieldType().equals("LONG") || tableFields.get(i).getFieldType().equals("DOUBLE")) {
|
||||||
}else {
|
strings1[length] = "0";
|
||||||
|
} else {
|
||||||
|
strings1[length] = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
strings1[length] = strings[i].replace("\\", "\\\\").replace("'", "''");
|
strings1[length] = strings[i].replace("\\", "\\\\").replace("'", "''");
|
||||||
}
|
}
|
||||||
length++;
|
length++;
|
||||||
|
@ -52,7 +52,11 @@ public class MysqlEngineProvider extends EngineProvider {
|
|||||||
for (int i = 0; i < strings.length; i++) {
|
for (int i = 0; i < strings.length; i++) {
|
||||||
if (tableFields.get(i).isChecked()) {
|
if (tableFields.get(i).isChecked()) {
|
||||||
if (StringUtils.isEmpty(strings[i])) {
|
if (StringUtils.isEmpty(strings[i])) {
|
||||||
strings1[length] = null;
|
if (tableFields.get(i).getFieldType().equals("LONG") || tableFields.get(i).getFieldType().equals("DOUBLE")) {
|
||||||
|
strings1[length] = "0";
|
||||||
|
} else {
|
||||||
|
strings1[length] = null;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
strings1[length] = strings[i].replace("\\", "\\\\").replace("'", "\\'");
|
strings1[length] = strings[i].replace("\\", "\\\\").replace("'", "\\'");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user