PowerConsumptionAnalysisController.java 4.3 KB
package com.skua.modules.equipment.controller;


import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.modules.equipment.service.IPowerConsumptionAnalysisService;
import com.skua.modules.equipment.vo.AnysisParamsVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


@Slf4j
@Api(tags = "电耗分析")
@RestController
@RequestMapping("/power/consumption/analysis")
public class PowerConsumptionAnalysisController {

    @Autowired
    private IPowerConsumptionAnalysisService powerConsumptionAnalysisService;


    @AutoLog(value = "数据展示")
    @ApiOperation(value = "数据展示", notes = "数据展示")
    @RequestMapping(value = "/data/display", method = RequestMethod.GET)
    public Result<Map<String, Object>> dataDisplay(AnysisParamsVO anysisParamsVO) {
        Result<Map<String, Object>> result = new Result<>();
        Map<String, Object> data = powerConsumptionAnalysisService.dataDisplay(anysisParamsVO);
        result.setResult(data);
        result.setSuccess(true);
        return result;
    }

    @AutoLog(value = "电耗趋势")
    @ApiOperation(value = "电耗趋势", notes = "电耗趋势")
    @RequestMapping(value = "/power/consumption/trend", method = RequestMethod.GET)
    public Result<Map<String, Object>> powerConsumptionTrend(AnysisParamsVO anysisParamsVO) {
        Result<Map<String, Object>> result = new Result<>();
        Map<String, Object> data = powerConsumptionAnalysisService.powerConsumptionTrend(anysisParamsVO);
        result.setResult(data);
        result.setSuccess(true);
        return result;
    }

    @AutoLog(value = "吨水电耗趋势")
    @ApiOperation(value = "吨水电耗趋势", notes = "吨水电耗趋势")
    @RequestMapping(value = "/ton/of/water/trend", method = RequestMethod.GET)
    public Result<Map<String, Object>> tonOfWaterTrend(AnysisParamsVO anysisParamsVO) {
        Result<Map<String, Object>> result = new Result<>();
        Map<String, Object> data = powerConsumptionAnalysisService.tonOfWaterTrend(anysisParamsVO);
        result.setResult(data);
        result.setSuccess(true);
        return result;
    }

    @AutoLog(value = "吨水电耗与负荷率对比")
    @ApiOperation(value = "吨水电耗与负荷率对比", notes = "吨水电耗与负荷率对比")
    @RequestMapping(value = "/tonOfWaterAndLoadRate", method = RequestMethod.GET)
    public Result<Map<String, Object>> tonOfWaterAndLoadRate(AnysisParamsVO anysisParamsVO) throws Exception{
        Result<Map<String, Object>> result = new Result<>();
        Map<String, Object> data = powerConsumptionAnalysisService.tonOfWaterAndLoadRate(anysisParamsVO);
        result.setResult(data);
        result.setSuccess(true);
        return result;
    }

    @AutoLog(value = "吨水电耗与污染物浓度")
    @ApiOperation(value = "吨水电耗与污染物浓度", notes = "吨水电耗与污染物浓度")
    @RequestMapping(value = "/tonOfWaterAndPollutantConcentration", method = RequestMethod.GET)
    public Result<Map<String, Object>> tonOfWaterAndPollutantConcentration(AnysisParamsVO anysisParamsVO) throws Exception{
        Result<Map<String, Object>> result = new Result<>();
        Map<String, Object> data = powerConsumptionAnalysisService.tonOfWaterAndPollutantConcentration(anysisParamsVO);
        result.setResult(data);
        result.setSuccess(true);
        return result;
    }

    @AutoLog(value = "吨水电耗与污染物去除率对比")
    @ApiOperation(value = "吨水电耗与污染物去除率对比", notes = "吨水电耗与污染物去除率对比")
    @RequestMapping(value = "/tonOfWaterAndPollutantRemovalRate", method = RequestMethod.GET)
    public Result<Map<String, Object>> tonOfWaterAndPollutantRemovalRate(AnysisParamsVO anysisParamsVO) throws Exception{
        Result<Map<String, Object>> result = new Result<>();
        Map<String, Object> data = powerConsumptionAnalysisService.tonOfWaterAndPollutantRemovalRate(anysisParamsVO);
        result.setResult(data);
        result.setSuccess(true);
        return result;
    }
}