def get_authority_department(ret, content, *args, **kwargs): ''' 查看公司权限 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_get(ret, 'AuthorityDepartment', content)
def get_role(ret, content, *args, **kwargs): ''' 查看岗位 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_get(ret, 'Role', content)
def get_department(ret, content, *args, **kwargs): ''' 查看部门 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_get(ret, 'Department', content)
def get_authority_user(ret, content, *args, **kwargs): ''' 查看用户权限 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_get(ret, 'AuthorityUser', content)
def get_authority_role(ret, content, *args, **kwargs): ''' 查看角色权限 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_get(ret, 'AuthorityRole', content)
def get_authority_company(ret, content, *args, **kwargs): ''' 查看公司权限 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_get(ret, 'AuthorityCompany', content)
def user_role_get(ret, content, *args, **kwargs): ''' 查看账户角色 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_get(ret, 'User_Con_Role', content)
def role_department_get(ret, content, *args, **kwargs): ''' 获取部门岗位 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_get(ret, 'Role_Con_Department', content)
def department_user_add(ret, content, *args, **kwargs): ''' 获取某部门账户 :param ret: :param content: :param args: :param kwargs: :return: ''' try: User_list = views.action_get(ret, 'User_Con_Department', content)['content']['value'] objs = [] for row in list(User_list): temp = org_models.User_Con_Role.objects.filter( User_id=row[1]).values('Role__Name', 'id') if temp: objs.extend([ (row[0], row[1], row[2], temp[0]['id'], temp[0]['Role__Name']), ]) else: objs.extend([ (row[0], row[1], row[2], None, None), ]) header_title = ['id', 'User_id', '用户名', 'User_Con_Role_id', '岗位'] ret['status'] = True ret['message'] = '{0}{1}'.format('获取', 'Department_Con_User') ret['content']['title'] = header_title ret['content']['value'] = list(objs) except Exception as e: ret['status'] = False ret['message'] = str(e) return ret