Commit af7dbd8f authored by tianbo's avatar tianbo

隐患执行角色优化

parent 8a80f977
...@@ -1172,8 +1172,16 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD ...@@ -1172,8 +1172,16 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
// 第一次处于待现场确认时,启动工作流 // 第一次处于待现场确认时,启动工作流
if (ValidationUtil.isEmpty(processInstanceId)) { if (ValidationUtil.isEmpty(processInstanceId)) {
// 1、校验是否有启动后执行现场确认的权限 // 1、校验是否有启动后执行现场确认的权限
RoleBo roleBo = reginParams.getRole(); // 获取当前登录用户的所有角色
if (!onSiteConfirmRole.equals(roleBo.getRoleName())) { Set<String> roleNameSet = Sets.newHashSet();
if (!ValidationUtil.isEmpty(reginParams.getUserModel().getOrgRoles())) {
reginParams.getUserModel().getOrgRoles().values().forEach(i -> {
i.forEach(e -> {
roleNameSet.add(e.getRoleName());
});
});
}
if (!roleNameSet.contains(onSiteConfirmRole)) {
executeSubmitDto.setIsOk(false); executeSubmitDto.setIsOk(false);
executeSubmitDto.setMsg("没有执行权限"); executeSubmitDto.setMsg("没有执行权限");
return executeSubmitDto; return executeSubmitDto;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment