Beispiel #1
0
    def execute(self, request):
        '''获得员工信息'''
        staff = StaffServer.get(request.user_id)
        """判断身份证号是否存在"""
        if "identity" in request.user_info:
            StaffServer.check_exist(request.user_info['identity'], staff)

        StaffServer.update(staff, **request.user_info)
        '''更新账号信息
        account = StaffAccountServer.get_account_bystaff(staff)
        StaffAccountServer.update(account, **request.user_info)
        '''
        '''更新权限信息'''
        StaffPermiseServer.update_staff_access(request.user_info['role_ids'],
                                               "role", staff)
        StaffPermiseServer.update_staff_access(
            request.user_info['department_ids'], "department", staff)
Beispiel #2
0
    def execute(self, request):
        staff = self.auth_user

        StaffServer.update(staff, **request.user_info)