From 711a9201dfcb8fe8d445a6cf940bc7e4a9182e9d Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期四, 02 四月 2026 15:34:39 +0800
Subject: [PATCH] feat: 首页-计划与生产趋势
---
src/main/java/com/ruoyi/home/controller/HomeController.java | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 105 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..b3702c2 100644
--- a/src/main/java/com/ruoyi/home/controller/HomeController.java
+++ b/src/main/java/com/ruoyi/home/controller/HomeController.java
@@ -26,7 +26,7 @@
* @date : 2025/7/25 9:15
*/
@RestController
-@Api(tags = "棣栭〉缁熻")
+@Api(tags = "缁熻")
@RequestMapping("/home")
public class HomeController extends BaseController {
@@ -321,4 +321,108 @@
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());
+ }
+
+ @GetMapping("/planTrends")
+ @ApiOperation("棣栭〉-璁″垝涓庣敓浜ц秼鍔�")
+ public AjaxResult planTrends(@DefaultType Integer type) {
+ List<PlanTrendsDto> list = homeService.planTrends(type);
+ return AjaxResult.success(list);
+ }
+
}
--
Gitblit v1.9.3