|
|
|
@ -104,6 +104,8 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
|
|
|
|
|
entity.setTaskName(processWorkFlowResponse.getTaskName()); |
|
|
|
|
// 流程阶段执行人员名称
|
|
|
|
|
entity.setNextStepOperator(processWorkFlowResponse.getNextStepOperator()); |
|
|
|
|
// 流程阶段执行人员账号
|
|
|
|
|
entity.setNextStepExecutor(processWorkFlowResponse.getUserId()); |
|
|
|
|
|
|
|
|
|
// 流程步骤
|
|
|
|
|
if(variables.containsKey("processReversalStep")){ |
|
|
|
@ -262,24 +264,6 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
|
|
|
|
|
return this.updateById(entity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取当前机构指定角色的用户 |
|
|
|
|
* @param tenantId |
|
|
|
|
* @param deptId |
|
|
|
|
* @param alias |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
public User queryRoleUser(String tenantId, Long deptId, String alias){ |
|
|
|
|
if(Func.isEmpty(tenantId)){ |
|
|
|
|
tenantId = AuthUtil.getTenantId(); |
|
|
|
|
} |
|
|
|
|
R<List<User>> result = userClient.relationUserListByRoleAlias(tenantId, deptId, alias); |
|
|
|
|
if(!result.isSuccess()){ |
|
|
|
|
throw new ServiceException("查询角色用户信息失败!"); |
|
|
|
|
} |
|
|
|
|
return result.getData().get(0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 检修工作票列表分页查询 |
|
|
|
@ -314,7 +298,10 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
|
|
|
|
|
@Override |
|
|
|
|
public void preview(Long id) { |
|
|
|
|
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); |
|
|
|
|
HttpServletResponse response = servletRequestAttributes.getResponse(); |
|
|
|
|
HttpServletResponse response = null; |
|
|
|
|
if (servletRequestAttributes != null) { |
|
|
|
|
response = servletRequestAttributes.getResponse(); |
|
|
|
|
} |
|
|
|
|
// 查询检修工作票记录
|
|
|
|
|
AccessTicketPreviewVo preview = this.previewParams(id); |
|
|
|
|
// 参数对象
|
|
|
|
@ -550,4 +537,27 @@ public class AccessTicketServiceImpl extends ServiceImpl<AccessTicketMapper, Acc
|
|
|
|
|
task.setTaskIncomplete((int) entitys.stream().filter(o->!"流程结束".equals(o.getTaskName())).count()); |
|
|
|
|
return task; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 阶段执行人查询 |
|
|
|
|
* @param processInstanceId |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public List<User> stageExecutor(String processInstanceId) { |
|
|
|
|
AccessTicketEntity entity = this.getOne(Wrappers.<AccessTicketEntity>lambdaQuery() |
|
|
|
|
.eq(AccessTicketEntity::getProcessInstanceId,processInstanceId) |
|
|
|
|
); |
|
|
|
|
if(ObjectUtil.isEmpty(entity) || StringUtils.isEmpty(entity.getNextStepExecutor())){ |
|
|
|
|
return new ArrayList<>(); |
|
|
|
|
} |
|
|
|
|
List<User> users = new ArrayList<>(); |
|
|
|
|
Arrays.stream(entity.getNextStepExecutor().split(",")).forEach(account->{ |
|
|
|
|
User user = UserCache.getUser(Long.valueOf(account)); |
|
|
|
|
if(ObjectUtil.isNotEmpty(user)){ |
|
|
|
|
users.add(user); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return users; |
|
|
|
|
} |
|
|
|
|
} |