|
@@ -678,13 +678,13 @@ public class TaskController {
|
|
|
queryWrapper.orderByDesc("id");
|
|
|
List<Task> list = taskService.nameList(queryWrapper);
|
|
|
Project project = projectService.getById(projectId);
|
|
|
-
|
|
|
- //没有权限只能看到自己创建的,负责的和待分配的任务
|
|
|
- List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全部任务");
|
|
|
- if (functionList.size() == 0 && !userId.equals(project.getInchargerId())) {
|
|
|
- list = list.stream().filter(t->t.getExecutorId() == null || t.getExecutorId().contains(userId) || t.getCreaterId().equals(userId)).collect(Collectors.toList());
|
|
|
+ if (project != null) {
|
|
|
+ //没有权限只能看到自己创建的,负责的和待分配的任务
|
|
|
+ List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全部任务");
|
|
|
+ if (functionList.size() == 0 && !userId.equals(project.getInchargerId())) {
|
|
|
+ list = list.stream().filter(t->t.getExecutorId() == null || t.getExecutorId().contains(userId) || t.getCreaterId().equals(userId)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
msg.data = list;
|
|
|
return msg;
|
|
|
}
|