优化Excel匹配数值型.0结尾

pull/1014/head
RuoYi 2025-04-28 11:24:35 +08:00
parent 838fc115ca
commit 00b2eeb4c3
1 changed files with 1 additions and 1 deletions

View File

@ -428,7 +428,7 @@ public class ExcelUtil<T>
if (String.class == fieldType)
{
String s = Convert.toStr(val);
if (StringUtils.endsWith(s, ".0"))
if (s.matches("^\\d+\\.0$"))
{
val = StringUtils.substringBefore(s, ".0");
}