| | |
| | | if (receiptPaymentDto.getStatus()) { |
| | | receiptPaymentDtoIPage.getRecords().removeIf(receiptPaymentDto1 -> new BigDecimal("0.00").equals(receiptPaymentDto1.getNoReceiptAmount())); |
| | | } |
| | | receiptPaymentDtoIPage.getRecords().forEach(item -> { |
| | | // 比较回款金额 == 待回款金额 |
| | | if (item.getInvoiceTotal().compareTo(item.getReceiptPaymentAmountTotal()) == 0) { |
| | | item.setStatusName("已完成回款"); |
| | | }else{ |
| | | item.setStatusName("未完成回款"); |
| | | } |
| | | |
| | | }); |
| | | return receiptPaymentDtoIPage; |
| | | } |
| | | |
| | |
| | | customerInteractionDto.setInvoiceAmount(invoiceAmount); |
| | | customerInteractionDto.setReceiptAmount(currentReceiptAmount); |
| | | amountTotal = customerInteractionDto.getInvoiceAmount().subtract(customerInteractionDto.getReceiptAmount()); |
| | | customerInteractionDto.setUnReceiptAmount(amountTotal); |
| | | customerInteractionDto.setUnReceiptAmount(amountTotal.abs()); |
| | | result.add(customerInteractionDto); |
| | | } |
| | | ArrayList<CustomerInteractionDto> newResult = new ArrayList<>(); |
| | | for (int i = 0; i < result.size(); i++) { |
| | | CustomerInteractionDto customerInteractionDto = result.get(i); |
| | | if (i == 0) { |
| | | customerInteractionDto.setUnReceiptAmount(customerInteractionDto.getInvoiceAmount().subtract(customerInteractionDto.getReceiptAmount())); |
| | | customerInteractionDto.setUnReceiptAmount(customerInteractionDto |
| | | .getInvoiceAmount() |
| | | .subtract(customerInteractionDto.getReceiptAmount()) |
| | | .abs()); |
| | | }else { |
| | | CustomerInteractionDto customerInteractionDto1 = result.get(i-1); |
| | | customerInteractionDto.setUnReceiptAmount(customerInteractionDto1.getUnReceiptAmount() |
| | | .add(customerInteractionDto.getInvoiceAmount()).subtract(customerInteractionDto.getReceiptAmount())); |
| | | .add(customerInteractionDto.getInvoiceAmount()).subtract(customerInteractionDto.getReceiptAmount()).abs()); |
| | | } |
| | | newResult.add(customerInteractionDto); |
| | | } |