正在显示
1 个修改的文件
包含
9 行增加
和
5 行删除
| @@ -1937,18 +1937,22 @@ func (srv *SummaryEvaluationService) ListAllEvaluationFinish(param *command.Quer | @@ -1937,18 +1937,22 @@ func (srv *SummaryEvaluationService) ListAllEvaluationFinish(param *command.Quer | ||
| 1937 | defer func() { | 1937 | defer func() { |
| 1938 | _ = transactionContext.RollbackTransaction() | 1938 | _ = transactionContext.RollbackTransaction() |
| 1939 | }() | 1939 | }() |
| 1940 | - //判断是否是hrbp | 1940 | + // 判断是否是hrbp |
| 1941 | flagHrbp, err := roleService.GetHrBp(transactionContext, param.CompanyId, param.UserId) | 1941 | flagHrbp, err := roleService.GetHrBp(transactionContext, param.CompanyId, param.UserId) |
| 1942 | if err != nil { | 1942 | if err != nil { |
| 1943 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 1943 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
| 1944 | } | 1944 | } |
| 1945 | - if flagHrbp != domain.RoleTypeSystem { | 1945 | + // 判断是否是超级管理员 |
| 1946 | + superAdminFlag, err := roleService.GetSuperAdmin(transactionContext, param.CompanyId, param.UserId) | ||
| 1947 | + if err != nil { | ||
| 1948 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
| 1949 | + } | ||
| 1950 | + // 不是HRBP 或 超级管理员 | ||
| 1951 | + if flagHrbp != domain.RoleTypeSystem && superAdminFlag != domain.RoleTypeSuperAdmin { | ||
| 1946 | return tool_funs.SimpleWrapGridMap(0, []string{}), nil | 1952 | return tool_funs.SimpleWrapGridMap(0, []string{}), nil |
| 1947 | } | 1953 | } |
| 1948 | //判断是否是上级 | 1954 | //判断是否是上级 |
| 1949 | - userRepo := factory.CreateUserRepository(map[string]interface{}{ | ||
| 1950 | - "transactionContext": transactionContext, | ||
| 1951 | - }) | 1955 | + userRepo := factory.CreateUserRepository(map[string]interface{}{"transactionContext": transactionContext}) |
| 1952 | 1956 | ||
| 1953 | _, parentUser, _ := userRepo.Find(map[string]interface{}{ | 1957 | _, parentUser, _ := userRepo.Find(map[string]interface{}{ |
| 1954 | "parentId": param.UserId, | 1958 | "parentId": param.UserId, |
-
请 注册 或 登录 后发表评论