| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.home.dto.*; |
| | | import com.ruoyi.home.service.HomeService; |
| | | import com.ruoyi.dto.MapDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @GetMapping("/supplierPurchaseRanking") |
| | | @ApiOperation("供应商采购排名") |
| | | public AjaxResult supplierPurchaseRanking(@RequestParam(value = "type", defaultValue = "0") Integer type) { |
| | | public AjaxResult supplierPurchaseRanking(@RequestParam(value = "type", defaultValue = "1") 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) { |
| | | public AjaxResult customerRevenueAnalysis(@RequestParam("customerId") Long customerId, @RequestParam(value = "type", defaultValue = "1") Integer type) { |
| | | CustomerRevenueAnalysisDto dto = homeService.customerRevenueAnalysis(customerId, type); |
| | | return AjaxResult.success(dto); |
| | | } |
| | |
| | | @ApiOperation("客户金额贡献排名") |
| | | public AjaxResult customerContributionRanking(@RequestParam(value = "type", defaultValue = "1") Integer type) { |
| | | List<CustomerContributionRankingDto> list = homeService.customerContributionRanking(type); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @GetMapping("/productSalesAnalysis") |
| | | @ApiOperation("各产品销售金额分析") |
| | | public AjaxResult productSalesAnalysis() { |
| | | List<MapDto> list = homeService.productSalesAnalysis(); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @GetMapping("/rawMaterialPurchaseAmountRatio") |
| | | @ApiOperation("原材料采购金额占比") |
| | | public AjaxResult rawMaterialPurchaseAmountRatio(){ |
| | | List<MapDto> list = homeService.rawMaterialPurchaseAmountRatio(); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @GetMapping("/salesPurchaseStorageProductCount") |
| | | @ApiOperation("销售-采购-储存产品数") |
| | | public AjaxResult salesPurchaseStorageProductCount(){ |
| | | List<MapDto> list = homeService.salesPurchaseStorageProductCount(); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @GetMapping("/productInOutAnalysis") |
| | | @ApiOperation("产品出入库分析") |
| | | public AjaxResult productInOutAnalysis(@RequestParam(value = "type", defaultValue = "1") Integer type){ |
| | | List<Map<String, Object>> result = homeService.productInOutAnalysis(type); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/productTurnoverDays") |
| | | @ApiOperation("产品周转天数") |
| | | public AjaxResult productTurnoverDays(){ |
| | | List<MapDto> list = homeService.productTurnoverDays(); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /********************************************************质量类*****************************************************/ |
| | | @GetMapping("/qualityStatistics") |
| | | @Log(title = "质量分析", businessType = BusinessType.OTHER) |