|
@@ -94,8 +94,10 @@ public class CustomsDeclarationServiceImpl extends ServiceImpl<CustomsDeclaratio
|
|
|
PageHelper.startPage(search.getPage(), search.getRows());
|
|
|
List<CustomsDeclaration4FilingDocVO> list = this.baseMapper.queryList4FilingDocBySearch(search);
|
|
|
list.forEach(item -> {
|
|
|
- item.setCustomsFile(new FileAbstractDto(tFileStorageService.getFileStorageById(item.getCustomsFileId())));
|
|
|
- item.setEntrustFile(new FileAbstractDto(tFileStorageService.getFileStorageById(item.getEntrustFileId())));
|
|
|
+ Optional.ofNullable(item.getEntrustFileId()).ifPresent(
|
|
|
+ fileId -> item.setEntrustFile(new FileAbstractDto(tFileStorageService.getFileStorageById(fileId))));
|
|
|
+ Optional.ofNullable(item.getCustomsFileId()).ifPresent(
|
|
|
+ fileId -> item.setCustomsFile(new FileAbstractDto(tFileStorageService.getFileStorageById(fileId))));
|
|
|
});
|
|
|
return new PageInfo<>(list);
|
|
|
}
|