123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- package com.jiayue.biz.controller;
- import com.jiayue.biz.domain.ProjectBasicInfo;
- import com.jiayue.biz.domain.ProjectInfo;
- import com.jiayue.biz.domain.ProvincialEnergyStations;
- import com.jiayue.biz.domain.TotalityInfo;
- import com.jiayue.biz.service.*;
- import com.jiayue.common.core.controller.BaseController;
- import com.jiayue.common.core.domain.AjaxResult;
- import io.swagger.annotations.ApiImplicitParam;
- import io.swagger.annotations.ApiImplicitParams;
- import io.swagger.annotations.ApiOperation;
- import lombok.RequiredArgsConstructor;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.util.ArrayList;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- import java.util.stream.Collectors;
- /**
- * 首页Controller
- *
- * @author L.ym
- * @date 2022-05-11
- */
- @RequiredArgsConstructor(onConstructor_ = @Autowired)
- @RestController
- @RequestMapping("/dataQuery/homePage")
- public class HomePageController extends BaseController {
- private final HomePageService homePageService;
- /**
- * 首页风速曲线
- */
- @GetMapping("/windChats")
- public AjaxResult homePageCharts(String equipmentId, String month) {
- return AjaxResult.success(homePageService.homePageCharts(equipmentId, month));
- }
- /**
- * 首页风向玫瑰图
- */
- @GetMapping("/roseChats")
- public AjaxResult homePageRose(String equipmentId, String height, String month) {
- return AjaxResult.success(homePageService.homePageRose(equipmentId, height, month));
- }
- /**
- * 首页风功率密度与风速
- */
- @GetMapping("/selectWpdAndWs")
- public AjaxResult selectWpdAndWs(String equipmentId) {
- return AjaxResult.success(homePageService.selectWpdAndWs(equipmentId));
- }
- /**
- * 首页风功率密度与风速(柱状图)
- */
- @GetMapping("/getWsAndWpdForHeight")
- public AjaxResult getWsAndWpdForHeight(String equipmentId, String month) {
- return AjaxResult.success(homePageService.getWsAndWpdForHeight(equipmentId, month));
- }
- /**
- * 首页风速占比以及平均风速
- */
- @GetMapping("/getHeightForAveWs")
- public AjaxResult getHeightForAveWs(String equipmentId, String height) {
- return AjaxResult.success(homePageService.getHeightForAveWs(equipmentId, height));
- }
- /**
- * 首页空气密度、温度、压强平均值
- */
- @GetMapping("/selectTForAir")
- public AjaxResult selectTForAir(String equipmentId, String month) {
- return AjaxResult.success(homePageService.getAirAndPaAndT(equipmentId, month));
- }
- /**
- * 首页地图
- */
- @GetMapping("/homePageMap")
- public AjaxResult homePageMap() {
- return AjaxResult.success(homePageService.homePageMap());
- }
- /**
- * 首页所有塔地图
- */
- @GetMapping("/homePageAllWindMap")
- public AjaxResult homePageAllWindMap() {
- return AjaxResult.success(homePageService.homePageAllWindMap());
- }
- @ApiOperation(value = "首页文字", notes = "首页文字")
- @ApiImplicitParams({})
- @GetMapping("/provincialEnergyInfo")
- public AjaxResult provincialEnergy() {
- // resourcesOverview: '黑龙江处于高纬度地区,日照强度较大,太阳能转换率较高,为开发太阳能源提供了有理条件。特别是大兴安岭一带常年受到东亚西风带影响,具有风速大,气候干燥特点,与同维度地图相比,风资源更丰富,利于风能资源的开发与利用。'
- //全省场站坐标、信息
- // provinceInfo:{//全省信息
- // fNum:'100',
- // fHours:'2496h',
- // gNum:'41',
- // gHours:'1620h'
- // }
- return AjaxResult.success(homePageService.getResourcesOverview());
- }
- @ApiOperation(value = "全省资源数据", notes = "全省资源数据")
- @ApiImplicitParams({})
- @GetMapping("/hauFuInfo")
- public AjaxResult hauFuInfo() {
- return AjaxResult.success(homePageService.getProvincialEnergyStations());
- }
- @ApiOperation(value = "华富前期信息", notes = "华富前期查询")
- @ApiImplicitParams({})
- @GetMapping("/projectInfo")
- public AjaxResult projectInfo() {
- return AjaxResult.success(homePageService.getProjectSort());
- }
- //TODO 参数不一定
- @ApiOperation(value = "前期项目塔坐标以及周边风机坐标", notes = "前期项目塔坐标以及周边风机坐标查询")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataType = "String"),
- })
- @GetMapping("/projectMapInfo")
- public AjaxResult projectMapInfo(String projectId) {
- return AjaxResult.success(homePageService.projectMapInfo(projectId));
- }
- @ApiOperation(value = "所有项目下拉框", notes = "所有项目下拉框查询")
- @ApiImplicitParams({
- })
- @GetMapping("/projectSelect")
- public AjaxResult projectSelect() {
- return AjaxResult.success(homePageService.projectSelect());
- }
- @ApiOperation(value = "项目进展情况", notes = "查询项目进展情况")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "项目编号", value = "projectId", paramType = "query", dataType = "String"),
- })
- @GetMapping("/projectEvolve")
- public AjaxResult projectEvolve(String projectId) {
- return AjaxResult.success(homePageService.getProjectEvolve(projectId));
- }
- @ApiOperation(value = "场站总体信息", notes = "查询场站总体信息")
- @ApiImplicitParams({
- })
- @GetMapping("/stationTotalityInfo")
- public AjaxResult stationTotalityInfo() {
- return AjaxResult.success(homePageService.getStationTotalityInfo());
- }
- @ApiOperation(value = "场站信息(杨总数据)", notes = "计算风机台数、风机机型、风机点位坐标、塔坐标")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "场站id", value = "stationId", paramType = "query", dataType = "String"),
- })
- @GetMapping("/stationInfo")
- public AjaxResult stationInfo(String stationId) {
- // ----{杨总数据},计算风机台数、风机机型、风机点位坐标、塔坐标
- return AjaxResult.success(homePageService.getStationInfo(stationId));
- }
- @ApiOperation(value = "场站下拉框", notes = "获取场站信息下拉框")
- @ApiImplicitParams({
- })
- @GetMapping("/api/stationSelect")
- public AjaxResult stationSelect() {
- // label: 依兰四期
- // value : 项目id
- // towerInfo:[{label:‘依兰四起06171’value:‘006171’},{label:value}]
- return AjaxResult.success();
- }
- }
|