From f127aaccf332ba7f34ee389261ff07bcff3efc6e Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 23 Feb 2022 18:19:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=B0=8F=E6=95=B0=E6=95=B0=E5=80=BC=E7=B2=BE=E5=BA=A6?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1009890--user=郭雨琦 修复功能用例导入小数数值精度问题 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001009890 --- .../listener/TestCaseNoModelDataListener.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/backend/src/main/java/io/metersphere/excel/listener/TestCaseNoModelDataListener.java b/backend/src/main/java/io/metersphere/excel/listener/TestCaseNoModelDataListener.java index ffa952518b..0f69c49ff7 100644 --- a/backend/src/main/java/io/metersphere/excel/listener/TestCaseNoModelDataListener.java +++ b/backend/src/main/java/io/metersphere/excel/listener/TestCaseNoModelDataListener.java @@ -23,7 +23,10 @@ import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import java.lang.reflect.Field; +import java.text.NumberFormat; import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -44,6 +47,8 @@ public class TestCaseNoModelDataListener extends AnalysisEventListener headMap; private Map excelHeadToFieldNameDic = new HashMap<>(); + private static NumberFormat numberFormat = NumberFormat.getNumberInstance(); + /** * 每隔2000条存储数据库,然后清理list ,方便内存回收 */ @@ -572,8 +577,16 @@ public class TestCaseNoModelDataListener extends AnalysisEventListener