Commit 8e72d579 by 徐高华

离职继承

parent 4529ad88
......@@ -103,6 +103,7 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
List<QywxUnassignedInfoDTO> ret = new LinkedList<>();
QywxGetUnassignedListDTO unassignedListDTO = null;
String cursor = null;
Map<String,Boolean> map = new HashMap<>() ;
do {
//离职成员客户列表
unassignedListDTO = qywxUserApiService.getUnassignedList(qwDTO.getThirdCorpid(), qwDTO.getSelf3thSecret(), cursor , qwDTO.isSelf(),qwDTO.getUrlHost());
......@@ -111,10 +112,14 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
if (CollectionUtils.isNotEmpty(infoList)) {
//这里过滤staff成员id,避免ret数组过大
//根据handoverUserid去重
List<QywxUnassignedInfoDTO> collect = infoList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(QywxUnassignedInfoDTO::getHandoverUserid))), ArrayList::new));
for (QywxUnassignedInfoDTO dto : collect){
for (QywxUnassignedInfoDTO dto : infoList) {
String handoverUserid = dto.getHandoverUserid();
if (handoverService.filterHandoverStaff(wxEnterpriseId, handoverUserid)) {
Boolean flag = map.get(handoverUserid) ;
if(null == flag) {
flag = handoverService.filterHandoverStaff(wxEnterpriseId, handoverUserid) ;
map.put(handoverUserid,flag) ;
}
if (flag) {
ret.add(dto);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment