| | |
| | | order by name; |
| | | |
| | | select modular1, count(*) from lf.sys_operate group by modular1; |
| | | select modular1,modular2,count(*) from lf.sys_operate group by modular1,modular2 order by modular1; |
| | | select modular1,modular2 from lf.sys_operate where modular1 not in ('综合展示','数据质检','数据管理','数据交换','服务管理','系统对接','运维管理'); |
| | | delete from lf.sys_operate where modular1 not in ('综合展示','数据质检','数据管理','数据交换','服务管理','系统对接','运维管理'); |
| | | |
| | | select id,cn_name,elev from lf.sys_layer where cn_name in ('火车站','地下管线','中卫站','庆阳站','地层示例'); |
| | | |
| | | |
| | |
| | | tabletype varchar(20), |
| | | unit varchar(50), |
| | | domain_na varchar(100), |
| | | showtype smallint, |
| | | showtype smallint default 0, |
| | | editable smallint, |
| | | status smallint default 0, |
| | | bak varchar(1024) |
| | |
| | | comment on column lf.sys_dict.editable is '是否可编辑'; |
| | | comment on column lf.sys_dict.status is '状态:0-正常,1-删除,-1-废弃'; |
| | | comment on column lf.sys_dict.bak is '备注'; |
| | | -- alter table lf.sys_dict alter column showtype set default 0; |
| | | -- alter sequence lf.sys_dict_id_seq restart with 300; |
| | | |
| | | select count(*) from lf.sys_dict where status=0 and tab='sys_user'; |
| | |
| | | order by c.id limit 1; |
| | | |
| | | select * from lf.sys_role; |
| | | --------------------------------------------------------- 09 lf.sys_dict 1810行 |
| | | select * from lf.sys_dict where field in ('geom', 'gid', 'eventid', 'parentid'); |
| | | |
| | | update lf.sys_dict set showtype = 0 where field in ('geom', 'gid', 'eventid', 'parentid'); |
| | | --------------------------------------------------------- 09 测试SQL |
| | | with rs as (select code from lf.sys_dir where name='西气东输四线天然气管道工程(吐鲁番-中卫)(00116DT02)') |
| | | select fn_rec_query(a.dirid,'dir'),a.* from lf.sys_meta a where dirid = ANY(fn_rec_array((select id from rs), 'dir')); |
| | |
| | | from bs.m_pipeline a |
| | | group by medium; |
| | | -- select * from lf.sys_domain where dom_name='dsg0016'; |
| | | |
| | | -- 所有项目的下载个数、下载次数和数据总量 |
| | | with rs as ( |
| | | select a.dircode, c.dcount, c.sizes |
| | | from lf.sys_meta a |
| | | inner join lf.sys_meta_down b on a.id = b.metaid |
| | | inner join lf.sys_download c on b.downid = c.id |
| | | ) |
| | | select |
| | | d.name "项目名称", |
| | | (select count(*) from rs where rs.dircode like d.code || '%') "下载个数", |
| | | (select coalesce(sum(rs.dcount), 0) from rs where rs.dircode like d.code || '%') "下载数量", |
| | | (select round(coalesce(sum(rs.dcount * rs.sizes), 0)::numeric, 3) from rs where rs.dircode like d.code || '%') "数量总量(MB)" |
| | | from lf.sys_dir d |
| | | where pid = 0 |
| | | order by d.code; |
| | | --------------------------------------------------------- |
| | | select (select string_agg(code, ',') from lf.sys_dir where name = a.name) "key", name "value" |
| | | from lf.sys_dir a |
| | |
| | | select * from lf.sys_user order by id desc |
| | | select * from lf.sys_dep where id=36 |
| | | |
| | | |
| | | select * from lf.sys_dict where tab='bs_project' |
| | | select * from bs.bs_project |
| | | |
| | | |
| | | |
| | |
| | | @GetMapping(value = "/selectFiles") |
| | | public ResponseMsg<List<MetaFileEntity>> selectFiles(String path) { |
| | | try { |
| | | List<MetaFileEntity> list = uploadService.selectFiles(path, StaticData.ALL_EXTENSION); |
| | | List<MetaFileEntity> list = uploadService.selectFiles(path); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | |
| | | public final static List<String> SHP_EXT = new ArrayList<>(Arrays.asList(".shx", ".dbf", ".prj", ".cpg")); |
| | | |
| | | /** |
| | | * Mapper排除扩展名 |
| | | */ |
| | | public final static List<String> MAPPER_EXCLUDE_EXT = new ArrayList<>(Arrays.asList(".img.aux.xml", ".img.xml", ".tif.aux.xml", ".tif.xml", ".tiff.aux.xml", ".tiff.xml", ".shp.xml")); |
| | | |
| | | /** |
| | | * 所有文件扩展名 |
| | | */ |
| | | public final static List<String> ALL_EXTENSION = new ArrayList<>(Arrays.asList(".txt", ".xml", ".pdf", ".xls", ".xlsx", ".doc", ".docx", ".ppt", ".pptx", ".shp", ".gdb", ".mdb", ".dwg", ".las", ".laz", ".cpt", ".mpt", ".fly", ".efb", ".g3d", ".fbx", ".obj", ".3dm", ".3dml", ".osgb", ".rvt", ".ifc", ".jpg", ".png", ".img", ".tif", ".tiff", ".bmp", ".gif", ".rmvb", ".rm", ".mp3", ".mp4", ".avi", ".wma", ".wmv", ".7z", ".rar", ".zip")); |
| | |
| | | /** |
| | | * 查询文件 |
| | | */ |
| | | public List<MetaFileEntity> selectFiles(String subPath, List<String> extList) { |
| | | public List<MetaFileEntity> selectFiles(String subPath) { |
| | | String root = pathHelper.getConfig().getTempPath() + File.separator + subPath; |
| | | |
| | | File file = new File(root); |
| | |
| | | for (File f : files) { |
| | | String fileName = FileHelper.getFileName(f.getPath()); |
| | | String extName = FileHelper.getExtension(fileName); |
| | | if (null != extList && !extList.contains(extName)) { |
| | | if (!isExtValid(extName)) { |
| | | continue; |
| | | } |
| | | |
| | |
| | | * 查询映射 |
| | | */ |
| | | public List<MetaFileEntity> selectMappers(UserEntity ue, String path, DirEntity dir, VerEntity ver, String epsgCode) { |
| | | List<MetaFileEntity> metas = selectFiles(path, StaticData.ALL_EXTENSION); |
| | | List<MetaFileEntity> metas = selectFiles(path); |
| | | if (null == metas || metas.isEmpty()) { |
| | | return null; |
| | | } |
| | |
| | | File file = new File(path); |
| | | if (!file.isDirectory()) { |
| | | String extName = FileHelper.getExtension(file); |
| | | if (StaticData.ALL_EXTENSION.contains(extName)) { |
| | | if (isExtValid(extName)) { |
| | | list.add(file); |
| | | } |
| | | return; |
| | |
| | | getFilesByPath(list, f.getPath()); |
| | | } else { |
| | | String extName = FileHelper.getExtension(f); |
| | | if (StaticData.ALL_EXTENSION.contains(extName)) { |
| | | if (isExtValid(extName)) { |
| | | list.add(f); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 扩展是否有效 |
| | | */ |
| | | private boolean isExtValid(String extName) { |
| | | return StaticData.ALL_EXTENSION.contains(extName) && !StaticData.MAPPER_EXCLUDE_EXT.contains(extName); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | String fileName = FileHelper.getFileName(f.getPath()); |
| | | String extName = FileHelper.getExtension(fileName); |
| | | if (!StaticData.ALL_EXTENSION.contains(extName) || fileName.startsWith("~")) { |
| | | if (!isExtValid(extName) || fileName.startsWith("~")) { |
| | | continue; |
| | | } |
| | | |