|
|
本帖最后由 LIJINLAN 于 2022-4-21 16:37 编辑
前言:权限平台相关帖子较多,常见的问题基本都已覆盖,此帖仅对数据层面相关的做了简单的整合。
常见问题排查思路(数据层面):
由于数据的不合理也可能会导致平台不正常展示/访问,故需要保证数据按要求正常存放,那么检查数据是否正常,可参考以下排查思路:
一、部门架构问题
1、ly-iacp-check存储过程 --执行此存储过程可检测基础数据是否合理,如有异常数据,则根据相应的提示处理
2、select * from ly_xtgl_bm bm where bm.fbmbh='root' and bm.ZT='1' and bm.scbs='0' and bm.bmdlxbh='root' and bm.Jgbs='1' -- 顶级部门,返回一条即正常,如无,则应该在源头上添加或手动添加
3、清除部门树缓存(系统管理--缓存管理-清除部门树)
4、重启服务
二、用户、用户角色
1、【你正在访问未授权的功能】select * from ly_xtgl_yh_js where yhbh = 'admin' and jsbh = 'RS002'; --返回一条即正常,若无则执行insert into ly_xtgl_yh_js values('RS002','admin',null);commit;
2、【无权访问该应用】SELECT * FROM LY_XTGL_YH_YY where yhbh = 'admin' and yybh = 'ly-iacp' --返回一条即正常,若无则手动添加
3、重启服务
三、如涉及bpm
1、如果权限平台的部门架构正常展示,而BPM不正常,检查LY_XTGL_BM,如排查无问题,可考虑在权限平台-右上角【设置】-【高级功能】-【重置部门层级】。
2、【admin账号登录无法查看左侧用户架构列表】BPM_ORGUSERDEPTMAP是否包括admin,如无则添加admin账号记录。
附1:权限平台集成方案
(注意:如果项目地中包括公司认证5.X版本(必须是联奕的),数据交换只需要同步LY_XTGL_BM/LY_RZ_YHTB)
(1)部门表
特别提醒:顶级部门要求满足这几点:fbmbh为root,bmdlxbh为root,jgbs为1,如数据不满足要求,部门数据可能无法加载 表名 | | | | | | | | | | |
| | | |
|
| | | |
|
| | | |
| 必入,三位一级 (举例子: 联奕大学 001 数字校园 001001 研发一部 001001001 研发二部 001001002) | | | |
| | | | |
|
| | | |
| | | | |
| | | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
| | | | |
|
| | | |
| | | | |
| 数据格式同部门层级编号一致,取父级部门的单位层级编号 |
注意事项说明: 部门编号可以随意定,部门层级编号是三位一级 (2)用户表 表单中字段带*号为必入字段,请注意 表名 | | | | | | | | | | |
| | | |
|
| | | |
|
| | | |
| | | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
| | | *用户密码,注:用户密码和salt有关系,请勿随意修改 | |
| 默认值 1191a5a0a3cc19a59dede8711abadaf7b0284b6b9fe0330faa160aeba497bfde 更新数据时请勿操作此字段。 明文密码为:Ly123456 | | | |
| 默认值 39c32b3f45094198a359abb67abeea59 更新数据时请勿操作此字段 | | *用户类型 teacher student guest | |
|
| | | |
|
| | | |
|
| | | |
|
| | *用户来源 1 系统添加 2 用户注册 3 数据交换 | |
| | | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
| | | | |
| | | | |
|
| | | |
|
| | | |
|
| | | |
| |
(3)部门用户中间表 注意事项说明: 一个用户只能有一个主要部门,如果一个用户有多个部门,只能有一个主要部门(1),并且默认“当前标识”在主要部门是1,其他是0
附2:权限平台代码参考
(不包括三位一级层级的处理)
--部门
create view LY_VIEW_QXPT_BMXX
as
SELECT
/*
作用:部门信息
时间:xxxx-xx-xx
作者:xxx
*/
1 as PXH, --排序号,
dwh as BMBH, --部门编号
dwmc as BMMC, -- *学校名称
'root' as FBMBH, -- *父级部门编号
'root' AS BMDLXBH ,-- *部门大类编号 (部门、科室、班级)
1 ZT,--状态
'0' SCBS,--删除标识
'1' JGBS,--机构标识
'-1' JGBH--机构编号
from LY_XXBZ_GXXX_DWJBSJZL where dwh='13828'
union all
select
/*二级部门:学院*/
2 as PXH, -- 排序号,
dwh as BMBH, -- 部门编号
dwmc as bmmc, -- 名称
'13828' as FBMBH, --父部门编号
'department' AS BMDLXBH ,-- *部门大类编号
1 ZT,--状态
'0' SCBS,-- 删除标识
'0' JGBS,-- 机构标识
'-1' JGBH -- 机构编号
from LY_XXBZ_GXXX_DWJBSJZL where dwh!='13828'
union all
select
/*三级部门:专业*/
3 as PXH, -- 排序号,
zy.ZYh as BMBH, -- 部门编号
zy.ZYmc, --名称
zy.dwh as FBMBH, --父部门编号
'major' AS BMDLXBH, -- *部门大类编号
1 ZT,--状态
'0' SCBS,-- 删除标识
'0' JGBS,-- 机构标识
'-1' JGBH -- 机构编号
from LY_XXBZ_GXJX_ZYXXSJL zy
left join LY_XXBZ_GXXX_DWJBSJZL dw on zy.dwh=dw.dwh
where dw.dwh is not null
union all
select
/*四级部门:班级*/
4 as PXH, -- 排序号,
bj.bh as BMBH, -- 部门编号
bj.BJMC, --名称
zy.ZYh as FBMBH, --父部门编号
'class' AS BMDLXBH, -- *部门大类编号
1 ZT,--状态
'0' SCBS,-- 删除标识
'0' JGBS,-- 机构标识
'-1' JGBH -- 机构编号
from LY_XXBZ_GXXX_BJSJL bj --1155
left join LY_XXBZ_GXJX_ZYXXSJL zy on bj.zybh=zy.zyh
where zy.zyh is not null and zy.dwh is not null;
---------------------------------------------------------------------------------------------------------
--用户
CREATE or replace VIEW LY_VIEW_QXPT_YHXX AS
select
/*
作用:用户信息
时间:xxxx-xx-xx
作者:xxx
*/
t1.gh as yhbh ,--*用户编号
t1.xm as yhmc ,--*用户名称
'' as yhnc ,--用户昵称
0 as pxh ,--排序号
t1.yx as dzyx ,--电子邮箱
t1.yddh as yddh ,--移动电话
'' as qq ,--qq
'' as wx_openid ,--微信号_openid
'' as wx_unionid ,--微信号_unionid
to_date('') as yxsj ,--有效时间
'1' as zt ,--*状态 0:禁用 1 激活
--'38c28213b5dbb628e2663b2cbfc6601fd0f48d88be295936aa507c8093b0eee3' as yhmm ,--*用户密码
--'db77131f068c4de692dffd8d9b83a4c3' as salt ,--*盐
'teacher' as yhlxbh ,--*用户类型 teacher student guest
xbm as xbm ,--性别码 1 男 2 女
'3' as yhly ,--*用户来源 1 系统添加 2 用户注册 3 数据交换
'0' as scbs ,--*删除标识 0 未删除 1 已删除
'-1' as jgbh ,--机构编号
t1.sfzjh as sfzh ,--身份证号码
t1.dwh
from LY_XXBZ_GXJG_JZGJCSJZL t1 --205
left join LY_XXBZ_GXXX_DWJBSJZL t2 on t1.dwh=t2.dwh
where t2.dwh is not null
union all
select
t1.xh as yhbh ,--*用户编号
t1.xm as yhmc ,--*用户名称
'' as yhnc ,--用户昵称
0 as pxh ,--排序号
t1.yx as dzyx ,--电子邮箱
t1.yddh as yddh ,--移动电话
'' as qq ,--qq
'' as wx_openid ,--微信号_openid
'' as wx_unionid ,--微信号_unionid
to_date('') as yxsj ,--有效时间
'1' as zt ,--*状态 0:禁用 1 激活
--'38c28213b5dbb628e2663b2cbfc6601fd0f48d88be295936aa507c8093b0eee3' as yhmm ,--*用户密码
--'db77131f068c4de692dffd8d9b83a4c3' as salt ,--*盐
'student' as yhlxbh ,--*用户类型 teacher student guest
t1.xbm as xbm ,--性别码 1 男 2 女
'3' as yhly ,--*用户来源 1 系统添加 2 用户注册 3 数据交换
'0' as scbs ,--*删除标识 0 未删除 1 已删除
'-1' as jgbh ,--机构编号
t1.sfzjh as sfzh ,--身份证号码
t4.bh
from LY_XXBZ_GXXS_XSJBSJZL t1
left join LY_XXBZ_GXXS_XSZXJBXX t3 on t1.xh=t3.xh
left join LY_XXBZ_GXXX_BJSJL t4 on t4.bh=t3.bjm
left join LY_VIEW_QXPT_BMXX t5 on t4.bh=t5.BMBH --and t5.BMDLXBH='class'
where t4.bh is not null and t5.BMBH is not null and t4.ssnj>=to_char(sysdate,'yyyy')-1;
-------------------------------------------------------------------------------------------------------------------------------------
--用户部门
create view LY_VIEW_QXPT_BMYHXX
as
select
/*
作用:部门用户信息
时间:xxxx-xx-xx
作者:xxx
*/
t1.yhbh as YHBH ,-- *用户编号
t1.bmbh as BMBH ,-- *部门编号
'1' as SFZY ,-- *是否主要
'1' as SFDQ -- *当前标识
from LY_VIEW_QXPT_YHXX t1
left join LY_VIEW_QXPT_BMXX t2 on t1.dwh=t2.bmbh
where t2.bmbh is not null;
|
|