管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2024-11-22 d23b2ce1ae45c192aed067041da8de748b97d405
src/main/java/com/lf/server/service/data/DataQueryService.java
@@ -52,8 +52,15 @@
            AttachEntity ae = getAttachEntity(ue, tabName, eventid, fileName, md5, sizes);
            if (entity != null) {
                ae.setPath(entity.getPath());
                newFile.delete();
            }else {
                String oldPath = pathHelper.getConfig().getUploadPath() + File.separator + ae.getPath();
                File f = new File(oldPath);
                if (!f.exists() || f.isDirectory()) {
                    newFile.renameTo(new File(oldPath));
                } else {
                    newFile.delete();
                }
            } else {
                String targetPath = pathHelper.getConfig().getUploadPath() + File.separator + ae.getPath();
                newFile.renameTo(new File(targetPath));
            }
@@ -73,7 +80,7 @@
        entity.setTabGuid(eventid);
        entity.setName(fileName);
        entity.setGuid(md5);
        String subPath = PathHelper.getUploadPath() + File.separator + md5+ FileHelper.getExtension(fileName);
        String subPath = PathHelper.getUploadPath() + File.separator + md5 + FileHelper.getExtension(fileName);
        entity.setPath(subPath);
        entity.setSizes(sizes);
        if (ue != null) {