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