Selaa lähdekoodia

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

Wangyafan 5 kuukautta sitten
vanhempi
commit
213eb738b1

+ 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);
         //审核处理人