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

springboot2
RuoYi 12 months ago
parent 7afa3c9bc3
commit a0b314f2b5

@ -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");
}

Loading…
Cancel
Save