JTDisplayScreenController.java 3.8 KB
package com.skua.modules.threedimensional.controller;

import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.modules.threedimensional.service.IJTDisplayScreenService;
import com.skua.modules.threedimensional.vo.*;
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.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@Api(tags = "对外展示集团大屏")
@RestController
@RequestMapping("/jtDisplayscreendata")
public class JTDisplayScreenController {
    @Autowired
    private IJTDisplayScreenService displayScreenService ;

    @AutoLog(value = "厂站地图列表")
    @ApiOperation(value = "厂长地图列表", notes = "厂长地图列表")
    @GetMapping(value = "/factoryList")
    public Result<List<SysFactoryInfoVO>> factoryList() {
        Result<List<SysFactoryInfoVO>> result = new Result<>();
        List<SysFactoryInfoVO> list = displayScreenService.getFactoryList();
        result.setResult(list);
        return result;
    }


    //
    @AutoLog(value = "项目运营情况")
    @ApiOperation(value = "项目运营情况", notes = "项目运营情况")
    @GetMapping("/projectOperationInfo")
    private Result<ProjectOperationInfoVO> getProjectOperationInfo(String departId, String startTime, String endTime){
        Result<ProjectOperationInfoVO> result = new Result<>();
        ProjectOperationInfoVO  projectOperationInfoVO =  displayScreenService.getProjectOperationInfo(departId ,startTime ,endTime);
        result.setResult(projectOperationInfoVO);
        return result;
    }
    @AutoLog(value = "水量趋势")
    @ApiOperation(value = "水量趋势", notes = "水量趋势")
    @GetMapping("/waterTrend")
    private Result<List<WaterTrendVO>> waterTrend(String departId, String startTime, String endTime){
        Result<List<WaterTrendVO>> result = new Result<>();
        List<WaterTrendVO>  list =  displayScreenService.queryWaterTrend(departId ,startTime ,endTime);
        result.setResult(list);
        return result;
    }
    @AutoLog(value = "水质水量:左侧统计数据")
    @ApiOperation(value = "水质水量:左侧统计数据", notes = "水质水量:左侧统计数据")
    @GetMapping("/waterQuality")
    private Result<WaterQualityVO> waterQuality(String departId, String startTime, String endTime){
        Result<WaterQualityVO> result = new Result<>();
        WaterQualityVO  waterQualityVO =  displayScreenService.queryWaterQuality(departId ,startTime ,endTime);
        result.setResult(waterQualityVO);
        return result;
    }
    @AutoLog(value = "水质水量:右侧图表")
    @ApiOperation(value = "水质水量:右侧图表", notes = "水质水量:右侧图表")
    @GetMapping("/waterQualityCchart")
    private Result<List<WaterQualityChartVO>> waterQualityCchart(String departId, String startTime, String endTime){
        Result<List<WaterQualityChartVO>> result = new Result<>();
        List<WaterQualityChartVO>  waterTrendVOList =  displayScreenService.queryWaterQualityChart(departId ,startTime ,endTime);
        result.setResult(waterTrendVOList);
        return result;
    }

    //生态效益
    @AutoLog(value = "生态效益")
    @ApiOperation(value = "生态效益", notes = "生态效益")
    @GetMapping("/ecologyBenefit")
    private Result<EcologyBenefitVO> ecologyBenefit(String departId, String startTime, String endTime){
        Result<EcologyBenefitVO> result = new Result<>();
        EcologyBenefitVO  data =  displayScreenService.ecologyBenefit(departId ,startTime ,endTime);
        result.setResult(data);
        return result;
    }
}