| | |
| | | } |
| | | |
| | | @Override |
| | | public Boolean taskIsWait(String taskId, String processInsId) { |
| | | List<ProcessLog> list = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(ProcessLog::getProcessInsId, processInsId) |
| | | .eq(ProcessLog::getTaskId, taskId) |
| | | .list(); |
| | | return list.stream().anyMatch(log -> ProcessLogEventTypeEnum.WAIT.equals(log.getEventType())) |
| | | && list.stream().filter(log -> ProcessLogEventTypeEnum.FINISHED.equals(log.getEventType())).count() < 1; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean taskIsJump(String taskId, String processInsId) { |
| | | List<ProcessLog> list = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(ProcessLog::getProcessInsId, processInsId) |
| | | .eq(ProcessLog::getTaskId, taskId) |
| | | .eq(ProcessLog::getEventType, ProcessLogEventTypeEnum.JUMP) |
| | | .list(); |
| | | return list.size() > 0; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean taskIsTeamwork(String taskId, String processInsId) { |
| | | ProcessLog log = new LambdaQueryChainWrapper<>(baseMapper) |
| | | .eq(ProcessLog::getProcessInsId, processInsId) |
| | |
| | | log.setEventDataObj(delegateData); |
| | | } else if (ProcessLogEventTypeEnum.JUMP.equals(log.getEventType())) { |
| | | log.setEventDataObj(JSON.parseObject(log.getEventDataJson(), JumpData.class)); |
| | | } else if (ProcessLogEventTypeEnum.WAIT.equals(log.getEventType())) { |
| | | log.setEventDataObj(JSON.parseObject(log.getEventDataJson(), WaitData.class)); |
| | | } else if (ProcessLogEventTypeEnum.REJECT.equals(log.getEventType())) { |
| | | log.setEventDataObj(JSON.parseObject(log.getEventDataJson(), RejectData.class)); |
| | | } else if (ProcessLogEventTypeEnum.SUPERVISE.equals(log.getEventType())) { |