体系文件批量上传

pull/14/head
liulixin 2024-01-19 09:27:10 +08:00
parent 8ddd4b1c63
commit 19a797640d
1 changed files with 18 additions and 2 deletions

View File

@ -157,6 +157,7 @@ public class MfolderController extends BaseController {
MultipartFile file = files[i];
String ffile = DateUtil.getDays(), fileName = "";
if (null != file && !file.isEmpty()) {
String MFOLDER_ID = this.get32UUID();
Long size = file.getSize()/1024;
fileName = this.get32UUID()
+ file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
@ -175,12 +176,27 @@ public class MfolderController extends BaseController {
pd.put("MASTER", Jurisdiction.getUsername()); // 用户名
pd.put("REMARKS", REMARKS); // 备注
pd.put("SHARE", SHARE); // 是否共享
pd.put("MFOLDER_ID", this.get32UUID()); // 主键
pd.put("MFOLDER_ID", MFOLDER_ID); // 主键
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
pictureList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName+
"@@"
+fileName);
mfolderServiceList.add(pd);
PageData pageData = new PageData();
pd.put("FILEPATH",
Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); // 文件路径
pageData.put("FILESIZE", size);
pageData.put("NAME", realName2); // 文件名
pageData.put("PARENT_ID", PARENT_ID); // 目录ID
pageData.put("CTIME", DateUtil.date2Str(new Date())); // 创建时间
pageData.put("UNAME", Jurisdiction.getName()); // 上传者,当前用户的姓名
pageData.put("MASTER", Jurisdiction.getUsername()); // 用户名
pageData.put("REMARKS", REMARKS); // 备注
pageData.put("SHARE", SHARE); // 是否共享
pageData.put("MFOLDER_ID", MFOLDER_ID); // 主键
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
mfolderServiceList.add(pageData);
mfolderService.save(pd); // 存入数据库表
} else {
errInfo = "fail";