|
@@ -139,7 +139,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
httpRespMsg.data = projectMapper.getOnlyJoinProjects(user.getId(), user.getCompanyId());
|
|
|
} else {
|
|
|
//有权限的填报全部的
|
|
|
- httpRespMsg.data = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", user.getCompanyId()));
|
|
|
+ httpRespMsg.data = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", user.getCompanyId()).orderByDesc("is_public").orderByAsc("id"));
|
|
|
}
|
|
|
} else {
|
|
|
if (!sysFunctionService.hasPriviledge(user.getRoleId(), "查看全部项目")) {
|
|
@@ -147,7 +147,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
httpRespMsg.data = projectMapper.getParticipatedProject(user.getId(), user.getCompanyId());
|
|
|
} else {
|
|
|
//有权限的看全部的
|
|
|
- httpRespMsg.data = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", user.getCompanyId()));
|
|
|
+ httpRespMsg.data = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", user.getCompanyId()).orderByDesc("is_public").orderByAsc("id"));
|
|
|
}
|
|
|
}
|
|
|
} catch (NullPointerException e) {
|
|
@@ -1480,7 +1480,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", user.getCompanyId()));
|
|
|
userIds = userList.stream().map(User::getId).collect(Collectors.toList());
|
|
|
}
|
|
|
- if (targetUserId != null) {
|
|
|
+ if (!StringUtils.isEmpty(targetUserId)) {
|
|
|
userIds = userIds.stream().filter(u->u.equals(targetUserId)).collect(Collectors.toList());
|
|
|
}
|
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
@@ -1534,6 +1534,38 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
itemList.add(parent);
|
|
|
}
|
|
|
}
|
|
|
+ //加上全部的人员(不含已离职),不要和已有任务的人员重复
|
|
|
+ List<String> extraUidList = new ArrayList<>();
|
|
|
+ for (String uid : userIds) {
|
|
|
+ boolean find = false;
|
|
|
+ for (Map userMap : ganttData) {
|
|
|
+ String taskUid = (String)userMap.get("user_id");
|
|
|
+ if (taskUid.equals(uid)) {
|
|
|
+ find = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!find) {
|
|
|
+ extraUidList.add(uid);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (extraUidList.size() > 0) {
|
|
|
+ List<User> userList = userMapper.selectList(new QueryWrapper<User>().in("id", extraUidList).eq("is_active", 1));
|
|
|
+ for (User u : userList) {
|
|
|
+ GanttDataItem userGantt = new GanttDataItem();
|
|
|
+ userGantt.id = u.getId();
|
|
|
+ userGantt.userId = u.getId();
|
|
|
+ userGantt.text = u.getName();
|
|
|
+ userGantt.render = "split";
|
|
|
+ userGantt.start_date = null;
|
|
|
+ userGantt.end_date = null;
|
|
|
+ userGantt.time = 0;
|
|
|
+ userGantt.parent=String.valueOf(u.getDepartmentId());
|
|
|
+ itemList.add(userGantt);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
for(int i=0;i<leaveSheetList.size();i++){
|
|
|
GanttDataItem curItem = new GanttDataItem();;
|
|
|
if (!leaveSheetList.get(i).getOwnerId().equals(lsLastItemId)) {
|