| | |
| | | public void handleBeforeRemain(PaymentConfirm currentConfim, Contract contract) { |
| | | //客户付款完成合同 |
| | | List<Contract> customerCompleteContractList = contractMapper.selectList(Wrappers.<Contract>lambdaQuery().eq(Contract::getPartyAId, contract.getPartyAId()) |
| | | .eq(Contract::getPartyBId, SecurityUtils.getUser().getCompId()).eq(Contract::getContractStatus, 3)); |
| | | .eq(Contract::getPartyBId, contract.getCompId()).eq(Contract::getContractStatus, 3)); |
| | | if (CollUtil.isNotEmpty(customerCompleteContractList)) { |
| | | List<BigDecimal> outAmountList = new ArrayList<>(); |
| | | for (Contract completeContract : customerCompleteContractList) { |
| | |
| | | outConfirm.setTransationAmount(contractLastConfirm.getTotalAmount()); |
| | | outConfirm.setTotalAmount(new BigDecimal("0")); |
| | | if (contract.getContractNo().startsWith("ZB-")) { |
| | | outConfirm.setCompId(contract.getCompId()); |
| | | paymentConfirmMapper.insert(outConfirm); |
| | | } |
| | | outAmountList.add(contractLastConfirm.getTotalAmount()); |
| | |
| | | inConfirm.setReceivableAmount(inConfirm.getTotalAmount().multiply(new BigDecimal("-1"))); |
| | | } |
| | | if (contract.getContractNo().startsWith("ZB-")) { |
| | | inConfirm.setCompId(contract.getCompId()); |
| | | paymentConfirmMapper.insert(inConfirm); |
| | | } |
| | | contract.setPaidAmount(currentSum); |