From aa5a53137d98f4f2fa23c499d3a43b9877b87013 Mon Sep 17 00:00:00 2001 From: liulixin Date: Thu, 18 Jan 2024 14:29:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=93=E7=B3=BB=E6=96=87=E4=BB=B6=E5=90=8C?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/filemanager/MfolderController.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/zcloud/controller/filemanager/MfolderController.java b/src/main/java/com/zcloud/controller/filemanager/MfolderController.java index 9ecbef59..b7c354a9 100644 --- a/src/main/java/com/zcloud/controller/filemanager/MfolderController.java +++ b/src/main/java/com/zcloud/controller/filemanager/MfolderController.java @@ -138,7 +138,8 @@ public class MfolderController extends BaseController { @RequestParam(value = "PARENT_ID", required = false) String PARENT_ID, @RequestParam(value = "REMARKS", required = false) String REMARKS, @RequestParam(value = "SHARE", required = false) String SHARE) throws Exception { - Map map = new HashMap(); + Map map = new HashMap<>(); + ArrayList pictureList = new ArrayList<>(); String errInfo = "success"; PageData pd = new PageData(); if (files != null && files.length > 0) { @@ -155,8 +156,6 @@ public class MfolderController extends BaseController { MultipartFile file = files[i]; String ffile = DateUtil.getDays(), fileName = ""; if (null != file && !file.isEmpty()) { -// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径 -// fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传 Long size = file.getSize()/1024; fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); @@ -173,18 +172,20 @@ public class MfolderController extends BaseController { pd.put("CTIME", DateUtil.date2Str(new Date())); // 创建时间 pd.put("UNAME", Jurisdiction.getName()); // 上传者,当前用户的姓名 pd.put("MASTER", Jurisdiction.getUsername()); // 用户名 -// pd.put("FILESIZE", FileUtil.getFilesize(Const.FILEURL + Const.FILEPATHFILE -// + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName)); // 文件大小 pd.put("REMARKS", REMARKS); // 备注 pd.put("SHARE", SHARE); // 是否共享 pd.put("MFOLDER_ID", this.get32UUID()); // 主键 pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业 + pictureList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName+ + "@@" + +fileName); mfolderService.save(pd); // 存入数据库表 } else { errInfo = "fail"; } } } + map.put("sendPicturesList", JSON.toJSONString(pictureList)); map.put("dockData", JSON.toJSONString(pd)); map.put("result", errInfo); // 返回结果 return map;