| | |
| | | .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)) { |
| | | //当前出库金额 |
| | |
| | | contract.setBillingStatus("3"); |
| | | contractMapper.updateById(contract); |
| | | } |
| | | //导入数据不生成应收 |
| | | if (targetContractNo.startsWith("ZB-")) { |
| | | //计算发货前应收更新资金明细 |
| | | PaymentConfirm paymentConfirm = new PaymentConfirm(); |
| | | paymentConfirm.setBusinessType("发货前应收"); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //更新发货前收款生效时间 |
| | | if (ObjUtil.isNull(schedule.getEffectiveDate())) { |