z1415143022
2025-04-11 c95af62539744af5c622f91c9b4668b117211032
zhitan-admin/src/main/java/com/zhitan/web/controller/homepage/HomePageController.java
@@ -16,7 +16,7 @@
/**
 * HomePageController
 *
 * @author hmj
 * @author ZhiTan
 * @date 2024-10-08
 */
@RestController
@@ -26,33 +26,31 @@
    @Autowired
    public IHomePageService homepageService;
   /**
    * @description:  全厂能耗统计
    */
   @GetMapping("/energyConsumptionSummation")
   public AjaxResult energyConsumptionSummation(String timeType) {
       try {
           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 = "COMPREHENSIVE_CODE";
            return AjaxResult.success(homepageService.energyConsumptionSummation(timeType, modelcode));
        } catch (Exception ex) {
            logger.error("获取出错!", ex);
            return AjaxResult.error("获取出错!");
        }
    }
    /**
     * @description: 能耗趋势
     * @param timeType
     * @return
     * @author: hmj
     * @author ZhiTan
     * @date: 2024/10/8 13:41
     */
    @GetMapping("/energyConsumptionTrend")
    public AjaxResult energyConsumptionTrend(String timeType) {
        try {
            String modelcode = "COMPREHENSIVE_CODE";
            HomeEnergyConsumptionTrendVO vo = homepageService.energyConsumptionTrend(timeType,modelcode);
            HomeEnergyConsumptionTrendVO vo = homepageService.energyConsumptionTrend(timeType, modelcode);
            return AjaxResult.success(vo);
        } catch (Exception ex) {
@@ -63,16 +61,14 @@
    /**
     * @description: 科室能耗排名
     * @param timeType
     * @return
     * @author: hmj
     * @author ZhiTan
     * @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);
            List<RankingEnergyData> consumptionAnalysisVO = homepageService.energyConsumptionRanking(modelcode, timeType);
            return AjaxResult.success(consumptionAnalysisVO);
        } catch (Exception ex) {
            logger.error("获取出错!", ex);
@@ -82,17 +78,14 @@
    /**
     * @description: 峰平谷占比
     * @param timeType
     * @return
     * @author: hmj
     * @author ZhiTan
     * @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);
            List<HomePeakValleyVO> vo = homepageService.peakValley(timeType, modelcode);
            return AjaxResult.success(vo);
        } catch (Exception ex) {
            logger.error("获取出错!", ex);