HomePageController.java 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. package com.jiayue.biz.controller;
  2. import com.jiayue.biz.service.*;
  3. import com.jiayue.common.core.controller.BaseController;
  4. import com.jiayue.common.core.domain.AjaxResult;
  5. import io.swagger.annotations.ApiImplicitParam;
  6. import io.swagger.annotations.ApiImplicitParams;
  7. import io.swagger.annotations.ApiOperation;
  8. import lombok.RequiredArgsConstructor;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.web.bind.annotation.*;
  11. /**
  12. * 首页Controller
  13. *
  14. * @author L.ym
  15. * @date 2022-05-11
  16. */
  17. @RequiredArgsConstructor(onConstructor_ = @Autowired)
  18. @RestController
  19. @RequestMapping("/dataQuery/homePage")
  20. public class HomePageController extends BaseController {
  21. private final HomePageService homePageService;
  22. /**
  23. * 首页风速曲线
  24. */
  25. @GetMapping("/windChats")
  26. public AjaxResult homePageCharts(String equipmentId, String month) {
  27. return AjaxResult.success(homePageService.homePageCharts(equipmentId, month));
  28. }
  29. /**
  30. * 首页风向玫瑰图
  31. */
  32. @GetMapping("/roseChats")
  33. public AjaxResult homePageRose(String equipmentId, String height, String month) {
  34. return AjaxResult.success(homePageService.homePageRose(equipmentId, height, month));
  35. }
  36. /**
  37. * 首页风功率密度与风速(柱状图)
  38. */
  39. @GetMapping("/getWsAndWpdForHeight")
  40. public AjaxResult getWsAndWpdForHeight(String equipmentId, String month) {
  41. return AjaxResult.success(homePageService.getWsAndWpdForHeight(equipmentId, month));
  42. }
  43. // /**
  44. // * 首页风速占比以及平均风速
  45. // */
  46. // @GetMapping("/getHeightForAveWs")
  47. // public AjaxResult getHeightForAveWs(String equipmentId, String height) {
  48. // return AjaxResult.success(homePageService.getHeightForAveWs(equipmentId, height));
  49. // }
  50. /**
  51. * 首页空气密度、温度、压强平均值
  52. */
  53. @GetMapping("/selectTForAir")
  54. public AjaxResult selectTForAir(String equipmentId, String month) {
  55. return AjaxResult.success(homePageService.getAirAndPaAndT(equipmentId, month));
  56. }
  57. /**
  58. * 首页地图
  59. */
  60. @GetMapping("/homePageMap")
  61. public AjaxResult homePageMap() {
  62. return AjaxResult.success(homePageService.homePageMap());
  63. }
  64. /**
  65. * 首页所有塔地图
  66. */
  67. @GetMapping("/homePageAllWindMap")
  68. public AjaxResult homePageAllWindMap() {
  69. return AjaxResult.success(homePageService.homePageAllWindMap());
  70. }
  71. @ApiOperation(value = "首页文字", notes = "首页文字")
  72. @ApiImplicitParams({})
  73. @GetMapping("/provincialEnergyInfo")
  74. public AjaxResult provincialEnergy() {
  75. return AjaxResult.success(homePageService.getResourcesOverview());
  76. }
  77. @ApiOperation(value = "全省资源数据", notes = "全省资源数据")
  78. @ApiImplicitParams({})
  79. @GetMapping("/hauFuInfo")
  80. public AjaxResult hauFuInfo() {
  81. return AjaxResult.success(homePageService.getProvincialEnergyStations());
  82. }
  83. @ApiOperation(value = "华富前期信息", notes = "华富前期查询")
  84. @ApiImplicitParams({})
  85. @GetMapping("/projectInfo")
  86. public AjaxResult projectInfo() {
  87. return AjaxResult.success(homePageService.getProjectSort());
  88. }
  89. @ApiOperation(value = "前期项目塔坐标以及周边风机坐标", notes = "前期项目塔坐标以及周边风机坐标查询")
  90. @ApiImplicitParams({
  91. @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataType = "String"),
  92. })
  93. @GetMapping("/projectMapInfo")
  94. public AjaxResult projectMapInfo(String projectId) {
  95. return AjaxResult.success(homePageService.projectMapInfo(projectId));
  96. }
  97. @ApiOperation(value = "所有项目下拉框", notes = "所有项目下拉框查询")
  98. @ApiImplicitParams({
  99. })
  100. @GetMapping("/projectSelect")
  101. public AjaxResult projectSelect() {
  102. return AjaxResult.success(homePageService.projectSelect());
  103. }
  104. @ApiOperation(value = "项目进展情况", notes = "查询项目进展情况")
  105. @ApiImplicitParams({
  106. @ApiImplicitParam(name = "项目编号", value = "projectId", paramType = "query", dataType = "String"),
  107. })
  108. @GetMapping("/projectEvolve")
  109. public AjaxResult projectEvolve(String projectId) {
  110. return AjaxResult.success(homePageService.getProjectEvolve(projectId));
  111. }
  112. @ApiOperation(value = "场站总体信息", notes = "查询场站总体信息")
  113. @ApiImplicitParams({
  114. })
  115. @GetMapping("/stationTotalityInfo")
  116. public AjaxResult stationTotalityInfo() {
  117. return AjaxResult.success(homePageService.getStationTotalityInfo());
  118. }
  119. @ApiOperation(value = "场站信息(杨总数据)", notes = "计算风机台数、风机机型、风机点位坐标、塔坐标")
  120. @ApiImplicitParams({
  121. @ApiImplicitParam(name = "场站id", value = "stationId", paramType = "query", dataType = "String"),
  122. })
  123. @GetMapping("/stationInfo")
  124. public AjaxResult stationInfo(String stationId) {
  125. // ----{杨总数据},计算风机台数、风机机型、风机点位坐标、塔坐标
  126. return AjaxResult.success(homePageService.getStationInfo(stationId));
  127. }
  128. @ApiOperation(value = "场站下拉框", notes = "获取场站信息下拉框")
  129. @ApiImplicitParams({
  130. })
  131. @GetMapping("/stationSelect")
  132. public AjaxResult stationSelect() {
  133. return AjaxResult.success(homePageService.stationSelect());
  134. }
  135. //地图点位坐标 (风机、测风塔、拐点)
  136. @GetMapping("/getPointMap")
  137. public AjaxResult getPointMap(){
  138. return AjaxResult.success(homePageService.getPointMap());
  139. }
  140. //查询所有的场站坐标
  141. @GetMapping("/getStationSeat")
  142. public AjaxResult getStationSeat(){
  143. return AjaxResult.success(homePageService.getStationSeat());
  144. }
  145. //查询所有的项目坐标
  146. @GetMapping("/getProjectSeat")
  147. public AjaxResult getProjectSeat(){
  148. return AjaxResult.success(homePageService.getProjectSeat());
  149. }
  150. }