------------------------------------------------------ 更新菜单+用户
select * from lf.sys_menu where cn_name = '数据库监控';
-- update lf.sys_menu set url = 'http://172.16.200.141:8088/server/druid/index.html' where cn_name = '数据库监控';

select * from lf.sys_user; -- Admin@1234_lf
-- update lf.sys_user set pwd = 'd4d25475a81ef4db4b28ce4034500f896169f15c0c68da5d';

select * from lf.sys_menu order by id;
update lf.sys_menu set url = 'http://pipe.cppe.com:88/dataxdi/#/schema/list?tags=入库质检&embed=true&token=' where cn_name = '入库质检';
update lf.sys_menu set url = 'http://pipe.cppe.com:88/dataxdi/#/schema/list?tags=成果质检&embed=true&token=' where cn_name = '成果质检';
update lf.sys_menu set url = 'http://pipe.cppe.com:88/dataxdi/#/task/list?embed=true&token=' where cn_name = '任务状态' and id = 69;

update lf.sys_menu set url = 'http://pipe.cppe.com:88/dataxdi/#/schema/list?tags=数据交换&embed=true&token=' where cn_name = '格式转换';
update lf.sys_menu set url = 'http://pipe.cppe.com:88/dataxdi/#/schema/list?tags=坐标转换&embed=true&token=' where cn_name = '坐标转换';
update lf.sys_menu set url = 'http://pipe.cppe.com:88/dataxdi/#/schema/list?tags=数据分发&embed=true&token=' where cn_name = '数据分发';
update lf.sys_menu set url = 'http://pipe.cppe.com:88/dataxdi/#/schema/list?tags=数据治理&embed=true&token=' where cn_name = '数据治理';
update lf.sys_menu set url = 'http://pipe.cppe.com:88/dataxdi/#/task/list?embed=true&token=' where cn_name = '任务状态' and id = 74;

update lf.sys_menu set url = 'http://pipe.cppe.com:88/resm/#/resourceManage?embed=true&token=' where cn_name = '我的资源';
update lf.sys_menu set url = 'http://pipe.cppe.com:88/resm/#/resapproval?embed=true&token=' where cn_name = '资源审核';
------------------------------------------------------ FME_数据质检
select * from lf.sys_menu where cn_name = '入库质检';
update lf.sys_menu set url = 'http://10.7.0.186:88/dataxdi/#/schema/list?tags=入库质检&embed=true&token=' where cn_name = '入库质检';

select * from lf.sys_menu where cn_name = '成果质检';
update lf.sys_menu set url = 'http://10.7.0.186:88/dataxdi/#/schema/list?tags=成果质检&embed=true&token=' where cn_name = '成果质检';

select * from lf.sys_menu where cn_name = '任务状态' and id = 69;
update lf.sys_menu set url = 'http://10.7.0.186:88/dataxdi/#/task/list?embed=true&token=' where cn_name = '任务状态' and id = 69;
------------------------------------------------------ FME_数据交换
select * from lf.sys_menu where cn_name = '格式转换';
update lf.sys_menu set url = 'http://10.7.0.186:88/dataxdi/#/schema/list?tags=数据交换&embed=true&token=' where cn_name = '格式转换';

select * from lf.sys_menu where cn_name = '坐标转换';
update lf.sys_menu set url = 'http://10.7.0.186:88/dataxdi/#/schema/list?tags=坐标转换&embed=true&token=' where cn_name = '坐标转换';

select * from lf.sys_menu where cn_name = '数据分发';
update lf.sys_menu set url = 'http://10.7.0.186:88/dataxdi/#/schema/list?tags=数据分发&embed=true&token=' where cn_name = '数据分发';

select * from lf.sys_menu where cn_name = '数据治理';
update lf.sys_menu set url = 'http://10.7.0.186:88/dataxdi/#/schema/list?tags=数据治理&embed=true&token=' where cn_name = '数据治理';

select * from lf.sys_menu where cn_name = '任务状态' and id = 74;
update lf.sys_menu set url = 'http://10.7.0.186:88/dataxdi/#/task/list?embed=true&token=' where cn_name = '任务状态' and id = 74;
------------------------------------------------------ FME_服务管理
select * from lf.sys_menu where cn_name = '我的资源';
update lf.sys_menu set url = 'http://10.7.0.186:88/resm/#/resourceManage?embed=true&token=' where cn_name = '我的资源';

