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"; //当前用户拥有的最高部门权限集合