| | |
| | | public IPage<ReceiptPaymentDto> receiptPaymentHistoryListPage(Page page, ReceiptPaymentDto receiptPaymentDto) { |
| | | return receiptPaymentService.receiptPaymentHistoryListPage(page,receiptPaymentDto); |
| | | } |
| | | |
| | | /** |
| | | * 查询回款记录不分页 |
| | | */ |
| | | @GetMapping("/receiptPaymentHistoryListNoPage") |
| | | public List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage(ReceiptPaymentDto receiptPaymentDto) { |
| | | return receiptPaymentService.receiptPaymentHistoryListNoPage(receiptPaymentDto); |
| | | } |
| | | } |
| | |
| | | for (SalesLedger salesLedger : iPage.getRecords()) { |
| | | boolean existFlag = false; |
| | | BigDecimal noInvoiceAmountTotal = BigDecimal.ZERO; |
| | | BigDecimal invoiceTotal = BigDecimal.ZERO; |
| | | for (InvoiceLedgerDto invoiceLedgerDto : invoiceLedgerDtoList) { |
| | | if (salesLedger.getId().intValue() == invoiceLedgerDto.getSalesLedgerId()) { |
| | | noInvoiceAmountTotal = salesLedger.getContractAmount().subtract(invoiceLedgerDto.getInvoiceTotal()); |
| | | invoiceTotal = invoiceLedgerDto.getInvoiceTotal(); |
| | | existFlag = true; |
| | | break; |
| | | } |
| | |
| | | }else { |
| | | salesLedger.setNoInvoiceAmountTotal(salesLedger.getContractAmount()); |
| | | } |
| | | salesLedger.setInvoiceTotal(invoiceTotal); |
| | | } |
| | | return iPage; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<CustomerInteractionDto> customerInteractions (ReceiptPaymentDto receiptPaymentDto); |
| | | |
| | | /** |
| | | * 查询回款记录不分页 |
| | | */ |
| | | List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage( @Param("params") ReceiptPaymentDto receiptPaymentDto); |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "签订日期") |
| | | private LocalDate executionDate; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "已开票金额(元)") |
| | | private BigDecimal invoiceTotal; |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<CustomerInteractionDto> customerInteractions (ReceiptPaymentDto receiptPaymentDto); |
| | | |
| | | /** |
| | | * 查询回款记录分页 |
| | | */ |
| | | List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage(ReceiptPaymentDto receiptPaymentDto); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.purchase.dto.PaymentHistoryRecordVo; |
| | | import com.ruoyi.sales.dto.CustomerInteractionDto; |
| | | import com.ruoyi.sales.dto.InvoiceLedgerDto; |
| | | import com.ruoyi.sales.dto.ReceiptPaymentDto; |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询回款记录分页 |
| | | */ |
| | | @Override |
| | | public List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage(ReceiptPaymentDto receiptPaymentDto) { |
| | | return receiptPaymentMapper.receiptPaymentHistoryListNoPage( receiptPaymentDto); |
| | | } |
| | | } |
| | |
| | | T1.happenTime ASC |
| | | </select> |
| | | |
| | | <select id="receiptPaymentHistoryListNoPage" resultType="com.ruoyi.sales.dto.ReceiptPaymentDto"> |
| | | SELECT |
| | | T1.id, |
| | | T1.receipt_payment_date, |
| | | T5.customer_name, |
| | | T1.receipt_payment_amount, |
| | | T1.receipt_payment_type, |
| | | T1.registrant, |
| | | T1.create_time |
| | | FROM |
| | | receipt_payment T1 |
| | | LEFT JOIN |
| | | invoice_ledger T2 ON T1.invoice_ledger_id = T2.id |
| | | LEFT JOIN invoice_registration_product T3 ON T2.invoice_registration_product_id = T3.id |
| | | LEFT JOIN sales_ledger T4 ON T3.sales_ledger_id = T4.id |
| | | LEFT JOIN customer T5 ON T5.id = T4.customer_id |
| | | WHERE T1.invoice_ledger_id = #{params.invoiceLedgerId} |
| | | ORDER BY T1.receipt_payment_date DESC |
| | | </select> |
| | | |
| | | </mapper> |