From 8dd7af51db4cf768fbf92002b5b62f7fb9d1c929 Mon Sep 17 00:00:00 2001 From: baoshiwei <baoshiwei@shlanbao.cn> Date: 星期二, 06 五月 2025 15:04:59 +0800 Subject: [PATCH] refactor(zhitan):调整模型代码和优化能源统计功能 --- zhitan-admin/src/main/java/com/zhitan/web/controller/homepage/HomePageController.java | 50 ++++++++++++++++++++------------------------------ 1 files changed, 20 insertions(+), 30 deletions(-) diff --git a/zhitan-admin/src/main/java/com/zhitan/web/controller/homepage/HomePageController.java b/zhitan-admin/src/main/java/com/zhitan/web/controller/homepage/HomePageController.java index ec027ed..82ccfa6 100644 --- a/zhitan-admin/src/main/java/com/zhitan/web/controller/homepage/HomePageController.java +++ b/zhitan-admin/src/main/java/com/zhitan/web/controller/homepage/HomePageController.java @@ -25,37 +25,32 @@ @Autowired public IHomePageService homepageService; - /** - * @description: 鍏ㄥ巶鑳借�楃粺璁� - * @param timeType - * @return - * @author: hmj - * @date: 2024/10/8 13:41 - */ - @GetMapping("/energyConsumptionSummation") - public AjaxResult energyConsumptionSummation(String timeType) { - try { - String modelcode = "Composite_Indicators"; - return AjaxResult.success(homepageService.energyConsumptionSummation(timeType,modelcode)); - } catch (Exception ex) { - logger.error("鑾峰彇鍑洪敊锛�", ex); - return AjaxResult.error("鑾峰彇鍑洪敊!"); - } - } + + /** + * @description: 鍏ㄥ巶鑳借�楃粺璁� + */ + @GetMapping("/energyConsumptionSummation") + public AjaxResult energyConsumptionSummation(String timeType) { + try { + String modelcode = "LBJT"; + return AjaxResult.success(homepageService.energyConsumptionSummation(timeType, modelcode)); + } catch (Exception ex) { + logger.error("鑾峰彇鍑洪敊锛�", ex); + return AjaxResult.error("鑾峰彇鍑洪敊!"); + } + } /** * @description: 鑳借�楄秼鍔� - * @param timeType - * @return * @author: hmj * @date: 2024/10/8 13:41 */ @GetMapping("/energyConsumptionTrend") public AjaxResult energyConsumptionTrend(String timeType) { try { - String modelcode = "Composite_Indicators"; - HomeEnergyConsumptionTrendVO vo = homepageService.energyConsumptionTrend(timeType,modelcode); + String modelcode = "LBJT"; + HomeEnergyConsumptionTrendVO vo = homepageService.energyConsumptionTrend(timeType, modelcode); return AjaxResult.success(vo); } catch (Exception ex) { @@ -66,16 +61,14 @@ /** * @description: 绉戝鑳借�楁帓鍚� - * @param timeType - * @return * @author: hmj * @date: 2024/10/8 13:41 */ @GetMapping("/energyConsumptionRanking") public AjaxResult energyConsumptionRanking(String timeType) { try { - String modelcode = "Composite_Indicators"; - List<RankingEnergyData> consumptionAnalysisVO = homepageService.energyConsumptionRanking(modelcode,timeType); + String modelcode = "LBJT"; + List<RankingEnergyData> consumptionAnalysisVO = homepageService.energyConsumptionRanking(modelcode, timeType); return AjaxResult.success(consumptionAnalysisVO); } catch (Exception ex) { logger.error("鑾峰彇鍑洪敊锛�", ex); @@ -85,17 +78,14 @@ /** * @description: 宄板钩璋峰崰姣� - * @param timeType - * @return * @author: hmj * @date: 2024/10/8 13:41 */ @GetMapping("/peakValley") public AjaxResult peakValley(String timeType) { try { -// String modelcode = "Composite_Indicators"; - String modelcode = "PEAK_VALLEY"; - List<HomePeakValleyVO> vo = homepageService.peakValley(timeType,modelcode); + String modelcode = "LBJT"; + List<HomePeakValleyVO> vo = homepageService.peakValley(timeType, modelcode); return AjaxResult.success(vo); } catch (Exception ex) { logger.error("鑾峰彇鍑洪敊锛�", ex); -- Gitblit v1.9.3