余额额度流水加导出
This commit is contained in:
+60
@@ -2,6 +2,8 @@ package com.ruoyi.web.controller.customer.customermoney;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -17,6 +19,7 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.customer.customermoney.api.ICustomerAccountApi;
|
||||
import com.ruoyi.customer.customermoney.domain.CustomerBalanceFlow;
|
||||
import com.ruoyi.customer.customermoney.domain.CustomerCreditApply;
|
||||
@@ -25,6 +28,9 @@ import com.ruoyi.customer.customermoney.domain.CustomerReceipt;
|
||||
import com.ruoyi.customer.customermoney.service.ICreditQuotaService;
|
||||
import com.ruoyi.customer.customermoney.service.ICustomerMoneyService;
|
||||
import com.ruoyi.customer.customermoney.vo.CustomerAccountStatusVO;
|
||||
import com.ruoyi.customer.customermoney.vo.CustomerBalanceFlowExportVO;
|
||||
import com.ruoyi.customer.customermoney.vo.CustomerCreditFlowExportVO;
|
||||
import com.ruoyi.customer.customermoney.vo.CustomerReceiptExportVO;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
|
||||
/**
|
||||
@@ -89,6 +95,24 @@ public class CustomerMoneyController extends BaseController
|
||||
List<CustomerReceipt> list = customerMoneyService.selectReceiptList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出收款记录(按当前筛选条件,全量导出不分页)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('customersupplier:customerinfo:export')")
|
||||
@Log(title = "客户收款记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/receipt/export")
|
||||
public void receiptExport(HttpServletResponse response, CustomerReceipt query)
|
||||
{
|
||||
List<CustomerReceiptExportVO> list = Collections.emptyList();
|
||||
if (query != null && query.getCustomerId() != null && query.getCustomerId() != 0L)
|
||||
{
|
||||
list = customerMoneyService.selectReceiptList(query).stream()
|
||||
.map(CustomerReceiptExportVO::from).collect(Collectors.toList());
|
||||
}
|
||||
ExcelUtil<CustomerReceiptExportVO> util = new ExcelUtil<>(CustomerReceiptExportVO.class);
|
||||
util.exportExcel(response, list, "收款记录");
|
||||
}
|
||||
/**
|
||||
* 获取收款单详情(含收款附件)
|
||||
*/
|
||||
@@ -149,6 +173,24 @@ public class CustomerMoneyController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出余额流水(按当前筛选条件,全量导出不分页)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('customersupplier:customerinfo:export')")
|
||||
@Log(title = "客户余额流水", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/flow/export")
|
||||
public void flowExport(HttpServletResponse response, CustomerBalanceFlow query)
|
||||
{
|
||||
List<CustomerBalanceFlowExportVO> list = Collections.emptyList();
|
||||
if (query != null && query.getCustomerId() != null && query.getCustomerId() != 0L)
|
||||
{
|
||||
list = customerMoneyService.selectFlowList(query).stream()
|
||||
.map(CustomerBalanceFlowExportVO::from).collect(Collectors.toList());
|
||||
}
|
||||
ExcelUtil<CustomerBalanceFlowExportVO> util = new ExcelUtil<>(CustomerBalanceFlowExportVO.class);
|
||||
util.exportExcel(response, list, "余额流水");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询额度流水列表
|
||||
*/
|
||||
@@ -164,6 +206,24 @@ public class CustomerMoneyController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出额度流水(按当前筛选条件,全量导出不分页)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('customersupplier:customerinfo:export')")
|
||||
@Log(title = "客户额度流水", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/credit/flow/export")
|
||||
public void creditFlowExport(HttpServletResponse response, CustomerCreditFlow query)
|
||||
{
|
||||
List<CustomerCreditFlowExportVO> list = Collections.emptyList();
|
||||
if (query != null && query.getCustomerId() != null && query.getCustomerId() != 0L)
|
||||
{
|
||||
list = customerMoneyService.selectCreditFlowList(query).stream()
|
||||
.map(CustomerCreditFlowExportVO::from).collect(Collectors.toList());
|
||||
}
|
||||
ExcelUtil<CustomerCreditFlowExportVO> util = new ExcelUtil<>(CustomerCreditFlowExportVO.class);
|
||||
util.exportExcel(response, list, "额度流水");
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交额度调整申请(信用额度/临时额度),申请待审批通过后才真正调整额度
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user