Преглед на файлове

fix(验收单):bug修改

liutao преди 1 седмица
родител
ревизия
195b29bfd0
променени са 1 файла, в които са добавени 14 реда и са изтрити 12 реда
  1. 14 12
      src/main/java/com/sunxung/factoring/service/acceptancesheet/impl/AcceptanceBasicInfoServiceImpl.java

+ 14 - 12
src/main/java/com/sunxung/factoring/service/acceptancesheet/impl/AcceptanceBasicInfoServiceImpl.java

@@ -1221,18 +1221,20 @@ public class AcceptanceBasicInfoServiceImpl extends ServiceImpl<AcceptanceBasicI
                     CSalesContractSupplementBasicInfo salesContractSupplementBasicInfo = salesContractSupplementBasicInfoService.lambdaQuery()
                             .eq(CSalesContractSupplementBasicInfo::getcSalesContractSupplementInfoId, s.getId())
                             .one();
-                    List<FileStorageDO> SupplementFileStorageDOS = fileService.findByBusinessId(salesContractSupplementBasicInfo.getId(),
-                            FileModuleDict.ChildEnum.SALES_CONTRACT_SUPPLEMENT_CONTRACT_FILE.getCode());
-                    if (CollectionUtil.isNotEmpty(SupplementFileStorageDOS)) {
-                        SupplementFileStorageDOS.forEach(fileStorageDO -> {
-                            FileStorage fileStorage = new FileStorage();
-                            fileStorage.setAbsolutePath(fileStorageDO.getAbsolutePath());
-                            fileStorage.setName(fileStorageDO.getOriginalName());
-                            fileStorage.setPath(fileStorageDO.getPath());
-                            fileStorage.setId(fileStorageDO.getId());
-                            fileStorage.setOriginalName(fileStorageDO.getOriginalName());
-                            salesContract.add(fileStorage);
-                        });
+                    if(salesContractSupplementBasicInfo!=null){
+                        List<FileStorageDO> SupplementFileStorageDOS = fileService.findByBusinessId(salesContractSupplementBasicInfo.getId(),
+                                FileModuleDict.ChildEnum.SALES_CONTRACT_SUPPLEMENT_CONTRACT_FILE.getCode());
+                        if (CollectionUtil.isNotEmpty(SupplementFileStorageDOS)) {
+                            SupplementFileStorageDOS.forEach(fileStorageDO -> {
+                                FileStorage fileStorage = new FileStorage();
+                                fileStorage.setAbsolutePath(fileStorageDO.getAbsolutePath());
+                                fileStorage.setName(fileStorageDO.getOriginalName());
+                                fileStorage.setPath(fileStorageDO.getPath());
+                                fileStorage.setId(fileStorageDO.getId());
+                                fileStorage.setOriginalName(fileStorageDO.getOriginalName());
+                                salesContract.add(fileStorage);
+                            });
+                        }
                     }
 
                     CSalesSupplementSignConfirmation salesSupplementSignConfirmation = salesSupplementSignConfirmationService