去重操作
This commit is contained in:
parent
88c19f4a2d
commit
97eb73e2ca
@ -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<String> list = asList(split);
|
||||
list.stream().distinct();
|
||||
newOrg = list.toString();
|
||||
// 使用HashSet进行去重
|
||||
HashSet<String> set = new HashSet<>(list);
|
||||
List<String> 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<String> list = asList(split);
|
||||
list.stream().distinct();
|
||||
newPost = list.toString();
|
||||
HashSet<String> set = new HashSet<>(list);
|
||||
List<String> distinctList = new ArrayList<>(set);
|
||||
newPost = distinctList.toString().substring(1,distinctList.toString().length()-1).replaceAll(" ","");
|
||||
} else {
|
||||
newPost = reissuePostperm;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user