From 566058f4f874741adfbef92868afa05386c457fa Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期四, 02 四月 2026 09:51:17 +0800
Subject: [PATCH] fix: 报工不合格数量不能大于本次报工数量

---
 src/main/java/com/ruoyi/home/controller/HomeController.java |   97 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 96 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/ruoyi/home/controller/HomeController.java b/src/main/java/com/ruoyi/home/controller/HomeController.java
index fcdfc16..275a5c7 100644
--- a/src/main/java/com/ruoyi/home/controller/HomeController.java
+++ b/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));
+    }
+
+
 }

--
Gitblit v1.9.3