|
|
|
|
@ -178,6 +178,11 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID |
|
|
|
|
Map<String, List<User>> noChooseMap = new HashMap<>(); |
|
|
|
|
Map<String, List<User>> chooseMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
//工艺人员
|
|
|
|
|
List<String> roleIds = new ArrayList<>(); |
|
|
|
|
roleIds.add("2032373544077012993"); |
|
|
|
|
roleIds.add("2032373858255548418"); |
|
|
|
|
|
|
|
|
|
BasicClazz detail = workCenterClient.getClazzById(clazzId).getData(); |
|
|
|
|
if(detail != null){ |
|
|
|
|
String teamId = detail.getTeamMemberId(); |
|
|
|
|
@ -185,10 +190,12 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID |
|
|
|
|
List<Long> ids = Func.toLongList(teamId); |
|
|
|
|
QueryWrapper<User> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.notIn("id",ids); |
|
|
|
|
queryWrapper.in("role_id",roleIds); |
|
|
|
|
// queryWrapper.eq("dept_id",parentId);
|
|
|
|
|
teamUnSelects = userService.list(queryWrapper); |
|
|
|
|
}else{ |
|
|
|
|
QueryWrapper<User> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.in("role_id",roleIds); |
|
|
|
|
// queryWrapper.eq("dept_id",parentId);
|
|
|
|
|
teamUnSelects = userService.list(queryWrapper); |
|
|
|
|
} |
|
|
|
|
@ -198,6 +205,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID |
|
|
|
|
List<Long> ids = Func.toLongList(teamId); |
|
|
|
|
QueryWrapper<User> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.in("id",ids); |
|
|
|
|
queryWrapper.in("role_id",roleIds); |
|
|
|
|
// queryWrapper.eq("dept_id",parentId);
|
|
|
|
|
teamSelects = userService.list(queryWrapper); |
|
|
|
|
|
|
|
|
|
@ -205,10 +213,14 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(teamUnSelects != null && teamUnSelects.size() > 0){ |
|
|
|
|
noChooseMap = teamUnSelects.stream().collect(Collectors.groupingBy(User::getDeptId)); |
|
|
|
|
noChooseMap = teamUnSelects.stream() |
|
|
|
|
.filter(user -> user.getDeptId() != null) |
|
|
|
|
.collect(Collectors.groupingBy(User::getDeptId)); |
|
|
|
|
} |
|
|
|
|
if(teamSelects != null && teamSelects.size() > 0){ |
|
|
|
|
chooseMap = teamSelects.stream().collect(Collectors.groupingBy(User::getDeptId)); |
|
|
|
|
chooseMap = teamSelects.stream() |
|
|
|
|
.filter(user -> user.getDeptId() != null) |
|
|
|
|
.collect(Collectors.groupingBy(User::getDeptId)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|