管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-01-30 8cdd6aa032dd72c5101099b7e8f156394e90b83c
src/main/java/com/lf/server/service/data/UploadService.java
@@ -125,7 +125,15 @@
            return;
        }
        List<?> list = null;
        MetaEntity old = metaService.selectByGuid(mf.getGuid(), tabName);
        if (old != null) {
            mf.setEntity(old.getLayer());
            mf.setTab(old.getTab());
            mf.setRows(old.getRows());
            return;
        }
        List<?> list;
        if (StaticData.SHP.equals(mf.getExtName())) {
            list = ShpHelper.readData(clazz, mf.getPath());
        } else {
@@ -195,8 +203,8 @@
                        String path = findPathByGuid(list, mf);
                        if (null != path) {
                            mf.setPath(path);
                            continue;
                        }
                        continue;
                    }
                    gdbList.add(mf.getPath());
@@ -219,7 +227,7 @@
            return -1;
        }
        MetaEntity old = metaService.selectByGuid(mf.getGuid());
        MetaEntity old = metaService.selectByGuid(mf.getGuid(), null);
        if (null != old) {
            mf.setPath(old.getPath());
            mf.setTab(old.getTab());
@@ -292,12 +300,9 @@
            return;
        }
        MetaEntity old = metaService.selectByGuid(mf.getGuid());
        MetaEntity old = metaService.selectByGuid(mf.getGuid(), null);
        if (null != old) {
            mf.setPath(old.getPath());
            mf.setTab(old.getTab());
            mf.setEntity(old.getLayer());
            mf.setRows(old.getRows());
            FileHelper.deleteFiles(file);
            return;
        }
@@ -413,13 +418,9 @@
        for (MetaFileEntity mf : list) {
            boolean isXls = StaticData.XLS.equals(mf.getExtName()) || StaticData.XLSX.equals(mf.getExtName());
            if (mf.getRows() > -1 && isXls) {
                MetaEntity old = metaService.selectByGuid(mf.getGuid());
                MetaEntity old = metaService.selectByGuid(mf.getGuid(), null);
                if (null == old) {
                    xlsList.add(mf);
                } else {
                    mf.setTab(old.getTab());
                    mf.setEntity(old.getLayer());
                    mf.setRows(old.getRows());
                }
            }
        }