管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-04-10 1e0b068d1f60747751cd839f814ef09ee15dcaaf
1
已修改4个文件
52 ■■■■■ 文件已修改
data/db_cx.sql 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/config/ScheduleConfig.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/entity/ctrl/RegisterEntity.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/sys/OperateMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
data/db_cx.sql
@@ -1,37 +1,23 @@
st_length( st_geographyfromtext( st_astext( st_intersection( ST_MakeValid(a.geom), ST_MakeValid(b.geom) ) ) ) ) AS acrossLength;
---------------------------------------------------------------------------------------------- -1.SQL测试
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 where upper(exppointid) like '%XK0%';
select * from lf.sys_layer where url is not null and serve_type='WMS' and data_type in ('工程项目','工程项目-地灾类','工程项目-测量类','工程项目-洞库类','工程项目-勘察类') order by id;
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);
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
-- 删除冗余数据,修复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_flow order by id desc;
select case a.userid when 2 then guid else null end "guid", a.* from lf.sys_apply a order by id desc
select modular2,count(*) from lf.sys_operate group by modular2
@@ -85,6 +71,9 @@
select count(*) from public.coal54; -- 12701714
select a.*, ST_AsText(geom) from public.coal54 a order by gid desc limit 100;
---------------------------------------------------------------------------------------------- SY2.煤层2000表
-- create sequence public.coal2000_gid_seq increment  by 1 minvalue 1 maxvalue 2147483647 start 1 cache 1;
-- alter sequence public.coal2000_gid_seq restart with 12701715; vacuum analyze public.coal2000;
-- drop table public.coal2000;
create table if not exists public.coal2000 (
    gid serial primary key,
@@ -97,10 +86,14 @@
    density numeric(12,3),
    gangue numeric(12,5),
    volume numeric(12,3),
    coal_prod numeric(15, 3),
    gangue_prod numeric(15, 5),
    soil_prod numeric(15, 5),
    geom geometry(point, 4490)
);
-- drop index if exists public.idx_coal2000_geom;
create index idx_coal2000_geom on public.coal2000 using gist (geom);
comment on table public.coal2000 is '煤层54表';
comment on table public.coal2000 is '煤层2000表';
comment on column public.coal2000.gid is '主键ID';
comment on column public.coal2000.top is '上顶高度';
comment on column public.coal2000.bottom is '下底高度';
@@ -111,9 +104,19 @@
comment on column public.coal2000.density is '视密度';
comment on column public.coal2000.gangue is '含矸率';
comment on column public.coal2000.volume is '体积';
comment on column public.coal2000.coal_prod is '煤量';
comment on column public.coal2000.gangue_prod is '矸石量';
comment on column public.coal2000.soil_prod is '土量';
comment on column public.coal2000.geom is '空间';
-- drop index if exists public.idx_coal2000_ctype;
create index idx_coal2000_ctype on public.coal2000 (ctype);
--煤量 = 体积 * 视密度,矸石量 = 体积 * 含矸率,土量 = 总体积 - 煤量- 矸石量
select count(*) from public.coal2000; -- 12701714
select * from public.coal2000 order by gid desc limit 100;
select ctype, sum(volume) "volume", sum(coal_prod) "coal_prod", sum(gangue_prod) "gangue_prod", 0 "soil_prod" from public.coal2000
where (top between 640 and 690 or bottom between 640 and 690) and ST_Intersects(geom, ST_PolygonFromText('POLYGON ((113.5807 45.4897,113.5898 45.4893,113.5857 45.4837,113.5807 45.4897))', 4490)) group by ctype order by ctype;
-- select ST_GeometryFromText('POLYGON ((113.5807 45.4897,113.5898 45.4893,113.5857 45.4837,113.5807 45.4897))', 4490)
---------------------------------------------------------------------------------------------- -1.更新钻孔
select count(*) from bd.b_borehole; -- 357824
select count(*) from lf.sys_attach; -- 357880 = 56 + 357824
src/main/java/com/lf/server/config/ScheduleConfig.java
@@ -84,7 +84,6 @@
            jsonObject.put("operateCount", scheduleService.operateCount());
            // 资源调用状态
            String json = JSONObject.toJSONStringWithDateFormat(jsonObject, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteMapNullValue);
            WebSocketService.broadCastInfo(json);
src/main/java/com/lf/server/entity/ctrl/RegisterEntity.java
@@ -24,6 +24,7 @@
        this.description = name;
        this.isrequest = true;
        this.hashid = StringHelper.getGuid();
        this.ispublic = true;
    }
    public RegisterEntity(Integer pubid) {
@@ -50,6 +51,8 @@
    private String reason;
    private String serialnum;
    private Boolean ispublic;
    public List<String> getTags() {
        return tags;
@@ -130,4 +133,12 @@
    public void setSerialnum(String serialnum) {
        this.serialnum = serialnum;
    }
    public Boolean getIspublic() {
        return ispublic;
    }
    public void setIspublic(Boolean ispublic) {
        this.ispublic = ispublic;
    }
}
src/main/resources/mapper/sys/OperateMapper.xml
@@ -41,7 +41,6 @@
        limit #{limit} offset #{offset}
    </select>
    <select id="selectOperateAll" resultType="com.lf.server.entity.sys.OperateEntity">
        select * from lf.sys_operate order by id desc
    </select>