소스 검색

feat(结算单):代码健壮性

Wangyafan 5 달 전
부모
커밋
213eb738b1
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      src/main/java/com/sunxung/factoring/service/settlement/impl/SettlementManagementServiceImpl.java

+ 4 - 2
src/main/java/com/sunxung/factoring/service/settlement/impl/SettlementManagementServiceImpl.java

@@ -796,8 +796,10 @@ public class SettlementManagementServiceImpl implements SettlementManagementServ
     public void c_updateBill(SettlementBasicInfo settlementBasicInfo) {
         //生成新的结算单
         List<FileStorageDO> fileStorageDOS3 = fileService.findByBusinessId(settlementBasicInfo.getId(), FileModuleDict.ChildEnum.SETTLEMENT_UPSTREAM_UNSIGNED_FILE.getCode());
-        for (FileStorageDO fileStorageDO:fileStorageDOS3) {
-            fileService.updateBusinessId(fileStorageDO.getId(),null);
+        if (CollectionUtil.isNotEmpty(fileStorageDOS3)){
+            for (FileStorageDO fileStorageDO:fileStorageDOS3) {
+                fileService.updateBusinessId(fileStorageDO.getId(),null);
+            }
         }
         SettlementBasicInfo saveSettlementBasicInfo = addSettlement(settlementBasicInfo, null);
         //审核处理人