chenrui
4 天以前 a303e40b2d843700f2b9045ca105c81dea97d964
回款登记记录修改
已修改7个文件
54 ■■■■■ 文件已修改
src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/sales/mapper/ReceiptPaymentMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/sales/pojo/SalesLedger.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/sales/service/ReceiptPaymentService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/sales/service/impl/ReceiptPaymentServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/sales/ReceiptPaymentMapper.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java
@@ -132,4 +132,12 @@
    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);
    }
}
src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
@@ -180,9 +180,11 @@
        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;
                }
@@ -192,6 +194,7 @@
            }else {
                salesLedger.setNoInvoiceAmountTotal(salesLedger.getContractAmount());
            }
            salesLedger.setInvoiceTotal(invoiceTotal);
        }
        return iPage;
    }
src/main/java/com/ruoyi/sales/mapper/ReceiptPaymentMapper.java
@@ -57,4 +57,9 @@
     * @return
     */
    List<CustomerInteractionDto> customerInteractions (ReceiptPaymentDto receiptPaymentDto);
    /**
     * 查询回款记录不分页
     */
    List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage( @Param("params") ReceiptPaymentDto receiptPaymentDto);
}
src/main/java/com/ruoyi/sales/pojo/SalesLedger.java
@@ -106,5 +106,9 @@
    @ApiModelProperty(value = "签订日期")
    private LocalDate executionDate;
    @TableField(exist = false)
    @ApiModelProperty(value = "已开票金额(元)")
    private BigDecimal invoiceTotal;
}
src/main/java/com/ruoyi/sales/service/ReceiptPaymentService.java
@@ -85,4 +85,9 @@
     * @return
     */
    List<CustomerInteractionDto> customerInteractions (ReceiptPaymentDto receiptPaymentDto);
    /**
     * 查询回款记录分页
     */
    List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage(ReceiptPaymentDto receiptPaymentDto);
}
src/main/java/com/ruoyi/sales/service/impl/ReceiptPaymentServiceImpl.java
@@ -4,7 +4,6 @@
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;
@@ -242,4 +241,12 @@
        }
        return result;
    }
    /**
     * 查询回款记录分页
     */
    @Override
    public List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage(ReceiptPaymentDto receiptPaymentDto) {
        return receiptPaymentMapper.receiptPaymentHistoryListNoPage( receiptPaymentDto);
    }
}
src/main/resources/mapper/sales/ReceiptPaymentMapper.xml
@@ -235,4 +235,24 @@
            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>