| | |
| | | public class WorkTaskServiceImplVo extends ServiceImpl<IWorkTaskVoMapper, WorkTaskDataVo> implements IWorkTaskServiceVo { |
| | | @Autowired |
| | | FlowMyBusinessServiceImpl flowMyBusinessService; |
| | | |
| | | @Override |
| | | public IPage<WorkTaskDataVo> toTaskBySelf(FlowMy flowMy, Page page) { |
| | | IPage<WorkTaskDataVo> workTaskDataVoIPage=baseMapper.taskBySelf(flowMy,page); |
| | | IPage<WorkTaskDataVo> workTaskDataVoIPage = baseMapper.taskBySelf(flowMy, page); |
| | | workTaskDataVoIPage.getRecords().forEach(workTaskDataVo -> { |
| | | HistoricActivityInstance historicActivityInstance=flowMyBusinessService.getPreviousNode(workTaskDataVo.getId()); |
| | | if (historicActivityInstance != null){ |
| | | HistoricActivityInstance historicActivityInstance = flowMyBusinessService.getPreviousNode(workTaskDataVo.getId()); |
| | | if (historicActivityInstance != null) { |
| | | workTaskDataVo.setPreNode(historicActivityInstance.getActivityName()); |
| | | workTaskDataVo.setPreNodeAssignee(historicActivityInstance.getAssignee()); |
| | | } |
| | | if (StrUtil.isEmpty(workTaskDataVo.getAssignee())){ |
| | | if (StrUtil.isEmpty(workTaskDataVo.getAssignee())) { |
| | | workTaskDataVo.setAssignee(flowMy.getUsername()); |
| | | } |
| | | }); |
| | | return workTaskDataVoIPage; |
| | | } |
| | | |
| | | @Override |
| | | public Integer taskCountBySelf(String username) { |
| | | Integer count = baseMapper.taskCountBySelf(username); |
| | | if (count == null) { |
| | | return 0; |
| | | } |
| | | return count; |
| | | } |
| | | } |