政企WPS

This commit is contained in:
zhangqinbin
2023-12-22 09:31:13 +08:00
parent 0a2137949b
commit 06a1cace23
2 changed files with 8 additions and 5 deletions

View File

@ -231,8 +231,9 @@ public class WpsController {
List<AttachmentEntity> entityList = detail.get(fileId); List<AttachmentEntity> entityList = detail.get(fileId);
if(entityList!=null&&entityList.size()>0) { if(entityList!=null&&entityList.size()>0) {
Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId()); Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId());
if(optional1!=null&&optional1.isPresent()) {
buf = optional1.get(); buf = optional1.get();
}
} }
} }
return buf.length>10000; return buf.length>10000;
@ -303,7 +304,7 @@ public class WpsController {
List<AttachmentEntity> entityList = detail.get(fileId[0]); List<AttachmentEntity> entityList = detail.get(fileId[0]);
if(entityList!=null&&entityList.size()>0) { if(entityList!=null&&entityList.size()>0) {
Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId()); Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId());
if(optional1!=null) { if(optional1!=null&&optional1.isPresent()) {
fileLength = String.valueOf(optional1.get().length); fileLength = String.valueOf(optional1.get().length);
fileName = entityList.get(0).getFilename(); fileName = entityList.get(0).getFilename();
buf = optional1.get(); buf = optional1.get();

View File

@ -708,8 +708,10 @@ public class WpsServiceImpl implements WpsService {
List<AttachmentEntity> entityList = detail.get(id); List<AttachmentEntity> entityList = detail.get(id);
if(entityList!=null&&entityList.size()>0) { if(entityList!=null&&entityList.size()>0) {
Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId()); Optional<byte[]> optional1 = attachmentClient.downloadFileByObjectId(entityList.get(0).getId());
uploadB = false; if(optional1!=null&&optional1.isPresent()) {
buf = optional1.get(); uploadB = false;
buf = optional1.get();
}
} }
} }
if(uploadB){ if(uploadB){