问题:给该用户的默认组织分配角色,分配角色不成功(保存之后已分配角色清空),无报错
问题现象原因:该用户 业务组织范围中 缺少 默认组织(缺省组织)
问题产生原因:历史补丁SHR员工入职初始化创建的用户 没有 添加默认组织 到业务组织范围中.
解决:
1、解决当前数据问题(2种):
方法1、手动单个用户维护:用户管理-维护组织范围-(业务组织)-新增组织-添加用户的默认组织
方法2、批量修复用户默认组织范围(可直接取附件中sql拷贝到查询分析器依次执行):
云社区的编辑器问题,EAS查询分析器可能不能正常识别以下sql格式,执行会报错,需要格式化sql,可访问:
--修复用户没有默认组织业务组织范围的数据
---======请将以下4条SQL语句按1、2、3、4 的顺序一条条的分别执行========
-- 1 备份需要在表T_PM_ORGRANGE增加的默认组织缺失数据到备份表t_Pm_Orgrange_bak01
SELECT newbosid('92B9F8E4') as fid,
uu.FID as fuserid,
uu.FDEFORGUNITID as forgid,
10 as ftype into t_Pm_Orgrange_bak01
FROM T_PM_USER uu
where not exists (SELECT 1
FROM T_PM_ORGRANGE rge
where rge.FUSERID = uu.fid
and rge.FORGID = uu.FDEFORGUNITID
and rge.FTYPE = 10);
-- 2 修复增加T_PM_ORGRANGE 默认组织缺失数据
insert into t_Pm_Orgrange (fid,fuserid,forgid,ftype) select fid,fuserid,forgid,ftype from t_Pm_Orgrange_bak01 where forgid is not null;
-- 3 备份需要在表t_Pm_Orgrangeincludesuborg增加的默认组织缺失数据到备份表t_Pm_Orgrangeincludesuborg_bak
SELECT newbosid('4DC3DADF') as fid,
uu.FID as fuserid,
uu.FDEFORGUNITID as forgid,
10 as ftype,
0 as fisincludesuborg into t_Pm_Orgrangeincludesuborg_bak
FROM T_PM_USER uu
where not exists (SELECT 1
FROM t_Pm_Orgrangeincludesuborg rge
where rge.FUSERID = uu.fid
and rge.FORGID = uu.FDEFORGUNITID
and rge.FTYPE = 10);
-- 4 修复增加t_Pm_Orgrangeincludesuborg 默认组织缺失数据
insert into t_Pm_Orgrangeincludesuborg (fid,fuserid,forgid,ftype, fisincludesuborg) select fid,fuserid,forgid,ftype,fisincludesuborg from t_Pm_Orgrangeincludesuborg_bak where forgid is not null;
2、解决根本问题
EAS8.5/EAS8.6 (私有云) 基础系统领域的补丁 发布日期大于 2020-06-23 之后的已解决,之后则不会产生该类数据。
如果需要打补丁,可打对应领域最新补丁
EAS8.5 基础系统最新补丁:PT155622
EAS8.6 (私有云)基础系统最新补丁:PT155616
修复用户缺少默认业务组织范围数据.zip(0.89KB)
推荐阅读