|
|
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.google.common.collect.Maps; |
|
|
|
import com.google.common.collect.Sets; |
|
|
|
import com.ningdatech.basic.function.VUtils; |
|
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
|
import com.ningdatech.basic.util.CollUtils; |
|
|
@@ -358,13 +359,14 @@ public class ProjectLibManage { |
|
|
|
} |
|
|
|
|
|
|
|
private Map<String, UserFullInfoDTO> searchUser(List<Task> tasks, UserInfoHelper userInfoHelper) { |
|
|
|
if(CollUtil.isNotEmpty(tasks)){ |
|
|
|
if(CollUtil.isEmpty(tasks)){ |
|
|
|
return Collections.emptyMap(); |
|
|
|
} |
|
|
|
List<UserFullInfoDTO> users = userInfoHelper.getUserFullInfoByEmployeeCodes( |
|
|
|
tasks.stream().map(Task::getAssignee).collect(Collectors.toSet())); |
|
|
|
if(CollUtil.isNotEmpty(users)){ |
|
|
|
return users.stream().collect(Collectors |
|
|
|
Set<String> employeeSet = Sets.newHashSet(); |
|
|
|
return users.stream().filter(u -> employeeSet.add(u.getEmployeeCode())).collect(Collectors |
|
|
|
.toMap(UserFullInfoDTO::getEmployeeCode,u -> u)); |
|
|
|
} |
|
|
|
return Collections.emptyMap(); |
|
|
|