diff --git a/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/event/ProcessEndAfterEvent.java b/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/event/ProcessEndAfterEvent.java index b9d4af0d..d1b53adb 100644 --- a/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/event/ProcessEndAfterEvent.java +++ b/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/event/ProcessEndAfterEvent.java @@ -5,6 +5,7 @@ import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; +import java.util.stream.Stream; import org.apache.commons.lang.StringUtils; import org.dom4j.Document; @@ -221,8 +222,10 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList newOrg = newOrg + "," + orgIds; String[] split = newOrg.split(","); List list = asList(split); - list.stream().distinct(); - newOrg = list.toString(); + // 使用HashSet进行去重 + HashSet set = new HashSet<>(list); + List distinctList = new ArrayList<>(set); + newOrg = distinctList.toString().substring(1,distinctList.toString().length()-1).replaceAll(" ",""); } else { newOrg = orgIds; } @@ -245,8 +248,9 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList newPost = newPost + "," + reissuePostperm; String[] split = newPost.split(","); List list = asList(split); - list.stream().distinct(); - newPost = list.toString(); + HashSet set = new HashSet<>(list); + List distinctList = new ArrayList<>(set); + newPost = distinctList.toString().substring(1,distinctList.toString().length()-1).replaceAll(" ",""); } else { newPost = reissuePostperm; }