chenrui
6 天以前 8dce4b82eeece943b56182eeebc1c9332625924c
src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java
@@ -47,8 +47,6 @@
    private PurchaseLedgerMapper purchaseLedgerMapper;
    private InvoicePurchaseMapper invoicePurchaseMapper;
    private SalesLedgerMapper salesLedgerMapper;
    private SupplierManageMapper supplierManageMapper;
@@ -83,7 +81,8 @@
            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;
    }
@@ -344,6 +343,17 @@
        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<>();