mirror of
https://github.com/yangzongzhuan/RuoYi-Cloud.git
synced 2025-06-05 04:29:00 +00:00
优化Excel匹配数值型.0结尾
This commit is contained in:
parent
7b6fdb3a89
commit
57fe1c663e
@ -390,7 +390,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…
Reference in New Issue
Block a user