管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-02-27 f15294cf82b71dfbf75d0821dd8eb13d14a9d936
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1.目录表 lf.sys_dir 和 、单位表 lf.sys_dep 添加了 code 编码字段,优化递归查询速度,表结构发生了变化。
 
2.bd、bs、md架构下的所有业务表的 depid、dirid,由整数类型改为字符串类型,depid 对应 lf.sys_dep.code,dirid 对应 lf.sys_dir.code。
 
3.用户表 lf.sys_user 添加了 depcode,对应 lf.sys_dep.code,为减少变更 lf.sys_user.depid 仍然存在。
 
4.元数据表 lf.sys_meta 的 depid(整数) 改为 depcode(字符)对应 lf.sys_dep.code,dirid(整数) 改为 dircode(字符)对应 lf.sys_dir.code。
注:旧名为 元数据,应用户要求改为 元数据。
 
5.完整名称:
-- 查询单位完整名,00030701 为 lf.sys_dep.id = 55 的code值
select fn_rec_query(55, 'dep'); 可以改为 select fn_get_fullname('00030701', 1); 
 
-- 查询目录完整名,01000000020000 为 lf.sys_dir.id = 90 的code值
select fn_rec_query(90, 'dir'); 可以改为 select fn_get_fullname('01000000020000', 2);
 
6.递归查询优化(以查询元数据为例):
旧:select * from lf.sys_meta where depid = ANY(fn_rec_array(1, 'dep'));
新:select * from lf.sys_meta where depcode like '00%'; -- 00 为 lf.sys_dep.id = 1 的code
 
旧:select * from lf.sys_meta where dirid = ANY(fn_rec_array(57, 'dir'));
新:select * from lf.sys_meta where dircode like '01%'; -- 01 为 lf.sys_dir.id = 57 的code
 
注:业务数据表也类似,如:
select * from bd.dlg_agnp where depid like '00%'; -- 字段不变
select * from bd.dlg_agnp where dirid like '01%';   -- 字段不变
 
7.Excel入库修改,即 datax/task/run/表格入库 的参数变更:
dirid ,  参数值(示例)由 10,11 改为 0A,0B,其对应表字段类型由 整数 改为 字符串。
depid ,参数值(示例)由 1,2     改为 01,02,其对应表字段类型由 整数 改为 字符串。