体系文件同步
parent
95d325c6a5
commit
aa5a53137d
|
@ -138,7 +138,8 @@ public class MfolderController extends BaseController {
|
||||||
@RequestParam(value = "PARENT_ID", required = false) String PARENT_ID,
|
@RequestParam(value = "PARENT_ID", required = false) String PARENT_ID,
|
||||||
@RequestParam(value = "REMARKS", required = false) String REMARKS,
|
@RequestParam(value = "REMARKS", required = false) String REMARKS,
|
||||||
@RequestParam(value = "SHARE", required = false) String SHARE) throws Exception {
|
@RequestParam(value = "SHARE", required = false) String SHARE) throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
ArrayList<String> pictureList = new ArrayList<>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
if (files != null && files.length > 0) {
|
if (files != null && files.length > 0) {
|
||||||
|
@ -155,8 +156,6 @@ public class MfolderController extends BaseController {
|
||||||
MultipartFile file = files[i];
|
MultipartFile file = files[i];
|
||||||
String ffile = DateUtil.getDays(), fileName = "";
|
String ffile = DateUtil.getDays(), fileName = "";
|
||||||
if (null != file && !file.isEmpty()) {
|
if (null != file && !file.isEmpty()) {
|
||||||
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
|
|
||||||
// fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
|
|
||||||
Long size = file.getSize()/1024;
|
Long size = file.getSize()/1024;
|
||||||
fileName = this.get32UUID()
|
fileName = this.get32UUID()
|
||||||
+ file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
+ file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||||
|
@ -173,18 +172,20 @@ public class MfolderController extends BaseController {
|
||||||
pd.put("CTIME", DateUtil.date2Str(new Date())); // 创建时间
|
pd.put("CTIME", DateUtil.date2Str(new Date())); // 创建时间
|
||||||
pd.put("UNAME", Jurisdiction.getName()); // 上传者,当前用户的姓名
|
pd.put("UNAME", Jurisdiction.getName()); // 上传者,当前用户的姓名
|
||||||
pd.put("MASTER", Jurisdiction.getUsername()); // 用户名
|
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("REMARKS", REMARKS); // 备注
|
||||||
pd.put("SHARE", SHARE); // 是否共享
|
pd.put("SHARE", SHARE); // 是否共享
|
||||||
pd.put("MFOLDER_ID", this.get32UUID()); // 主键
|
pd.put("MFOLDER_ID", this.get32UUID()); // 主键
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
|
||||||
|
pictureList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName+
|
||||||
|
"@@"
|
||||||
|
+fileName);
|
||||||
mfolderService.save(pd); // 存入数据库表
|
mfolderService.save(pd); // 存入数据库表
|
||||||
} else {
|
} else {
|
||||||
errInfo = "fail";
|
errInfo = "fail";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
map.put("sendPicturesList", JSON.toJSONString(pictureList));
|
||||||
map.put("dockData", JSON.toJSONString(pd));
|
map.put("dockData", JSON.toJSONString(pd));
|
||||||
map.put("result", errInfo); // 返回结果
|
map.put("result", errInfo); // 返回结果
|
||||||
return map;
|
return map;
|
||||||
|
|
Loading…
Reference in New Issue