| | |
| | | import com.iailab.framework.common.pojo.CommonResult; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.common.util.number.NumberUtils; |
| | | import com.iailab.framework.datapermission.core.annotation.DataPermission; |
| | | import com.iailab.module.bpm.controller.admin.task.vo.task.*; |
| | | import com.iailab.module.bpm.convert.task.BpmTaskConvert; |
| | | import com.iailab.module.bpm.dal.dataobject.definition.BpmFormDO; |
| | |
| | | @GetMapping("todo-page") |
| | | @Operation(summary = "获取 Todo 待办任务分页") |
| | | @PreAuthorize("@ss.hasPermission('bpm:task:query')") |
| | | @DataPermission(enable = false) // 关闭数据权限,避免只查看自己时,查询不到部门。 |
| | | public CommonResult<PageResult<BpmTaskRespVO>> getTaskTodoPage(@Valid BpmTaskPageReqVO pageVO) { |
| | | PageResult<Task> pageResult = taskService.getTaskTodoPage(getLoginUserId(), pageVO); |
| | | if (CollUtil.isEmpty(pageResult.getList())) { |
| | |
| | | // 拼接数据 |
| | | Map<String, ProcessInstance> processInstanceMap = processInstanceService.getProcessInstanceMap( |
| | | convertSet(pageResult.getList(), Task::getProcessInstanceId)); |
| | | // TODO 此处有bug |
| | | Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap( |
| | | convertSet(processInstanceMap.values(), instance -> Long.valueOf(instance.getStartUserId()))); |
| | | return success(BpmTaskConvert.INSTANCE.buildTodoTaskPage(pageResult, processInstanceMap, userMap)); |
| | | PageResult<BpmTaskRespVO> bpmTaskRespVOPageResult = BpmTaskConvert.INSTANCE.buildTodoTaskPage(pageResult, processInstanceMap, userMap); |
| | | return success(bpmTaskRespVOPageResult); |
| | | } |
| | | |
| | | @GetMapping("done-page") |