登录单位管理员帐号,在人员管理模块,将某人员帐号误删除了,则可以使用如下方法将帐号恢复回来,具体操作方法如下:

一、备份OA数据

二、查询已被删除人员的的id

例如:
select id from v3x_org_member where name =’姜运涛’ and is_deleted =1;

查询出的id为 -2320750588905894191

三、单位管理员新增加一个人员,如“姜运涛2”,此人员仅作为恢复人员账号用,人员信息不用保持一致.查询新增人员的id
select id from v3x_org_member where name =’杨栋2′ and is_deleted =0;

查询出的id为created -4889828602358313105

四、执行以下语句,恢复人员账号。注意id的对应关系

update v3x_org_member set is_deleted = 0 where id = 已被删除人员的id;
update v3x_org_member set is_deleted = 1 where id = 新增人员的id;
update security_principal set entityinternalid =已被删除人员的id where principal_id = (select principal_id from security_principal where entityinternalid=新增人员的id);
commit;

例如:
update v3x_org_member set is_deleted = 0 where id = -2320750588905894191;
update v3x_org_member set is_deleted = 1 where id = -4889828602358313105;
update security_principal set entityinternalid = -2320750588905894191 where principal_id = (select principal_id from security_principal where entityinternalid=-4889828602358313105);
commit;

五、执行成功后,用单位管理员到人员管理中修改被恢复人员的密码。恢复后已发、已办、待办等均可显示

六、执行完所有操作,重启OA服务即可

备注:适合A8的所有版本的人员帐号恢复