| | |
| | | package com.ruoyi.home.controller; |
| | | |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.energy.vo.EnergyStatisticsVo; |
| | | 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.home.annotation.DefaultType; |
| | | import com.ruoyi.home.dto.*; |
| | | import com.ruoyi.home.service.HomeService; |
| | | import com.ruoyi.dto.MapDto; |
| | | import com.ruoyi.productionPlan.service.SalesDeliveryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @date : 2025/7/25 9:15 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "首页统计") |
| | | @Api(tags = "统计") |
| | | @RequestMapping("/home") |
| | | public class HomeController extends BaseController { |
| | | |
| | |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | |
| | | /*******************************************宁夏中盛建材的大屏统计***************************************************/ |
| | | |
| | | @GetMapping("/total") |
| | | @ApiOperation("销售统计看板---总数据汇总") |
| | | public AjaxResult total() { |
| | | return AjaxResult.success(homeService.total()); |
| | | } |
| | | |
| | | @GetMapping("/salesAnalysis") |
| | | @ApiOperation("销售统计看板---销量分析趋势图") |
| | | public AjaxResult salesAnalysis(SalesDeliveryDto salesDeliveryDto) { |
| | | return AjaxResult.success(homeService.salesAnalysis(salesDeliveryDto)); |
| | | } |
| | | |
| | | @GetMapping("/salesAmount") |
| | | @ApiOperation("销售统计看板---销售金额分析") |
| | | public AjaxResult salesAmount(SalesDeliveryDto salesDeliveryDto) { |
| | | return AjaxResult.success(homeService.salesAmount(salesDeliveryDto)); |
| | | } |
| | | |
| | | @GetMapping("/customerTrends") |
| | | @ApiOperation("销售统计看板---新增客户趋势分析") |
| | | public AjaxResult customerTrends(SalesDeliveryDto salesDeliveryDto) { |
| | | return AjaxResult.success(homeService.customerTrends(salesDeliveryDto)); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/productionStatistics/materialProductionAnalysis") |
| | | @ApiOperation("生产统计看板-物料生产量分析") |
| | | public AjaxResult materialProductionAnalysis(productionStatisticsDto dto) { |
| | | Map<String, List<MaterialProductionAnalysisDto>> map = homeService.materialProductionAnalysis(dto); |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | @GetMapping("/productionStatistics/materials") |
| | | @ApiOperation("生产统计看板-获取生产成本单耗统计产品列表") |
| | | public AjaxResult getMaterials(Integer materialType) { |
| | | List<String> list = homeService.getMaterials(materialType); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @GetMapping("/productionStatistics/blocks") |
| | | @ApiOperation("生产统计看板-生产成本单耗统计(砌块)") |
| | | public AjaxResult blocks(productionStatisticsDto dto) { |
| | | return AjaxResult.success(homeService.productionCostAnalysis(dto, 1)); |
| | | } |
| | | |
| | | @GetMapping("/productionStatistics/plates") |
| | | @ApiOperation("生产统计看板-生产成本单耗统计(板材)") |
| | | public AjaxResult plates(productionStatisticsDto dto) { |
| | | return AjaxResult.success(homeService.productionCostAnalysis(dto, 2)); |
| | | } |
| | | |
| | | @GetMapping("/productionStatistics/middle") |
| | | @ApiOperation("生产统计看板-项目产量与固废处理量") |
| | | public AjaxResult middle() { |
| | | ProductionStatisticsMiddleDto middle = homeService.middle(); |
| | | return AjaxResult.success(middle); |
| | | } |
| | | |
| | | @GetMapping("/productionStatistics/solidWaste") |
| | | @ApiOperation("生产统计看板-固废处理量") |
| | | public AjaxResult solidWaste(productionStatisticsDto dto) { |
| | | return AjaxResult.success(homeService.solidWaste(dto)); |
| | | } |
| | | |
| | | @GetMapping("/productionStatistics/energy") |
| | | @ApiOperation("生产统计看板-能耗统计") |
| | | public AjaxResult energy(productionStatisticsDto dto) { |
| | | return AjaxResult.success(homeService.energy(dto)); |
| | | } |
| | | |
| | | |
| | | } |