sangwenwei 1 year ago
parent
commit
0df4b94ad9

+ 18 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -1020,6 +1020,24 @@ public class UserController {
         return false;
     }
 
+    /**
+     * 判断当前用户是否是会计所长
+     */
+    @ApiLog("判断当前用户角色是否是专家")
+    @GetMapping("isZj")
+    @ApiOperation(value = "判断当前用户角色是否是专家")
+    public boolean isZj(){
+        UserDTO currentUserDTO = UserUtils.getCurrentUserDTO();
+        for (RoleDTO roleDTO : currentUserDTO.getRoleDTOList()) {
+            if (ObjectUtils.isNotEmpty(roleDTO)){
+                if ("zj".equals(roleDTO.getEnName())){
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
 
 
     /**