src/main/java/com/ruoyi/sales/service/impl/ReceiptPaymentServiceImpl.java
@@ -4,6 +4,7 @@
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.common.utils.poi.ExcelUtil;
import com.ruoyi.sales.dto.CustomerInteractionDto;
import com.ruoyi.sales.dto.InvoiceLedgerDto;
import com.ruoyi.sales.dto.ReceiptPaymentDto;
@@ -17,6 +18,7 @@
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.YearMonth;
@@ -134,7 +136,11 @@
     */
    @Override
    public IPage<ReceiptPaymentDto> bindInvoiceNoRegPage(Page page, ReceiptPaymentDto receiptPaymentDto) {
        return receiptPaymentMapper.bindInvoiceNoRegPage(page, receiptPaymentDto);
        IPage<ReceiptPaymentDto> receiptPaymentDtoIPage = receiptPaymentMapper.bindInvoiceNoRegPage(page, receiptPaymentDto);
        if (receiptPaymentDto.getStatus()) {
            receiptPaymentDtoIPage.getRecords().removeIf(receiptPaymentDto1 -> new BigDecimal("0.00").equals(receiptPaymentDto1.getNoReceiptAmount()));
        }
        return receiptPaymentDtoIPage;
    }
    /**
@@ -235,7 +241,7 @@
            customerInteractionDto.setHappenTime(localDate);
            customerInteractionDto.setInvoiceAmount(invoiceAmount);
            customerInteractionDto.setReceiptAmount(currentReceiptAmount);
            amountTotal = amountTotal.add(currentDateTotal);
            amountTotal = customerInteractionDto.getInvoiceAmount().subtract(customerInteractionDto.getReceiptAmount());
            customerInteractionDto.setUnReceiptAmount(amountTotal);
            result.add(customerInteractionDto);
        }
@@ -249,4 +255,18 @@
    public List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage(ReceiptPaymentDto receiptPaymentDto) {
        return receiptPaymentMapper.receiptPaymentHistoryListNoPage( receiptPaymentDto);
    }
    @Override
    public void exportPaymentList(HttpServletResponse response) {
       List<ReceiptPaymentDto> receiptPaymentDtoList =  receiptPaymentMapper.bindInvoiceNoRegListAll();
        ExcelUtil<ReceiptPaymentDto> util = new ExcelUtil<ReceiptPaymentDto>(ReceiptPaymentDto.class);
        util.exportExcel(response, receiptPaymentDtoList, "回款登记");
    }
    @Override
    public void exportPaymentList(HttpServletResponse response, ArrayList<Long> ids) {
        List<ReceiptPaymentDto> receiptPaymentDtoList =  receiptPaymentMapper.bindInvoiceNoRegListByIds(ids);
        ExcelUtil<ReceiptPaymentDto> util = new ExcelUtil<ReceiptPaymentDto>(ReceiptPaymentDto.class);
        util.exportExcel(response, receiptPaymentDtoList, "回款登记");
    }
}