31 分钟以前 61f1de60e6f58dd8e19f01c56f2e56e40885d65b
src/main/java/com/ruoyi/sales/controller/MetricStatisticsController.java
@@ -1,11 +1,16 @@
package com.ruoyi.sales.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.service.ICustomerService;
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.domain.R;
import com.ruoyi.sales.dto.StatisticsTableDto;
import com.ruoyi.sales.service.impl.MetricStatisticsServiceImpl;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -21,18 +26,54 @@
@AllArgsConstructor
public class MetricStatisticsController extends BaseController {
    private MetricStatisticsServiceImpl metricStatisticsService;
    private final MetricStatisticsServiceImpl metricStatisticsService;
    private final ICustomerService customerService;
    @Operation(summary = "头部总计")
    @GetMapping("/total")
    public R<?> total() {
    public AjaxResult total() {
        return metricStatisticsService.total();
    }
    @Operation(summary = "统计表")
    @GetMapping("/statisticsTable")
    public R<?> statisticsTable(StatisticsTableDto statisticsTableDto) {
    public AjaxResult statisticsTable(StatisticsTableDto statisticsTableDto) {
        return metricStatisticsService.statisticsTable(statisticsTableDto);
    }
    @GetMapping("/customewTransactions")
    @Log(title = "客户往来", businessType = BusinessType.OTHER)
    @Operation(summary = "客户往来")
    public R customewTransactions(Page page, String customerName) {
        return R.ok(customerService.customewTransactions(page,customerName));
    }
    @GetMapping("/customewTransactionsDetails")
    @Log(title = "客户往来明细", businessType = BusinessType.OTHER)
    @Operation(summary = "客户往来明细")
    public R customewTransactionsDetails(Page page, Long customerId) {
        return R.ok(customerService.customewTransactionsDetails(page,customerId));
    }
    @GetMapping("/customerTransactionsSummary")
    @Log(title = "客户往来统计汇总", businessType = BusinessType.OTHER)
    @Operation(summary = "客户往来统计汇总")
    public R customerTransactionsSummary(Long customerId) {
        return R.ok(customerService.getCustomerTransactionsSummary(customerId));
    }
    @GetMapping("/customerTransactionsProducts")
    @Log(title = "客户往来产品明细", businessType = BusinessType.OTHER)
    @Operation(summary = "客户往来产品明细")
    public R customerTransactionsProducts(Page page, Long customerId, Long salesLedgerId) {
        return R.ok(customerService.getCustomerTransactionsProducts(page, customerId, salesLedgerId));
    }
    @GetMapping("/customerTransactionsShipments")
    @Log(title = "客户往来发货明细", businessType = BusinessType.OTHER)
    @Operation(summary = "客户往来发货明细")
    public R customerTransactionsShipments(Page page, Long customerId, Long salesLedgerId) {
        return R.ok(customerService.getCustomerTransactionsShipments(page, customerId, salesLedgerId));
    }
}