sgj
2026-03-20 58f63e3a124680d0b1f571f5d0a1e3ed308d43be
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/FileService.java
@@ -75,10 +75,13 @@
            }
            data.setId(ContextUtil.generateId());
            data.setCreateTime(new Date());
            data.setCreateBy(ContextUtil.getLoginUserName());
            data.setCompanyId(ContextUtil.getCompanyId());
            //文件全路径
            String filePath = getFileSavePath(pathTag) + data.getFileName();
            filePath = filePath.replace(FrameworkConfig.getProfile(), "/profile/");
            data.setFilePath(filePath);
@@ -155,6 +158,7 @@
        if("TEMPLATE".equals(pathTag)) return getTemplateFilePath();
        if("QUANTITY".equals(pathTag)) return getQuantityPath();
        if("WORD".equals(pathTag)) return getWordPath();
        if("WEIGHTNAP".equals(pathTag)) return getWeightSnapPath();
        return getCommonFilePath();
    }
@@ -176,6 +180,19 @@
     * 获取事件文件路径
     * @return
     */
    public String getWeightSnapPath() {
        String basePath = FrameworkConfig.getProfile() + "WEIGHTNAP/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/";
        File file = new File(basePath);
        if (!file.exists()) {
            file.mkdirs();
        }
        return basePath;
    }
    /**
     * 获取事件文件路径
     * @return
     */
    public String getEventFilePath() {
        String basePath = FrameworkConfig.getProfile() + "EVENT/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/";
        File file = new File(basePath);