管道基础大数据平台系统开发-【后端】-Server
13693261870
2023-06-10 e1d4efc4dba2849965bac02939592fe10d60d2c8
解决dlg_resnt2000入库失败
已修改3个文件
11 ■■■■■ 文件已修改
data/db_cx.sql 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/entity/all/StaticData.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/service/data/UploadService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
data/db_cx.sql
@@ -50,8 +50,10 @@
select * from bs.s_explorationpoint where createtime < '2023-05-26 10:00:00';
select * from bs.s_surveyworksite where createtime < '2023-05-26 10:00:00';
select * from lf.sys_meta where type='cpt';
select id,name,code from lf.sys_dir where pid=0 order by code
select * from bs.dlg_resnt2000;
alter table bs.dlg_resnt2000 alter column floors type varchar(20);
src/main/java/com/lf/server/entity/all/StaticData.java
@@ -44,6 +44,8 @@
    public static final int I31 = 31;
    public static final int I50 = 50;
    public static final int I60 = 60;
    public static final int I90 = 90;
src/main/java/com/lf/server/service/data/UploadService.java
@@ -250,9 +250,8 @@
     */
    private <T>  int batchInserts(BasicMapper basicMapper, List<T> list) {
        int rows = 0;
        int count = (int) Math.ceil(list.size() / StaticData.D100);
        List<List<T>> subLists = Lists.partition(list, count);
        //int count = (int) Math.ceil(list.size() / StaticData.D100)
        List<List<T>> subLists = Lists.partition(list, StaticData.I50);
        for (List<T> sub : subLists) {
            try {
                rows += basicMapper.insertBatch(sub);