package com.project.zcustom.controller.backManager.building;


import com.project.zcustom.controller.core.AjaxResult;
import com.project.zcustom.controller.core.BaseController;
import com.project.zcustom.service.service.smart.IPlatBuildingService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/large/first")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class PlatBuildOfficeController extends BaseController {

    @Autowired
    private IPlatBuildingService platBuildingService;

    /**
     * 近一月楼宇能耗信息
     */
    @GetMapping("/powerAndWaterMonth")
    public AjaxResult getPowerAndWaterMonth() {
        return AjaxResult.success("查询成功", platBuildingService.getPowerAndWaterMonth());
    }

    /**
     * 空气概况
     */
    @GetMapping("/air")
    public AjaxResult getAirCondition() {
        return AjaxResult.success("查询成功", platBuildingService.getAirCondition());
    }

    /**
     * 定额指标
     */
    @GetMapping("/getTarget")
    public AjaxResult getTarget() {
        return AjaxResult.success("查询成功", platBuildingService.getTarget());
    }

    /**
     * 用电分项
     */
    @GetMapping("/useElectricity")
    public AjaxResult useElectricity() {
        return AjaxResult.success("查询成功", platBuildingService.useElectricity());
    }

    /**
     * 绿电比例
     */
    @GetMapping("/greenElectricity")
    public AjaxResult greenElectricity() {
        return AjaxResult.success("查询成功", platBuildingService.greenElectricity());
    }

    /**
     * 碳排放量月度变化趋势图
     */
    @GetMapping("/carbon")
    public AjaxResult carbon() {
        return AjaxResult.success("查询成功", platBuildingService.carbon());
    }

    /**
     * 年度累计综合能粍
     */
    @GetMapping("/energyYear")
    public AjaxResult energyYear() {
        return AjaxResult.success("查询成功", platBuildingService.energyYear());
    }

    /**
     * 年度累计综合电粍
     */
    @GetMapping("/powerYear")
    public AjaxResult powerYear() {
        return AjaxResult.success("查询成功", platBuildingService.powerYear());
    }

    /**
     * 年度累计综合水粍
     */
    @GetMapping("/waterYear")
    public AjaxResult waterYear() {
        return AjaxResult.success("查询成功", platBuildingService.waterYear());
    }

}
