From c58c68283ec0d1832143f7e3add43f24b8aba374 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 02 四月 2026 10:03:58 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_宁夏_中盛建材' into dev_宁夏_中盛建材
---
src/main/java/com/ruoyi/home/controller/HomeController.java | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 102 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..c435928 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,102 @@
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));
+ }
+
+ @GetMapping("/manage")
+ @ApiOperation("棣栭〉--缁忚惀鍏虫敞")
+ public AjaxResult manage() {
+ return AjaxResult.success(homeService.manage());
+ }
+
+
}
--
Gitblit v1.9.3