功能完善,新增查询条件。
This commit is contained in:
parent
a261de6841
commit
06ba42d0d1
@ -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;
|
||||
if(null != params.get("typeBelong")) {
|
||||
@ -287,6 +247,7 @@ public class FileUploadServiceImpl extends DefaultBaseService implements IFileUp
|
||||
if(null != fileTypeDTO && "公共文档".equals(fileTypeDTO.getTypeBelong())) {
|
||||
iterator.remove();
|
||||
}
|
||||
fileUploadDTO.setCatalogueId(fileTypeDTO.getFileTypeId());
|
||||
fileUploadDTO.setCatalogueName(fileTypeDTO.getTypeName());
|
||||
fileUploadDTO.setCatalogueType(fileTypeDTO.getTypeBelong());
|
||||
}
|
||||
@ -317,6 +278,7 @@ public class FileUploadServiceImpl extends DefaultBaseService implements IFileUp
|
||||
params.remove("creator");
|
||||
FileTypeDTO fileTypeDTO = fileTypeService.get(params);
|
||||
if(null != fileTypeDTO) {
|
||||
fileUploadDTO.setCatalogueId(fileTypeDTO.getFileTypeId());
|
||||
fileUploadDTO.setCatalogueName(fileTypeDTO.getTypeName());
|
||||
fileUploadDTO.setCatalogueType(fileTypeDTO.getTypeBelong());
|
||||
}
|
||||
@ -343,6 +305,7 @@ public class FileUploadServiceImpl extends DefaultBaseService implements IFileUp
|
||||
continue;
|
||||
}
|
||||
if(null != fileTypeDTO) {
|
||||
fileUploadDTO.setCatalogueId(fileTypeDTO.getFileTypeId());
|
||||
fileUploadDTO.setCatalogueName(fileTypeDTO.getTypeName());
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user