sgj
5 天以前 f71f31780ed55200f3e370e61c81cfd05feb34bd
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/FileService.java
@@ -75,6 +75,8 @@
            }
            data.setId(ContextUtil.generateId());
            data.setCreateTime(new Date());
            data.setCreateBy(ContextUtil.getLoginUserName());
            data.setCompanyId(ContextUtil.getCompanyId());
            //文件全路径
@@ -156,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();
    }
@@ -177,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);