From 0b08933a8c742e6f839a279e0ea24e7d5cb1cc2e Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 15 Mar 2022 14:42:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AELocalDateTime=E7=B1=BB=E5=9E=8B=E6=97=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java index 21a8ad6..aa475e3 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java @@ -284,7 +284,7 @@ public class ExcelUtil String dateFormat = field.getAnnotation(Excel.class).dateFormat(); if (StringUtils.isNotEmpty(dateFormat)) { - val = parseDateToStr(dateFormat, (Date) val); + val = parseDateToStr(dateFormat, val); } else { @@ -703,7 +703,7 @@ public class ExcelUtil String separator = attr.separator(); if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value)) { - cell.setCellValue(parseDateToStr(dateFormat, (Date) value)); + cell.setCellValue(parseDateToStr(dateFormat, value)); } else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value)) {