政企WPS

This commit is contained in:
zhangqinbin
2023-12-22 09:15:19 +08:00
parent 0304f25a2b
commit 0a2137949b
2 changed files with 7 additions and 5 deletions

View File

@ -303,10 +303,12 @@ 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());
fileLength = String.valueOf(optional1.get().length); if(optional1!=null) {
fileName = entityList.get(0).getFilename(); fileLength = String.valueOf(optional1.get().length);
buf = optional1.get(); fileName = entityList.get(0).getFilename();
uploadB = false; buf = optional1.get();
uploadB = false;
}
} }
} }
if(uploadB){ if(uploadB){

View File

@ -714,7 +714,7 @@ public class WpsServiceImpl implements WpsService {
} }
if(uploadB){ if(uploadB){
buf = uploadTempFile(fileExtension); buf = uploadTempFile(fileExtension);
Optional<UploadObject> op=attachmentClient.upload(id,fileName,buf); //Optional<UploadObject> op=attachmentClient.upload(id,fileName,buf);
} }
return buf; return buf;
} }