package com.jiayue.biz.controller; 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.*; /** * 首页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("/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() { 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()); } @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("/stationSelect") public AjaxResult stationSelect() { return AjaxResult.success(homePageService.stationSelect()); } //地图点位坐标 (风机、测风塔、拐点) @GetMapping("/getPointMap") public AjaxResult getPointMap(){ return AjaxResult.success(homePageService.getPointMap()); } //查询所有的场站坐标 @GetMapping("/getStationSeat") public AjaxResult getStationSeat(){ return AjaxResult.success(homePageService.getStationSeat()); } //查询所有的项目坐标 @GetMapping("/getProjectSeat") public AjaxResult getProjectSeat(){ return AjaxResult.success(homePageService.getProjectSeat()); } }