|
@@ -1,181 +0,0 @@
|
|
|
-package com.project.zcustom.controller.build;
|
|
|
-
|
|
|
-import com.project.common.core.controller.BaseController;
|
|
|
-import com.project.common.core.domain.AjaxResult;
|
|
|
-import com.project.zcustom.domain.basics.PlatAppOrg;
|
|
|
-import com.project.zcustom.service.basics.IPlatAppOrgService;
|
|
|
-import com.project.zcustom.service.build.IPlatBuildParamsService;
|
|
|
-import com.project.zcustom.service.build.IPlatBuildYearTrendService;
|
|
|
-import com.project.zcustom.tools.DataTools;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import lombok.RequiredArgsConstructor;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
-
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-/**
|
|
|
- * 楼宇接口Controller
|
|
|
- *
|
|
|
- * @author change
|
|
|
- * @date 2024-10-21
|
|
|
- */
|
|
|
-@Api(tags = "楼宇接口")
|
|
|
-@RestController
|
|
|
-@RequestMapping("/large/build")
|
|
|
-@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
|
-public class PlatBuildController extends BaseController {
|
|
|
-
|
|
|
- private final DataTools dataTools;
|
|
|
- private final IPlatBuildYearTrendService iPlatBuildYearTrendService;
|
|
|
- private final IPlatBuildParamsService iPlatBuildParamsService;
|
|
|
- private final IPlatAppOrgService iPlatAppOrgService;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- @ApiOperation("碳排放量月度变化趋势图 折线图")
|
|
|
- @RequestMapping("/carbonEmissionStatistics")
|
|
|
- public AjaxResult carbonEmissionStatistics() {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildYearTrendService.getLineStatisticsYearTrendData(0));
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("月用电量信息 柱形图")
|
|
|
- @RequestMapping("/powerForMonth")
|
|
|
- public AjaxResult powerForMonth() {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildParamsService.powerForMonth());
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("年度累计综合能耗")
|
|
|
- @RequestMapping("/energyForYear")
|
|
|
- public AjaxResult energyForYear() {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildParamsService.energyForYear());
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("年度累计综合能耗变化趋势图 折线图")
|
|
|
- @RequestMapping("/energyStatistics")
|
|
|
- public AjaxResult energyStatistics() {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildYearTrendService.getLineStatisticsYearTrendData(1));
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("楼宇月用水电热信息")
|
|
|
- @RequestMapping("/useHeatGas")
|
|
|
- public AjaxResult useHeatGas(@RequestParam String appOrg) {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildParamsService.useHeatGas(appOrg));
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("数据中心机房信息")
|
|
|
- @RequestMapping("/dataCenterRoom")
|
|
|
- public AjaxResult dataCenterRoom(@RequestParam String appOrg) {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildParamsService.dataCenterRoom(appOrg));
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("年度累计电耗")
|
|
|
- @RequestMapping("/powerForYear")
|
|
|
- public AjaxResult powerForYear() {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildParamsService.powerForYear());
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("年度电耗趋势变化趋势图 折线图")
|
|
|
- @RequestMapping("/electricityStatistics")
|
|
|
- public AjaxResult electricityStatistics() {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildYearTrendService.getLineStatisticsYearTrendData(2));
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("供暖能耗信息")
|
|
|
- @RequestMapping("/heatingEnergy")
|
|
|
- public AjaxResult heatingEnergy(@RequestParam String appOrg) {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildParamsService.heatingEnergy(appOrg));
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("燃气用量信息")
|
|
|
- @RequestMapping("/gasInfo")
|
|
|
- public AjaxResult gasInfo(@RequestParam String appOrg) {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildParamsService.gasInfo(appOrg));
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("资源信息")
|
|
|
- @RequestMapping("/resourceInfo")
|
|
|
- public AjaxResult resourceInfo(@RequestParam String appOrg) {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildParamsService.resourceInfo(appOrg));
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("可再生电力信息")
|
|
|
- @RequestMapping("/greenPowerInfo")
|
|
|
- public AjaxResult greenPowerInfo(@RequestParam String appOrg) {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildParamsService.greenPowerInfo(appOrg));
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("年度累计水耗")
|
|
|
- @RequestMapping("/waterForYear")
|
|
|
- public AjaxResult waterForYear() {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildParamsService.waterForYear());
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("年度累计水耗趋势变化趋势图 折线图")
|
|
|
- @RequestMapping("/waterStatistics")
|
|
|
- public AjaxResult waterStatistics() {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildYearTrendService.getLineStatisticsYearTrendData(3));
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("办公碳排放情况")
|
|
|
- @RequestMapping("/officeCarbonForYear")
|
|
|
- public AjaxResult officeCarbonForYear() {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildParamsService.officeCarbonForYear());
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("年度累计非供暖能耗")
|
|
|
- @RequestMapping("/nonHeatingEnergyForYear")
|
|
|
- public AjaxResult nonHeatingEnergyForYear() {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildParamsService.nonHeatingEnergyForYear());
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("年度非供暖能耗趋势变化趋势图 折线图")
|
|
|
- @RequestMapping("/usePowerStatistics")
|
|
|
- public AjaxResult usePowerStatistics() {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildYearTrendService.getLineStatisticsYearTrendData(4));
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("各单位年度累计办公碳排放量统计 折线图")
|
|
|
- @RequestMapping("/officeCarbonForFloor")
|
|
|
- public AjaxResult officeCarbonForFloor() {
|
|
|
- return AjaxResult.success("查询成功", iPlatBuildParamsService.selectPlatBuildParamsListByField("type","12"));
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-// @ApiOperation("接口测试")
|
|
|
-// @RequestMapping("/testApi")
|
|
|
-// public AjaxResult testApi() {
|
|
|
-// synchronized (this) {
|
|
|
-//// dataTools.getPowerStatisticsData();
|
|
|
-//
|
|
|
-// logger.info("开始获取接口数据");
|
|
|
-// dataTools.getEnergyData();
|
|
|
-// dataTools.getEnergyStatisticsData();
|
|
|
-// dataTools.getElectricityStatisticsData();
|
|
|
-// dataTools.getWaterData();
|
|
|
-// dataTools.getWaterStatisticsData();
|
|
|
-// dataTools.getDataCenterRoom();
|
|
|
-// dataTools.getPowerForMonth();
|
|
|
-// dataTools.getOfficeCarbon();
|
|
|
-// dataTools.getUseHeatGas();
|
|
|
-// dataTools.getCarbonData("10001");
|
|
|
-// dataTools.getNonHeatingData("10001");
|
|
|
-// dataTools.getUsePowerStatistics("10001");
|
|
|
-// dataTools.getHeatingEnergy("10001");
|
|
|
-// dataTools.getGasInfo("10001");
|
|
|
-// dataTools.getResourceInfo("10001");
|
|
|
-// dataTools.getGreenPowerInfo("10001");
|
|
|
-// dataTools.getOfficeCarbonForYear("10001");
|
|
|
-//// List<PlatAppOrg> platAppOrgList = iPlatAppOrgService.selectPlatAppOrgList(new PlatAppOrg());
|
|
|
-//// if(!platAppOrgList.isEmpty()){
|
|
|
-//// for (PlatAppOrg platAppOrg : platAppOrgList){
|
|
|
-////
|
|
|
-//// }
|
|
|
-//// }
|
|
|
-// logger.info("获取接口数据完成");
|
|
|
-// }
|
|
|
-// return AjaxResult.success("查询成功", 1);
|
|
|
-// }
|
|
|
-
|
|
|
-}
|