From a84fe656f069a0d211253b8892bdcee5c7e3df83 Mon Sep 17 00:00:00 2001 From: wangpeng Date: Tue, 25 Jun 2024 17:36:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E7=AB=AFapp=E5=8F=91?= =?UTF-8?q?=E7=89=88=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bus/VersionManagerController.java | 20 ++++++++----------- src/main/java/com/zcloud/util/Const.java | 3 ++- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/zcloud/controller/bus/VersionManagerController.java b/src/main/java/com/zcloud/controller/bus/VersionManagerController.java index b6651c5..6e1230a 100644 --- a/src/main/java/com/zcloud/controller/bus/VersionManagerController.java +++ b/src/main/java/com/zcloud/controller/bus/VersionManagerController.java @@ -58,13 +58,11 @@ public class VersionManagerController extends BaseController { Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); - String ffile = DateUtil.getDays(), fileName = ""; + String ffile = "/pre", fileName = ""; if (null != file && !file.isEmpty()) { - //String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径 - //fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传 - fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName,Const.FILEPATHFILE + ffile); - pd.put("FILEURL", Const.FILEPATHFILE + ffile + "/" + fileName); //文件路径 + fileName = "pre_" + VERSION + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + Smb.sshSftp(file, fileName,Const.FILEPATHAPP + ffile); + pd.put("FILEURL", Const.FILEPATHAPP + ffile + "/" + fileName); //文件路径 pd.put("VERSION", VERSION); pd.put("FILETYPE", FILETYPE); pd.put("ISEFFECTIVE", ISEFFECTIVE); @@ -113,13 +111,11 @@ public class VersionManagerController extends BaseController { Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); - String ffile = DateUtil.getDays(), fileName = ""; + String ffile = "/pre", fileName = ""; if (null != file && !file.isEmpty()) { -// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径 -// fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传 - fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName,Const.FILEPATHFILE + ffile); - pd.put("FILEURL", Const.FILEPATHFILE + ffile + "/" + fileName); //文件路径 + fileName = "pre_" + VERSION + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + Smb.sshSftp(file, fileName,Const.FILEPATHAPP + ffile); + pd.put("FILEURL", Const.FILEPATHAPP + ffile + "/" + fileName); //文件路径 pd.put("VERSION", VERSION); pd.put("FILETYPE", FILETYPE); pd.put("ISEFFECTIVE", ISEFFECTIVE); diff --git a/src/main/java/com/zcloud/util/Const.java b/src/main/java/com/zcloud/util/Const.java index c3aa289..66274c3 100644 --- a/src/main/java/com/zcloud/util/Const.java +++ b/src/main/java/com/zcloud/util/Const.java @@ -29,6 +29,7 @@ public class Const { public static final String SHOWCOUNT = "showCount"; //每页条数 public static final String FILEPATH_LOCAL = "/uploadFiles/file/"; //本地文件模板 + public static final String FILEPATHAPP = "/TrafficFile/uploadFiles/app"; //app上传路径 public static final String FILEPATHFILE = "/TrafficFile/uploadFiles/file/"; //文件上传路径 public static final String BIFILEPATHFILE = "/TrafficFile/uploadFiles/Bfile/"; //文件上传路径 public static final String FILEPATHIMG = "/TrafficFile/uploadFiles/imgs/"; //图片上传路径 @@ -37,7 +38,7 @@ public class Const { public static final String FILEPATHWORDTEMPLATE = "/TrafficFile/uploadFiles/wordTemplate/"; //word导出模板文件夹 public static final String FILEPATHCURRICULUM = "/TrafficFile/uploadFiles/curriculum/"; //课程照片 - public static final String FILEACTIVITI = "/uploadFiles/activitiFile/"; //工作流生成XML和PNG目录 + public static final String FILEACTIVITI = "/TrafficFile/uploadFiles/activitiFile/"; //工作流生成XML和PNG目录 public static final String AGENCY_MANAGEMENT_ID = "AGENCY_MANAGEMENT_ID"; //session用的代理机构 public static final String DEPARTMENT_IDS = "DEPARTMENT_IDS"; //当前用户拥有的最高部门权限集合