fix: 修复超过40字符的csv文件导入失败
Some checks are pending
Typos Check / Spell Check with Typos (push) Waiting to run

This commit is contained in:
taojinlong 2024-12-11 18:34:14 +08:00 committed by fit2cloud-chenyw
parent 8f405a2dc2
commit 3000107d5e

View File

@ -195,9 +195,6 @@ public class ExcelUtils {
String filePath = saveFile(file, excelId);
for (ExcelSheetData excelSheetData : returnSheetDataList) {
if (excelSheetData.getExcelLabel().length() > 40) {
DEException.throwException(excelSheetData.getExcelLabel() + "长度不能大于40");
}
excelSheetData.setLastUpdateTime(System.currentTimeMillis());
excelSheetData.setTableName(excelSheetData.getExcelLabel());
excelSheetData.setDeTableName("excel_" + excelSheetData.getExcelLabel() + "_" + UUID.randomUUID().toString().replace("-", "").substring(0, 10));
@ -209,9 +206,6 @@ public class ExcelUtils {
* dataease字段类型0-文本1-时间2-整型数值3-浮点数值4-布尔5-地理位置6-二进制
*/
for (TableField field : excelSheetData.getFields()) {
if (field.getOriginName().length() > 40) {
DEException.throwException(excelSheetData.getExcelLabel() + "的字段" + field.getOriginName() + "长度不能大于40");
}
//TEXT LONG DATETIME DOUBLE
if (field.getFieldType().equalsIgnoreCase("TEXT")) {
field.setDeType(0);