소스 검색

bugfix:发票修改

CAYK\miaosen.zhao 1 주 전
부모
커밋
c10b2b2f25
1개의 변경된 파일14개의 추가작업 그리고 12개의 파일을 삭제
  1. 14 12
      src/main/java/com/sunxung/factoring/service/invoicemanage/impl/InvoiceApprovalServiceImpl.java

+ 14 - 12
src/main/java/com/sunxung/factoring/service/invoicemanage/impl/InvoiceApprovalServiceImpl.java

@@ -390,18 +390,20 @@ public class InvoiceApprovalServiceImpl extends ServiceImpl<InvoiceApprovalMappe
                     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