Ver código fonte

工作交接人去重

jzh 1 ano atrás
pai
commit
dff26064f5

+ 5 - 3
zjugis-business/src/main/java/com/zjugis/business/flow/resign/event/ResignEvent.java

@@ -44,6 +44,7 @@ import java.util.*;
 import java.util.stream.Collectors;
 
 import static com.zjugis.business.constants.FlowStatusConstants.*;
+import static com.zjugis.framework.common.util.collection.CollectionUtils.convertSet;
 
 /**
  * @author jzh
@@ -229,12 +230,13 @@ public class ResignEvent extends BaseController {
                 List<Map<String, String>> userMaps = new ArrayList<>();
                 List<ResignDetailDO> detailDOS = resignDetailService.getListByResignId(entity.getId());
                 if (CollectionUtil.isNotEmpty(detailDOS)) {
+                    Set<String> ids = convertSet(detailDOS, ResignDetailDO::getReceiver);
 
 
-                    detailDOS.forEach(v -> {
+                    ids.forEach(v -> {
                         HashMap<String, String> map = new HashMap<>();
-                        if (v.getReceiver() != null) {
-                            map.put("id", v.getReceiver());
+                        if (v != null) {
+                            map.put("id", v);
                             userMaps.add(map);
                         }
                     });