Merge pull request #12416 from dataease/pr@dev@fix_report_export_excel_npe

fix(X-Pack): 定时报告导出视图excel报错空指针
This commit is contained in:
fit2cloud-chenyw 2024-09-24 17:05:55 +08:00 committed by GitHub
commit a67f4f34bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -135,9 +135,9 @@ public class ViewExportExcel {
for (int i = 0; i < headKeys.size(); i++) {
String key = headKeys.get(i);
Object val = row.get(key);
if (ObjectUtils.isEmpty(val))
if (ObjectUtils.isEmpty(val)) {
tempList.add(StringUtils.EMPTY);
if (fieldTypes.get(i) == 3) {
} else if (fieldTypes.get(i) == 3) {
tempList.add(filterInvalidDecimal(val.toString()));
} else {
tempList.add(val.toString());
@ -160,4 +160,10 @@ public class ViewExportExcel {
}
return sourceNumberStr;
}
public static void main(String[] args) {
List<String> list = new ArrayList<>();
list.add(null);
System.out.println(111);
}
}