| | |
| | | package com.ruoyi.home.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.home.dto.*; |
| | | import com.ruoyi.home.service.HomeService; |
| | | import com.ruoyi.production.dto.ProductOrderDto; |
| | | import com.ruoyi.production.dto.ProductWorkOrderDto; |
| | | import com.ruoyi.production.dto.SalesLedgerWorkDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | return AjaxResult.success(count); |
| | | } |
| | | |
| | | @GetMapping("/deptStaffDistribution") |
| | | @ApiOperation("各部门人员分布") |
| | | public AjaxResult deptStaffDistribution() { |
| | | DeptStaffDistributionDto dto = homeService.deptStaffDistribution(); |
| | | return AjaxResult.success(dto); |
| | | } |
| | | |
| | | @GetMapping("/summaryStatistics") |
| | | @ApiOperation("员工-客户-供应商总数") |
| | | public AjaxResult summaryStatistics() { |
| | | HomeSummaryDto homeSummaryDto = homeService.summaryStatistics(); |
| | | return AjaxResult.success(homeSummaryDto); |
| | | } |
| | | |
| | | @GetMapping("/supplierPurchaseRanking") |
| | | @ApiOperation("供应商采购排名") |
| | | public AjaxResult supplierPurchaseRanking(@RequestParam(value = "type", defaultValue = "0") Integer type) { |
| | | List<SupplierPurchaseRankingDto> list = homeService.supplierPurchaseRanking(type); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @GetMapping("/customerRevenueAnalysis") |
| | | @ApiOperation("客户营收贡献数值分析") |
| | | public AjaxResult customerRevenueAnalysis(@RequestParam("customerId") Long customerId, @RequestParam(value = "type", defaultValue = "0") Integer type) { |
| | | CustomerRevenueAnalysisDto dto = homeService.customerRevenueAnalysis(customerId, type); |
| | | return AjaxResult.success(dto); |
| | | } |
| | | |
| | | @GetMapping("/productCategoryDistribution") |
| | | @ApiOperation("产品大类分布") |
| | | public AjaxResult productCategoryDistribution() { |
| | | ProductCategoryDistributionDto dto = homeService.productCategoryDistribution(); |
| | | return AjaxResult.success(dto); |
| | | } |
| | | |
| | | @GetMapping("/customerContributionRanking") |
| | | @ApiOperation("客户金额贡献排名") |
| | | public AjaxResult customerContributionRanking(@RequestParam(value = "type", defaultValue = "1") Integer type) { |
| | | List<CustomerContributionRankingDto> list = homeService.customerContributionRanking(type); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | /********************************************************营销采购类**************************************************/ |
| | | @GetMapping("/business") |