Browse Source

超级管理员不能执行任务

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
bf255c4472
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ExecuteHandle.java

+ 4
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ExecuteHandle.java View File

@@ -45,7 +45,10 @@ public class ExecuteHandle implements GenerateInspectionFieldHander {
return;
}

if (RoleEnum.ADMIN.getCode() == user.getRoleId()) {
if (RoleEnum.SUPER_ADMIN.getCode() == user.getRoleId()) {
// 超级管理员不能执行任务操作
inspectionVo.setExecute(false);
} else if (RoleEnum.ADMIN.getCode() == user.getRoleId()) {
// 管理员可对本部门的任务执行此操作
if (user.getDeptId().equals(inspectionVo.getDeptId())) {
inspectionVo.setExecute(true);

Loading…
Cancel
Save