fix: 导入excel失败

This commit is contained in:
taojinlong 2021-09-23 16:51:59 +08:00
parent c8dcd383ec
commit 7063e0b0b5
2 changed files with 1 additions and 9 deletions

View File

@ -337,7 +337,7 @@ public class ExcelXlsxReader extends DefaultHandler {
formatString = style.getDataFormatString();
short format = this.formatIndex;
if (format == 14 || format == 31 || format == 57 ||format == 59||
format == 58 || (176 <= format && format < 178)
format == 58 || (176 < format && format < 178)
|| (182 <= format && format <= 196) ||
(210 <= format && format <= 213) || (208 == format))
{ // 日期
@ -440,10 +440,6 @@ public class ExcelXlsxReader extends DefaultHandler {
}
}
}
if(curCol==1){
System.out.println(type);
System.out.println(nextDataType);
}
return thisStr;
}

View File

@ -594,12 +594,8 @@ public class DataSetTableService {
QueryProvider qp = ProviderFactory.getQueryProvider(ds.getType());
datasourceRequest.setQuery(qp.createQuerySQLWithPage(table, fields, page, pageSize, realSize, false, ds));
map.put("sql", datasourceRequest.getQuery());
System.out.println(datasourceRequest.getQuery());
try {
data.addAll(jdbcProvider.getData(datasourceRequest));
for(int i=0;i< data.size(); i++){
System.out.println(data.get(i)[2]);
}
} catch (Exception e) {
e.printStackTrace();
DEException.throwException(e.getMessage());