baoshiwei
2025-05-06 8dd7af51db4cf768fbf92002b5b62f7fb9d1c929
zhitan-admin/src/main/java/com/zhitan/web/controller/homepage/HomePageController.java
@@ -25,38 +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";
           String modelcode = "COMPREHENSIVE_CODE";
           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 = "COMPREHENSIVE_CODE";
            HomeEnergyConsumptionTrendVO vo = homepageService.energyConsumptionTrend(timeType,modelcode);
            String modelcode = "LBJT";
            HomeEnergyConsumptionTrendVO vo = homepageService.energyConsumptionTrend(timeType, modelcode);
            return AjaxResult.success(vo);
        } catch (Exception ex) {
@@ -67,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 = "COMPREHENSIVE_CODE";
            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);
@@ -86,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 = "COMPREHENSIVE_CODE";
            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);