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

View File

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