|
|
@ -215,13 +215,14 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe |
|
|
|
public Map<String, Object> queryTaskGroupByProjectCode(User loginUser, int pageNo, int pageSize, Long projectCode) { |
|
|
|
public Map<String, Object> queryTaskGroupByProjectCode(User loginUser, int pageNo, int pageSize, Long projectCode) { |
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
Page<TaskGroup> page = new Page<>(pageNo, pageSize); |
|
|
|
Page<TaskGroup> page = new Page<>(pageNo, pageSize); |
|
|
|
|
|
|
|
PageInfo<TaskGroup> emptyPageInfo = new PageInfo<>(pageNo, pageSize); |
|
|
|
boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_VIEW); |
|
|
|
Set<Integer> ids = resourcePermissionCheckService.userOwnedResourceIdsAcquisition(AuthorizationType.TASK_GROUP, loginUser.getId(), logger); |
|
|
|
if (!canOperatorPermissions){ |
|
|
|
if (ids.isEmpty()) { |
|
|
|
putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION); |
|
|
|
result.put(Constants.DATA_LIST, emptyPageInfo); |
|
|
|
|
|
|
|
putMsg(result, Status.SUCCESS); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
IPage<TaskGroup> taskGroupPaging = taskGroupMapper.queryTaskGroupPagingByProjectCode(page, projectCode); |
|
|
|
IPage<TaskGroup> taskGroupPaging = taskGroupMapper.queryTaskGroupPagingByProjectCode(page, new ArrayList<>(ids), projectCode); |
|
|
|
|
|
|
|
|
|
|
|
return getStringObjectMap(pageNo, pageSize, result, taskGroupPaging); |
|
|
|
return getStringObjectMap(pageNo, pageSize, result, taskGroupPaging); |
|
|
|
} |
|
|
|
} |
|
|
|