管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-04-07 18ef42f5a89babf01bdce096d05fbb6471763f68
data/db_cx.sql
@@ -7,23 +7,47 @@
select concat(gb, '_', name) from bd.dlg_agnp limit 10;
select ST_AsText(geom) "geom", a.*, fn_get_fullname(a.depid, 1) depName, fn_get_fullname(a.dirid, 2) dirName, fn_uname(create_user) createName, fn_uname(update_user) updateName from lf.sys_publish a
select * from lf.sys_fme_log order by id desc limit 10; -- 255 >
select * from lf.sys_meta order by id desc limit 10; -- 1723 >
-- 删除冗余数据,修复tab_guid值
select id,name,path,tab,tab_guid from lf.sys_attach where tab != 'bd.b_borehole' order by id desc limit 200;
select * from lf.sys_meta where name='勘探点地层表.xlsx' or type='fbx';
--delete from bs.s_explorationpointstratum where parentid in (select eventid from lf.sys_meta where name='勘探点地层表.xlsx');
--delete from lf.sys_meta where name='勘探点地层表.xlsx';
select * from lf.sys_meta where type = 'tif' or type = 'tiff' or lower(name) in ('平面图索引文件.xlsx', '穿跨越地形图.dwg', '中线成果表.xlsx', '离散点.xlsx', '控制点.xlsx', '地面线.xlsx');
select * from lf.sys_user where uid = 'admin'
select * from lf.sys_dep order by id
select * from lf.sys_dir where pid=0
select * from lf.sys_apply order by id desc
select * from lf.sys_flow order by id desc;
-- delete from lf.sys_apply where id > 47; delete from lf.sys_flow where applyid > 47;
select * from lf.sys_download order by id desc
select st_astext(geom) from bs.s_explorationpoint where exppointid in ('XTCK16')
select * from lf.sys_publish order by id desc;
select * from lf.sys_download order by id desc limit 20; --downid
select * from lf.sys_apply order by id desc;
select * from lf.sys_fme_log
where count > 0 and update_time is null and create_time > now()::timestamp + '-1 min'
select * from bs.s_explorationpoint where parentid='df3ee967-3eb8-4685-b49c-d0ae06918069'
select * from lf.sys_dir where pid=0 order by id
select case a.userid when 2 then guid else null end "guid", a.* from lf.sys_apply a order by id desc
select * from bs.s_explorationpoint
select * from lf.sys_attach order by id desc limit 100; -- 358042
select c.relname "tab", cast(obj_description(c.oid) as varchar) "desc", a.attnum "num",
a.attname "col", t.typname "type", d.description "bak" from pg_attribute a left join pg_description d
on d.objoid = a.attrelid and d.objsubid = a.attnum left join pg_class c on a.attrelid = c.oid left join pg_type t
on a.atttypid = t.oid where a.attnum >= 0 and reltype>0 and relnamespace in (5424908) and c.relname='pl_pipelinepoint_f' and position('pg.dropped' in a.attname) = 0
order by c.relname desc, a.attnum asc
insert into lf.sys_attach (name, guid, path, sizes, create_user, tab, tab_guid)
select name, guid, path, sizes, create_user, 'bs.s_explorationpoint', '8de99768-1da3-4784-9423-bb026411fa48'
from lf.sys_meta
where name = 'PH02T01-CR004-C04#EGE-DW-0105.pdf' and create_time > now()::timestamp + '-10 min'
order by id desc
limit 1;
select * from bs.s_explorationpointstratum where exppointid in ('HJXK20')