对比新文件 |
| | |
| | | package org.jeecg.modules.flowable.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.flowable.engine.history.HistoricActivityInstance; |
| | | import org.jeecg.modules.flowable.apithird.business.service.impl.FlowMyBusinessServiceImpl; |
| | | import org.jeecg.modules.flowable.domain.vo.FlowMy; |
| | | import org.jeecg.modules.flowable.domain.vo.WorkTaskDataVo; |
| | | import org.jeecg.modules.flowable.mapper.IWorkTaskVoMapper; |
| | | import org.jeecg.modules.flowable.service.IWorkTaskServiceVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | 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); |
| | | workTaskDataVoIPage.getRecords().forEach(workTaskDataVo -> { |
| | | HistoricActivityInstance historicActivityInstance=flowMyBusinessService.getPreviousNode(workTaskDataVo.getId()); |
| | | if (historicActivityInstance != null){ |
| | | workTaskDataVo.setPreNode(historicActivityInstance.getActivityName()); |
| | | workTaskDataVo.setPreNodeAssignee(historicActivityInstance.getAssignee()); |
| | | } |
| | | if (StrUtil.isEmpty(workTaskDataVo.getAssignee())){ |
| | | workTaskDataVo.setAssignee(flowMy.getUsername()); |
| | | } |
| | | }); |
| | | return workTaskDataVoIPage; |
| | | } |
| | | } |