|
@@ -11,6 +11,7 @@ import com.bosshand.virgo.api.model.Project;
|
|
|
import com.bosshand.virgo.api.model.ProjectItem;
|
|
|
import com.bosshand.virgo.api.model.ProjectItemTarget;
|
|
|
import com.bosshand.virgo.api.util.PositionUtil;
|
|
|
+import com.bosshand.virgo.core.model.MgrOrganization;
|
|
|
import com.bosshand.virgo.core.model.UserContext;
|
|
|
import com.bosshand.virgo.core.utils.ContextUtils;
|
|
|
import com.bosshand.virgo.core.utils.StringUtil;
|
|
@@ -139,8 +140,15 @@ public class ProjectService {
|
|
|
}
|
|
|
// 项目管理员
|
|
|
Map<Long, Project> map = new HashMap();
|
|
|
- if (userContext.isAdmin()) {
|
|
|
- list = projectDao.getProjectByOrganizationId(userContext.getOrganizationId());
|
|
|
+ List<MgrOrganization> organizationList = userContext.getOrganizationList();
|
|
|
+ long adminOrganizationId = 0;
|
|
|
+ for (MgrOrganization o : organizationList) {
|
|
|
+ if (o.isB()) {
|
|
|
+ adminOrganizationId = o.getId();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (adminOrganizationId != 0) {
|
|
|
+ list = projectDao.getProjectByOrganizationId(adminOrganizationId);
|
|
|
if (list != null && list.size() > 0) {
|
|
|
Set<JSONObject> set = new HashSet<>();
|
|
|
set.add(JSONObject.parseObject(UserContext.IDENTITY_OWNER_DATA));
|