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

pull/412/MERGE
RuoYi 5 months ago
parent 235728fdb9
commit a36e19d88e

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

Loading…
Cancel
Save