管道基础大数据平台系统开发-【后端】-Server
13693261870
2023-06-12 4ca77edbe07508f1bd4a878c7c00d7b7fbf0abb5
数据上传添加矢量数据入库的错误记录数
已修改6个文件
45 ■■■■■ 文件已修改
data/db_cx.sql 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
data/update.sql 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/entity/ctrl/PubEntity.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/entity/data/MetaFileEntity.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/service/data/UploadService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
data/db_cx.sql
@@ -54,6 +54,10 @@
select * from bs.dlg_resnt2000;
alter table bs.dlg_resnt2000 alter column floors type varchar(20);
select * from lf.sys_layer l where cn_name='倾斜摄影数据';
data/update.sql
@@ -220,12 +220,12 @@
-- 项目表
select a.*,st_astext(geom) from bs.bs_project a;
-- 按项目统计数据
-- 按项目统计数据 *
select name "名称", (select count(*) from lf.sys_meta b where b.dircode like a.code || '%') "文件数",
    (select sum(sizes) from lf.sys_meta b where b.dircode like a.code || '%') "数量(MB)"
from lf.sys_dir a where id > 1 and pid = 0;
select name "m1", (select sum(sizes) from lf.sys_meta b where b.dircode like a.code || '%') "sizes",
select name "m1", coalesce((select sum(sizes) from lf.sys_meta b where b.dircode like a.code || '%'), 0) "sizes",
    (select count(*) from lf.sys_meta b where b.dircode like a.code || '%') "count"    
from lf.sys_dir a where pid = 0 order by a.code;
src/main/java/com/lf/server/entity/ctrl/PubEntity.java
@@ -30,9 +30,9 @@
    private String depcode;
    private Integer isModel;
    private List<String> ids;
    private List<Integer> models;
    public String getType() {
        return type;
@@ -106,14 +106,6 @@
        this.depcode = depcode;
    }
    public Integer getIsModel() {
        return isModel;
    }
    public void setIsModel(Integer isModel) {
        this.isModel = isModel;
    }
    public List<String> getIds() {
        return ids;
    }
@@ -121,4 +113,12 @@
    public void setIds(List<String> ids) {
        this.ids = ids;
    }
    public List<Integer> getModels() {
        return models;
    }
    public void setModels(List<Integer> models) {
        this.models = models;
    }
}
src/main/java/com/lf/server/entity/data/MetaFileEntity.java
@@ -42,6 +42,8 @@
    private int rows;
    private int records;
    private String msg;
    private Boolean isMeta;
@@ -176,6 +178,14 @@
        this.rows = rows;
    }
    public int getRecords() {
        return records;
    }
    public void setRecords(int records) {
        this.records = records;
    }
    public String getMsg() {
        return msg;
    }
src/main/java/com/lf/server/service/data/UploadService.java
@@ -235,6 +235,7 @@
        if (null == list || list.isEmpty()) {
            return;
        }
        mf.setRecords(list.size());
        setCreateInfo(list, mf);
        int rows = batchInserts(basicMapper, list);
@@ -490,8 +491,8 @@
            MetaEntity me = createMeta(mf, metaId);
            metaService.insert(me);
            mf.setMsg(me.getId() > 0 ? "成功" : "失败");
            String err = mf.getRows() < mf.getRecords() ? "(" + (mf.getRecords() - mf.getRows()) + " 条失败)" : "";
            mf.setMsg(me.getId() > 0 ? String.format("成功%s", err) : "失败");
        }
    }
src/main/resources/application.yml
@@ -70,7 +70,7 @@
      ## 配置获取连接等待超时的时间
      max-wait: 6000
      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
      time-between-eviction-runs-millis: 60000
      time-between-eviction-runs-millis: 90000
      # 配置一个连接在池中最小生存的时间,单位是毫秒
      min-evictable-idle-time-millis: 300000
      max-pool-prepared-statement-per-connection-size: 50