gongchunyi
4 天以前 566058f4f874741adfbef92868afa05386c457fa
src/main/java/com/ruoyi/home/controller/HomeController.java
@@ -1,14 +1,17 @@
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;
@@ -26,7 +29,7 @@
 * @date : 2025/7/25 9:15
 */
@RestController
@Api(tags = "首页统计")
@Api(tags = "统计")
@RequestMapping("/home")
public class HomeController extends BaseController {
@@ -321,4 +324,96 @@
        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));
    }
    @GetMapping("/solidWaste/coreIndicators")
    @ApiOperation("固废消纳量-核心指标")
    public AjaxResult coreIndicators(productionStatisticsDto dto){
        return AjaxResult.success(homeService.coreIndicators(dto));
    }
    @GetMapping("/solidWaste/trends")
    @ApiOperation("固废消纳量-固废消纳趋势")
    public AjaxResult trends(productionStatisticsDto dto){
        return AjaxResult.success(homeService.trends(dto));
    }
    @GetMapping("/solidWaste/typeDistribution")
    @ApiOperation("固废消纳量-固废类型分布")
    public AjaxResult typeDistribution(productionStatisticsDto dto){
        return AjaxResult.success(homeService.typeDistribution(dto));
    }
}