| | |
| | | |
| | | private PurchaseLedgerMapper purchaseLedgerMapper; |
| | | |
| | | private InvoicePurchaseMapper invoicePurchaseMapper; |
| | | |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | private SupplierManageMapper supplierManageMapper; |
| | |
| | | List<PaymentRegistration> paymentRegistrations = paymentRegistrationMapper.selectList(new QueryWrapper<PaymentRegistration>() |
| | | .eq("ticket_registration_id", registrationDto.getTicketRegistrationId())); |
| | | BigDecimal total = paymentRegistrations.stream().map(PaymentRegistration::getCurrentPaymentAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | registrationDto.setUnPaymentAmount(registrationDto.getInvoiceAmount().subtract(total)); |
| | | BigDecimal invoiceAmount = (null != registrationDto.getInvoiceAmount())? registrationDto.getInvoiceAmount() : BigDecimal.ZERO; |
| | | registrationDto.setUnPaymentAmount(invoiceAmount.subtract(total)); |
| | | } |
| | | return list; |
| | | } |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询付款登记列表 |
| | | * |
| | | * @param paymentRegistrationDto 付款登记 |
| | | * @return 付款登记集合 |
| | | */ |
| | | @Override |
| | | public List<PaymentRegistrationDto> paymentHistoryList(PaymentRegistrationDto paymentRegistrationDto) { |
| | | return paymentRegistrationMapper.paymentHistoryList(paymentRegistrationDto); |
| | | } |
| | | |
| | | // 批量查询采购台账(当月) |
| | | private Map<Long, List<PurchaseLedger>> batchQueryPurchaseLedgers(List<Long> supplierIds, LocalDate startDate, LocalDate endDate) { |
| | | LambdaQueryWrapper<PurchaseLedger> query = new LambdaQueryWrapper<>(); |