select * from lf.sys_menu where cn_name = '资源审核';
update lf.sys_menu set url = 'http://10.7.0.186:88/resm/#/resapproval?embed=true&token=' where cn_name = '资源审核';
------------------------------------------------------ 
insert into lf.sys_meta_new (name,dirid) values ('项目WBS导出.xlsx',57);
insert into lf.sys_meta_new (name,dirid) values ('00116BT02-CR001#ESV-DW-0101 封面.docx',62);
insert into lf.sys_meta_new (name,dirid) values ('00116BT02-CR001#ESV-DW-0101（大河沿河穿越地形图）0.dwg',62);
insert into lf.sys_meta_new (name,dirid) values ('00116BT02-CR001#ESV-DW-0101（大河沿河穿越地形图）0.dwl',62);
insert into lf.sys_meta_new (name,dirid) values ('00116BT02-CR001#ESV-DW-0101（大河沿河穿越地形图）0.dwl2',62);
insert into lf.sys_meta_new (name,dirid) values ('00116BT02-CR001#ESV-DW-0101（大河沿河穿越纵断面图）0.dwg',62);
insert into lf.sys_meta_new (name,dirid) values ('00116BT02-CR001#ESV-IN-0101（资料图纸目录）.doc',62);
insert into lf.sys_meta_new (name,dirid) values ('1类.gdb.zip',74);
insert into lf.sys_meta_new (name,dirid) values ('2类.gdb.zip',74);
insert into lf.sys_meta_new (name,dirid) values ('易燃易爆.gdb.zip',74);
insert into lf.sys_meta_new (name,dirid) values ('地面线.xlsx',64);
insert into lf.sys_meta_new (name,dirid) values ('控制点.xlsx',64);
insert into lf.sys_meta_new (name,dirid) values ('离散点.xlsx',64);
insert into lf.sys_meta_new (name,dirid) values ('平面图索引文件.xlsx',64);
insert into lf.sys_meta_new (name,dirid) values ('中线成果表.xlsx',64);

update lf.sys_meta_new set depid=1,type='file',path='2\'||name,sizes=1;

insert into lf.sys_meta_new (name,dirid) values ('S318 洛陕线穿越工程地质剖面图.dwg',80);
insert into lf.sys_meta_new (name,dirid) values ('地质剖面图索引表.xlsx',80);
insert into lf.sys_meta_new (name,dirid) values ('地质资料表.xlsx',80);
insert into lf.sys_meta_new (name,dirid) values ('勘探点坐标表.xlsx',80);
insert into lf.sys_meta_new (name,dirid) values ('土壤电阻率表.xlsx',80);

update lf.sys_meta_new set depid=1,type='file',path='2\'||name,sizes=1 where path is null;

with rs as (select id from lf.sys_dir where name='西气东输四线天然气管道工程（吐鲁番-中卫）（00116BT02）')
select fn_rec_query(a.dirid,'dir'),a.* from lf.sys_meta_new a where dirid = ANY(fn_rec_array((select id from rs), 'dir'));

select * from lf.sys_meta_new where substr(path,1,2) = '2\';
------------------------------------------------------ 
select * from lf.sys_menu order by id;
select gid from md.md_u_special_evaluation_report;
select dd from md.md_s_hole_column_diagram;

select * from lf.sys_meta;
select * from lf.sys_meta_file;

select * from lf.sys_dir order by id;
select * from lf.sys_dep order by id;
select * from lf.sys_ver;

select fn_rec_query(9, 'dir'); -- dir,dep
select fn_rec_array(8, 'dir'); -- dir,dep
select fn_rec_array(10, 'dep');

select * from lf.sys_meta a inner join lf.sys_meta_file b on a.id = b.metaid
where dirid = ANY(fn_rec_array(1, 'dir'));

select * from lf.sys_meta a inner join lf.sys_meta_file b on a.id = b.metaid
where depid = ANY(fn_rec_array(10, 'dep'));

select * from lf.sys_dir order by id;
select zoning from lf.sys_coord group by zoning;
select id, name from lf.sys_dir where pid = 0 and id > 1;

select * from lf.sys_coord where epsgcode = 'EPSG:4490';
select * from lf.sys_operate;

with recursive rs as(
	select a.*, fullName from lf.sys_dir a where name=#{name}
union
	select a.* from lf.sys_dir a, rs b where a.pid=b.id
)
select * from rs order by order_num;
















