From 9cc77a5006bd91a0acfda923ac8c1ce1df7fc42e Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 21 Aug 2024 11:48:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=85=A5=E4=B8=8D=E5=8B=BE=E9=80=89?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E4=B9=9F=E5=AF=BC=E5=85=A5=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1045518 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001045518 --- .../functional/service/FunctionalCaseFileService.java | 4 ++-- .../metersphere/functional/xmind/parser/XMindCaseParser.java | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseFileService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseFileService.java index 5e9c4fac68..badb80bbd2 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseFileService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseFileService.java @@ -330,7 +330,7 @@ public class FunctionalCaseFileService { XMindCaseParser xMindParser = new XMindCaseParser(request, customFields, user, lasePos); errList = xMindParser.parse(multipartFile); response.setErrorMessages(errList); - response.setSuccessCount(xMindParser.getList().size() + xMindParser.getUpdateList().size()); + response.setSuccessCount(xMindParser.getList().size() + xMindParser.getUpdateList().size()+ xMindParser.getCheckSuccessList().size()); response.setFailCount(errList.size()); xMindParser.clear(); return response; @@ -407,7 +407,7 @@ public class FunctionalCaseFileService { } xmindParser.saveData(); response.setErrorMessages(errList); - response.setSuccessCount(xmindParser.getList().size() + xmindParser.getUpdateList().size()); + response.setSuccessCount(xmindParser.getList().size() + xmindParser.getUpdateList().size()+ xmindParser.getCheckSuccessList().size()); response.setFailCount(errList.size()); xmindParser.clear(); return response; diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/xmind/parser/XMindCaseParser.java b/backend/services/case-management/src/main/java/io/metersphere/functional/xmind/parser/XMindCaseParser.java index d4f6a0e220..af0247834e 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/xmind/parser/XMindCaseParser.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/xmind/parser/XMindCaseParser.java @@ -46,6 +46,8 @@ public class XMindCaseParser { @Getter protected List list = new ArrayList<>(); @Getter + protected List checkSuccessList = new ArrayList<>(); + @Getter protected List updateList = new ArrayList<>(); private FunctionalCaseService functionalCaseService; @@ -93,6 +95,7 @@ public class XMindCaseParser { public void clear() { list.clear(); updateList.clear(); + checkSuccessList.clear(); pathMap.clear(); moduleTree = new ArrayList<>(); customFieldValidatorMap = new HashMap<>(); @@ -288,7 +291,7 @@ public class XMindCaseParser { functionalCaseExcelData.setNum(checkResult); updateList.add(functionalCaseExcelData); } else { - list.add(functionalCaseExcelData); + checkSuccessList.add(functionalCaseExcelData); } } else { list.add(functionalCaseExcelData);