Merge branch 'master' of e.coding.net:tsteam/oa/system-oa

This commit is contained in:
wans 2022-04-29 15:09:40 +08:00
commit 1223633e48

View File

@ -229,46 +229,6 @@ public class FileUploadServiceImpl extends DefaultBaseService implements IFileUp
} }
} }
/*List<FileUploadDTO> fileUploadDTOList = fileUploadDao.list(params);
if(null != fileUploadDTOList && fileUploadDTOList.size() > 0) {
Iterator it = fileUploadDTOList.iterator();
while(it.hasNext()) {
FileUploadDTO fileUploadDTO = (FileUploadDTO) it.next();
params.put("fileTypeId", fileUploadDTO.getFileTypeId());
params.put("fileUploadId", fileUploadDTO.getFileUploadId());
String typeBelong = null;
if(null != params.get("typeBelong")) {
typeBelong = params.get("typeBelong").toString();
if("共享文档".equals(typeBelong)) {
typeBelong = "个人文档";
}
}
if(null != params.get("typeBelong") && "共享文档".equals(params.get("typeBelong").toString())) {
List<FileRoleDTO> fileRoleDTOList = fileTypeService.getShare(params);
if(null == fileRoleDTOList || fileRoleDTOList.size() == 0) {
it.remove();
continue;
}
}
params.remove("typeBelong");
params.remove("creator");
FileTypeDTO fileTypeDTO = fileTypeService.get(params);
params.put("typeBelong", typeBelong);
if(null != params.get("typeBelong") && null != fileTypeDTO) {
if(!params.get("typeBelong").toString().equals(fileTypeDTO.getTypeBelong())) {
it.remove();
continue;
}
}
FileTypeDTO fileTypeDTO1 = fileTypeService.getName(fileUploadDTO.getFileTypeId());
if(null != fileTypeDTO1) {
fileUploadDTO.setCatalogueType(fileTypeDTO1.getTypeBelong());
fileUploadDTO.setCatalogueName(fileTypeDTO1.getTypeName());
}
}
}*/
// 新逻辑 // 新逻辑
List<FileUploadDTO> fileUploadDTOList = null; List<FileUploadDTO> fileUploadDTOList = null;
if(null != params.get("typeBelong")) { if(null != params.get("typeBelong")) {
@ -287,6 +247,7 @@ public class FileUploadServiceImpl extends DefaultBaseService implements IFileUp
if(null != fileTypeDTO && "公共文档".equals(fileTypeDTO.getTypeBelong())) { if(null != fileTypeDTO && "公共文档".equals(fileTypeDTO.getTypeBelong())) {
iterator.remove(); iterator.remove();
} }
fileUploadDTO.setCatalogueId(fileTypeDTO.getFileTypeId());
fileUploadDTO.setCatalogueName(fileTypeDTO.getTypeName()); fileUploadDTO.setCatalogueName(fileTypeDTO.getTypeName());
fileUploadDTO.setCatalogueType(fileTypeDTO.getTypeBelong()); fileUploadDTO.setCatalogueType(fileTypeDTO.getTypeBelong());
} }
@ -317,6 +278,7 @@ public class FileUploadServiceImpl extends DefaultBaseService implements IFileUp
params.remove("creator"); params.remove("creator");
FileTypeDTO fileTypeDTO = fileTypeService.get(params); FileTypeDTO fileTypeDTO = fileTypeService.get(params);
if(null != fileTypeDTO) { if(null != fileTypeDTO) {
fileUploadDTO.setCatalogueId(fileTypeDTO.getFileTypeId());
fileUploadDTO.setCatalogueName(fileTypeDTO.getTypeName()); fileUploadDTO.setCatalogueName(fileTypeDTO.getTypeName());
fileUploadDTO.setCatalogueType(fileTypeDTO.getTypeBelong()); fileUploadDTO.setCatalogueType(fileTypeDTO.getTypeBelong());
} }
@ -343,6 +305,7 @@ public class FileUploadServiceImpl extends DefaultBaseService implements IFileUp
continue; continue;
} }
if(null != fileTypeDTO) { if(null != fileTypeDTO) {
fileUploadDTO.setCatalogueId(fileTypeDTO.getFileTypeId());
fileUploadDTO.setCatalogueName(fileTypeDTO.getTypeName()); fileUploadDTO.setCatalogueName(fileTypeDTO.getTypeName());
fileUploadDTO.setCatalogueType(fileTypeDTO.getTypeBelong()); fileUploadDTO.setCatalogueType(fileTypeDTO.getTypeBelong());
} }
@ -377,6 +340,18 @@ public class FileUploadServiceImpl extends DefaultBaseService implements IFileUp
} }
} }
if(null != fileUploadDTOList && fileUploadDTOList.size() > 0) {
Iterator<FileUploadDTO> it = fileUploadDTOList.iterator();
String fileTypeId = null == params.get("cataId") ? null : params.get("cataId").toString();
while (it.hasNext() && null != fileTypeId) {
FileUploadDTO fileUploadDTO = it.next();
if(!fileTypeId.equals(fileUploadDTO.getFileTypeId())) {
it.remove();
}
}
}
return fileUploadDTOList; return fileUploadDTOList;
} }