From 676cf8f2c88969eb8027f702d62a3af17823dd2e Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Thu, 23 Jun 2022 14:54:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96----excel=20null=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reportexcel/service/impl/ReportExcelServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java index 865dd7dd..b25832d6 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java @@ -333,6 +333,9 @@ public class ReportExcelServiceImpl implements ReportExcelService { JSONObject addCell = cellDynamicData.get(j); //字段 String fieldLabel = addCell.getString(dataSet.getFieldLabel()); + if (StringUtils.isBlank(fieldLabel)) { + fieldLabel = StringUtils.EMPTY; + } String replace = v.replace("#{".concat(dataSet.getSetCode()).concat(".").concat(dataSet.getFieldLabel()).concat("}"), fieldLabel); //转字符串,解决深拷贝问题 JSONObject addCellData = JSONObject.parseObject(cellStr);