| | |
| | | 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; |
| | |
| | | @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)); |
| | | } |
| | | |
| | | } |