去重操作

This commit is contained in:
Mr-wang 2023-08-02 17:37:09 +08:00
parent 67d434de9e
commit 542986ccd7

View File

@ -35,6 +35,8 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.awspaas.user.apps.app.util.UtilUrl; import com.awspaas.user.apps.app.util.UtilUrl;
import static java.util.Arrays.asList;
/** /**
* 补充发送OA待阅 * 补充发送OA待阅
* *
@ -217,6 +219,10 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
if (UtilString.isNotEmpty(orgIds)) { if (UtilString.isNotEmpty(orgIds)) {
if (UtilString.isNotEmpty(newOrg)) { if (UtilString.isNotEmpty(newOrg)) {
newOrg = newOrg + "," + orgIds; newOrg = newOrg + "," + orgIds;
String[] split = newOrg.split(",");
List<String> list = asList(split);
list.stream().distinct();
newOrg = list.toString();
} else { } else {
newOrg = orgIds; newOrg = orgIds;
} }
@ -237,6 +243,10 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
if (UtilString.isNotEmpty(reissuePostperm)) { if (UtilString.isNotEmpty(reissuePostperm)) {
if (UtilString.isNotEmpty(newPost)) { if (UtilString.isNotEmpty(newPost)) {
newPost = newPost + "," + reissuePostperm; newPost = newPost + "," + reissuePostperm;
String[] split = newPost.split(",");
List<String> list = asList(split);
list.stream().distinct();
newPost = list.toString();
} else { } else {
newPost = reissuePostperm; newPost = reissuePostperm;
} }