| | |
| | | st_length( st_geographyfromtext( st_astext( st_intersection( ST_MakeValid(a.geom), ST_MakeValid(b.geom) ) ) ) ) AS acrossLength; |
| | | ---------------------------------------------------------------------------------------------- -1.SQL测试 |
| | | select * from bs.s_explorationpoint where upper(exppointid) like '%XK0%'; |
| | | select * from bs.s_survey_information; --勘察信息表,汉江穿越 |
| | | alter table bs.s_survey_information add column workname varchar(50); |
| | | update bs.s_survey_information set workname='汉江穿越' where gid=1; |
| | | select * from bs.s_surveyworksite; --勘察工点 |
| | | |
| | | select * from lf.sys_download order by id desc; |
| | | select * from lf.sys_layer where url is not null and serve_type='WMS' and data_type in ('工程项目','工程项目-地灾类','工程项目-测量类','工程项目-洞库类','工程项目-勘察类') order by id; |
| | | select * from lf.sys_layer order by id desc limit 20; |
| | | insert into lf.sys_layer (pid,cn_name,en_name,url,type,level,order_num,is_show,create_user,serve_type,data_type,elev) values |
| | | (423, '地面层', 'fushun_site', 'tileset/o/39HBFG/tileset.json', 2, 3, 5, 0, 1, 'Tileset', '工程测量模型', 1200); |
| | | update lf.sys_layer set elev=118,cn_name='地面层' where id=427; |
| | | |
| | | select concat(gb, '_', name) from bd.dlg_agnp limit 10; |
| | | select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName from lf.sys_dict a limit 10 |
| | | select * from lf.sys_download where position('管道基础大数据平台' in descr)>0 order by id desc; |
| | | 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_meta_pub; -- delete from lf.sys_meta_pub where id = 3; |
| | | select ST_AsText(geom),a.* from lf.sys_publish a; -- delete from lf.sys_publish where id = 1; |
| | | select count(gid) from bd.b_rg20w_anna where 1=1; |
| | | -- 删除冗余数据,修复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 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 |
| | | where id = 7 |
| | | select case a.userid when 2 then guid else null end "guid", a.* from lf.sys_apply a order by id desc |
| | | |
| | | insert into lf.sys_meta_pub (id,metaid,pubid) values (1,1,1); |
| | | insert into lf.sys_publish (id,name,type,dirid,depid) values (1,'Test','3dml','0102','000305'); |
| | | select a.* from lf.sys_publish a |
| | | select * from lf.sys_meta order by id desc limit 20; |
| | | 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 |
| | | |
| | | select * from bs.s_explorationpointstratum where exppointid in ('HJXK20') |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ---------------------------------------------------------------------------------------------- -1.更新钻孔 |
| | | select count(*) from bd.b_borehole; -- 357824 |
| | | select count(*) from lf.sys_attach; -- 357880 = 56 + 357824 |
| | | select * from bd.b_borehole limit 10; -- 基础钻孔 |
| | | |
| | | -- update bd.b_borehole set path = 'Drill\' || path; |
| | | -- insert into lf.sys_attach (name, guid, path, tab, tab_guid) |
| | | select substr(path, length(path) - position('\' in reverse(path)) + 2), eventid, path, 'bd.b_borehole', eventid from bd.b_borehole; |
| | | ---------------------------------------------------------------------------------------------- 00.SQL查询 |
| | | insert into lf.sys_meta_pub (metaid, pubid) select 1, 1 from (select 1) temp where not exists (select 1 from lf.sys_meta_pub where metaid = 1 and pubid = 1); |
| | | |