liding
10 小时以前 56424206be7af38a02be17f215654f3ca813ebcb
src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java
@@ -2,15 +2,21 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.purchase.dto.InvoicePurchaseDto;
import com.ruoyi.sales.dto.InvoiceLedgerDto;
import com.ruoyi.sales.dto.ReceiptPaymentDto;
import com.ruoyi.sales.dto.ReceiptPaymentRecordDto;
import com.ruoyi.sales.pojo.ReceiptPayment;
import com.ruoyi.sales.service.ReceiptPaymentService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
@@ -33,7 +39,7 @@
     * @return
     */
    @PostMapping("/saveOrUpdate")
    public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody ReceiptPayment receiptPayment) {
    public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody List<ReceiptPayment> receiptPayment) {
        receiptPaymentService.receiptPaymentSaveOrUpdate(receiptPayment);
        return AjaxResult.success();
    }
@@ -44,6 +50,7 @@
     * @return
     */
    @PostMapping("/update")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult receiptPaymentUpdate (@RequestBody ReceiptPayment receiptPayment) {
        return AjaxResult.success(receiptPaymentService.receiptPaymentUpdate(receiptPayment));
    }
@@ -54,6 +61,7 @@
     * @return
     */
    @DeleteMapping("/del")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult receiptPaymentDel (@RequestBody List<Integer> ids) {
        return AjaxResult.success(receiptPaymentService.receiptPaymentDel(ids));
    }
@@ -64,9 +72,20 @@
     * @return
     */
    @GetMapping("/customerInteractions")
    public AjaxResult customerInteractions (ReceiptPaymentDto receiptPaymentDto) {
    public AjaxResult customerInteractions (InvoiceLedgerDto receiptPaymentDto) {
        return AjaxResult.success(receiptPaymentService.customerInteractions(receiptPaymentDto));
    }
    /**
     * 客户销售记录查询
     * @param receiptPaymentDto
     * @return
     */
    @GetMapping("/customerSalesInteractions")
    public AjaxResult customerSalesInteractions (InvoiceLedgerDto receiptPaymentDto) {
        return AjaxResult.success(receiptPaymentService.customerSalesInteractions(receiptPaymentDto));
    }
    /**
     * 回款登记详情
@@ -154,6 +173,26 @@
    }
    /**
     * 导出回款流水列表
     */
    @Log(title = "导出回款流水列表", businessType = BusinessType.EXPORT)
    @PostMapping("/exportOne")
    public void exportOne(HttpServletResponse response, ReceiptPaymentDto salesLedgerDto) {
        Page page = new Page();
        page.setCurrent(-1);
        page.setSize(-1);
        IPage<ReceiptPaymentDto> salesLedgerIPage = receiptPaymentHistoryListPage(page, salesLedgerDto);
        ExcelUtil<ReceiptPaymentRecordDto> util = new ExcelUtil<ReceiptPaymentRecordDto>(ReceiptPaymentRecordDto.class);
        List<ReceiptPaymentRecordDto> receiptPaymentRecordDtos = new ArrayList<>();
        salesLedgerIPage.getRecords().forEach(receiptPaymentRecordDto -> {
            ReceiptPaymentRecordDto receiptPaymentRecordDto1 = new ReceiptPaymentRecordDto();
            BeanUtils.copyProperties(receiptPaymentRecordDto, receiptPaymentRecordDto1);
            receiptPaymentRecordDtos.add(receiptPaymentRecordDto1);
        });
        util.exportExcel(response, receiptPaymentRecordDtos, "导出开票登记列表");
    }
    /**
     * 查询回款记录不分页
     */
    @GetMapping("/receiptPaymentHistoryListNoPage")