| | |
| | | import com.ycl.domain.entity.*; |
| | | import com.ycl.domain.form.*; |
| | | import com.ycl.domain.json.*; |
| | | import com.ycl.domain.query.ProcessLogQuery; |
| | | import com.ycl.domain.vo.*; |
| | | import com.ycl.event.event.TaskLogEvent; |
| | | import com.ycl.mapper.ProjectEngineeringMapper; |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.domain.query.ProjectProcessQuery; |
| | | import com.ycl.service.common.TaskCommonService; |
| | | import com.ycl.system.domain.base.AbsQuery; |
| | | import com.ycl.system.service.ISysDeptService; |
| | | import com.ycl.system.service.ISysDictTypeService; |
| | | import com.ycl.system.service.ISysRoleService; |
| | |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | public Result getProcessMsg(AbsQuery q) { |
| | | // 查自己的日志 |
| | | ProcessLogQuery query = new ProcessLogQuery(); |
| | | if (! SecurityUtils.isAdmin(SecurityUtils.getUserId())) { |
| | | query.setUserId(SecurityUtils.getUserId()); |
| | | } |
| | | query.setEventTypeList(Arrays.asList(ProcessLogEventTypeEnum.DELEGATE.getValue(), |
| | | ProcessLogEventTypeEnum.REJECT.getValue(), |
| | | ProcessLogEventTypeEnum.JUMP.getValue(), |
| | | ProcessLogEventTypeEnum.FINISHED.getValue(), |
| | | ProcessLogEventTypeEnum.WAIT.getValue())); |
| | | query.setCurrentPage(q.getCurrentPage()); |
| | | query.setPageSize(q.getPageSize()); |
| | | Result result = processLogService.projectProcessLogPage(query); |
| | | List<ProcessLogVO> logs = (List<ProcessLogVO>) result.get("data"); |
| | | |
| | | logs.stream().forEach(log -> { |
| | | if (ProcessLogEventTypeEnum.FINISHED.equals(log.getEventType())) { |
| | | log.setContent("您完成了任务:" + log.getTaskName()); |
| | | } else if (ProcessLogEventTypeEnum.REJECT.equals(log.getEventType())) { |
| | | log.setContent("您驳回了任务:" + log.getTaskName()); |
| | | } else if (ProcessLogEventTypeEnum.WAIT.equals(log.getEventType())) { |
| | | log.setContent("您容缺了任务:" + log.getTaskName()); |
| | | } else if (ProcessLogEventTypeEnum.JUMP.equals(log.getEventType())) { |
| | | log.setContent("您跳过了任务:" + log.getTaskName()); |
| | | } |
| | | }); |
| | | return Result.ok().data(logs).total((Long) result.get("total")); |
| | | } |
| | | |
| | | /** |
| | | * 查询待办任务 |
| | | * |