作者 coolkidhay

日期转换错误,issue地址:https://gitee.com/y_project/RuoYi-Vue/issues/I4X0U7

@@ -316,7 +316,7 @@ public class ExcelUtil<T> @@ -316,7 +316,7 @@ public class ExcelUtil<T>
316 String dateFormat = field.getAnnotation(Excel.class).dateFormat(); 316 String dateFormat = field.getAnnotation(Excel.class).dateFormat();
317 if (StringUtils.isNotEmpty(dateFormat)) 317 if (StringUtils.isNotEmpty(dateFormat))
318 { 318 {
319 - val = parseDateToStr(dateFormat, (Date) val); 319 + val = parseDateToStr(dateFormat, val);
320 } 320 }
321 else 321 else
322 { 322 {
@@ -823,7 +823,7 @@ public class ExcelUtil<T> @@ -823,7 +823,7 @@ public class ExcelUtil<T>
823 String dictType = attr.dictType(); 823 String dictType = attr.dictType();
824 if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value)) 824 if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value))
825 { 825 {
826 - cell.setCellValue(parseDateToStr(dateFormat, (Date) value)); 826 + cell.setCellValue(parseDateToStr(dateFormat, value));
827 } 827 }
828 else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value)) 828 else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value))
829 { 829 {