| | |
| | | package com.ruoyi.sales.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | |
| | | import com.ruoyi.sales.dto.ReceiptPaymentDto; |
| | | 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.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @RestController |
| | | @RequestMapping("/receiptPayment") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 回款登记分页查询 |
| | | * @param page |
| | | * 客户往来记录查询 |
| | | * @param receiptPaymentDto |
| | | * @return |
| | | */ |
| | | @GetMapping("/listPage") |
| | | public AjaxResult receiptPaymentListPage (Page page, ReceiptPaymentDto receiptPaymentDto) { |
| | | return AjaxResult.success(receiptPaymentService.receiptPaymentListPage(page,receiptPaymentDto)); |
| | | @GetMapping("/customerInteractions") |
| | | public AjaxResult customerInteractions (ReceiptPaymentDto receiptPaymentDto) { |
| | | return AjaxResult.success(receiptPaymentService.customerInteractions(receiptPaymentDto)); |
| | | } |
| | | |
| | | /** |
| | |
| | | return AjaxResult.success(receiptPaymentService.bindInvoiceNoRegPage(page,receiptPaymentDto)); |
| | | } |
| | | |
| | | @ApiModelProperty("导出回款登记") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, String ids) { |
| | | if (ids == null || ids.isEmpty()) { |
| | | receiptPaymentService.exportPaymentList(response, null); |
| | | } else { |
| | | ArrayList<Long> idList = (ArrayList<Long>) Arrays.stream(ids.split(",")) |
| | | .map(s -> s.replaceAll("[\\[\\]]", "").trim()) |
| | | .map(Long::valueOf) |
| | | .collect(Collectors.toList()); |
| | | receiptPaymentService.exportPaymentList(response, idList); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 开票台账详情 |
| | | * @param id |
| | |
| | | List<ReceiptPaymentDto> list = receiptPaymentService.receiptPaymentHistoryList(receiptPaymentDto); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 查询回款记录 |
| | | */ |
| | | @GetMapping("/receiptPaymentHistoryListPage") |
| | | 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); |
| | | } |
| | | } |