shiyunteng
2026-08-26 b967d23ae6c1f7761feb3c5328e3b591df6a735d
platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/OutBoundServiceImpl.java
@@ -590,7 +590,7 @@
            .eq(ContractSubjectMatter::getContractId, contract.getId()).ne(ContractSubjectMatter::getDeliveryStatus, 0));
      //查询合同是否有出库阶段
      ContractPaymentSchedule schedule = scheduleMapper.selectOne(Wrappers.<ContractPaymentSchedule>lambdaQuery().eq(ContractPaymentSchedule::getContractId, contract.getId())
            .eq(ContractPaymentSchedule::getStageName, "发货前"));
            .eq(ContractPaymentSchedule::getStageName, "发货前").gt(ContractPaymentSchedule::getPaymentRatio,0).last("limit 1"));
      //存在出库阶段
      if (ObjUtil.isNotNull(schedule)) {
         //当前出库金额
@@ -611,6 +611,8 @@
            contract.setBillingStatus("3");
            contractMapper.updateById(contract);
         }
         //导入数据不生成应收
         if (targetContractNo.startsWith("ZB-")) {
         //计算发货前应收更新资金明细
         PaymentConfirm paymentConfirm = new PaymentConfirm();
         paymentConfirm.setBusinessType("发货前应收");
@@ -700,6 +702,7 @@
               }
            }
         }
         }
         //更新发货前收款生效时间
         if (ObjUtil.isNull(schedule.getEffectiveDate())) {