HomePageController.java 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. package com.jiayue.biz.controller;
  2. import com.jiayue.biz.domain.ProjectBasicInfo;
  3. import com.jiayue.biz.domain.ProjectInfo;
  4. import com.jiayue.biz.domain.ProvincialEnergyStations;
  5. import com.jiayue.biz.domain.TotalityInfo;
  6. import com.jiayue.biz.service.*;
  7. import com.jiayue.common.core.controller.BaseController;
  8. import com.jiayue.common.core.domain.AjaxResult;
  9. import io.swagger.annotations.ApiImplicitParam;
  10. import io.swagger.annotations.ApiImplicitParams;
  11. import io.swagger.annotations.ApiOperation;
  12. import lombok.RequiredArgsConstructor;
  13. import org.springframework.beans.factory.annotation.Autowired;
  14. import org.springframework.web.bind.annotation.*;
  15. import java.util.ArrayList;
  16. import java.util.HashMap;
  17. import java.util.List;
  18. import java.util.Map;
  19. import java.util.stream.Collectors;
  20. /**
  21. * 首页Controller
  22. *
  23. * @author L.ym
  24. * @date 2022-05-11
  25. */
  26. @RequiredArgsConstructor(onConstructor_ = @Autowired)
  27. @RestController
  28. @RequestMapping("/dataQuery/homePage")
  29. public class HomePageController extends BaseController {
  30. private final HomePageService homePageService;
  31. /**
  32. * 首页风速曲线
  33. */
  34. @GetMapping("/windChats")
  35. public AjaxResult homePageCharts(String equipmentId, String month) {
  36. return AjaxResult.success(homePageService.homePageCharts(equipmentId, month));
  37. }
  38. /**
  39. * 首页风向玫瑰图
  40. */
  41. @GetMapping("/roseChats")
  42. public AjaxResult homePageRose(String equipmentId, String height, String month) {
  43. return AjaxResult.success(homePageService.homePageRose(equipmentId, height, month));
  44. }
  45. /**
  46. * 首页风功率密度与风速
  47. */
  48. @GetMapping("/selectWpdAndWs")
  49. public AjaxResult selectWpdAndWs(String equipmentId) {
  50. return AjaxResult.success(homePageService.selectWpdAndWs(equipmentId));
  51. }
  52. /**
  53. * 首页风功率密度与风速(柱状图)
  54. */
  55. @GetMapping("/getWsAndWpdForHeight")
  56. public AjaxResult getWsAndWpdForHeight(String equipmentId, String month) {
  57. return AjaxResult.success(homePageService.getWsAndWpdForHeight(equipmentId, month));
  58. }
  59. /**
  60. * 首页风速占比以及平均风速
  61. */
  62. @GetMapping("/getHeightForAveWs")
  63. public AjaxResult getHeightForAveWs(String equipmentId, String height) {
  64. return AjaxResult.success(homePageService.getHeightForAveWs(equipmentId, height));
  65. }
  66. /**
  67. * 首页空气密度、温度、压强平均值
  68. */
  69. @GetMapping("/selectTForAir")
  70. public AjaxResult selectTForAir(String equipmentId, String month) {
  71. return AjaxResult.success(homePageService.getAirAndPaAndT(equipmentId, month));
  72. }
  73. /**
  74. * 首页地图
  75. */
  76. @GetMapping("/homePageMap")
  77. public AjaxResult homePageMap() {
  78. return AjaxResult.success(homePageService.homePageMap());
  79. }
  80. /**
  81. * 首页所有塔地图
  82. */
  83. @GetMapping("/homePageAllWindMap")
  84. public AjaxResult homePageAllWindMap() {
  85. return AjaxResult.success(homePageService.homePageAllWindMap());
  86. }
  87. @ApiOperation(value = "首页文字", notes = "首页文字")
  88. @ApiImplicitParams({})
  89. @GetMapping("/provincialEnergyInfo")
  90. public AjaxResult provincialEnergy() {
  91. // resourcesOverview: '黑龙江处于高纬度地区,日照强度较大,太阳能转换率较高,为开发太阳能源提供了有理条件。特别是大兴安岭一带常年受到东亚西风带影响,具有风速大,气候干燥特点,与同维度地图相比,风资源更丰富,利于风能资源的开发与利用。'
  92. //全省场站坐标、信息
  93. // provinceInfo:{//全省信息
  94. // fNum:'100',
  95. // fHours:'2496h',
  96. // gNum:'41',
  97. // gHours:'1620h'
  98. // }
  99. return AjaxResult.success(homePageService.getResourcesOverview());
  100. }
  101. @ApiOperation(value = "全省资源数据", notes = "全省资源数据")
  102. @ApiImplicitParams({})
  103. @GetMapping("/hauFuInfo")
  104. public AjaxResult hauFuInfo() {
  105. return AjaxResult.success(homePageService.getProvincialEnergyStations());
  106. }
  107. @ApiOperation(value = "华富前期信息", notes = "华富前期查询")
  108. @ApiImplicitParams({})
  109. @GetMapping("/projectInfo")
  110. public AjaxResult projectInfo() {
  111. return AjaxResult.success(homePageService.getProjectSort());
  112. }
  113. //TODO 参数不一定
  114. @ApiOperation(value = "前期项目塔坐标以及周边风机坐标", notes = "前期项目塔坐标以及周边风机坐标查询")
  115. @ApiImplicitParams({
  116. @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataType = "String"),
  117. })
  118. @GetMapping("/projectMapInfo")
  119. public AjaxResult projectMapInfo(String projectId) {
  120. return AjaxResult.success(homePageService.projectMapInfo(projectId));
  121. }
  122. @ApiOperation(value = "所有项目下拉框", notes = "所有项目下拉框查询")
  123. @ApiImplicitParams({
  124. })
  125. @GetMapping("/projectSelect")
  126. public AjaxResult projectSelect() {
  127. return AjaxResult.success(homePageService.projectSelect());
  128. }
  129. @ApiOperation(value = "项目进展情况", notes = "查询项目进展情况")
  130. @ApiImplicitParams({
  131. @ApiImplicitParam(name = "项目编号", value = "projectId", paramType = "query", dataType = "String"),
  132. })
  133. @GetMapping("/projectEvolve")
  134. public AjaxResult projectEvolve(String projectId) {
  135. return AjaxResult.success(homePageService.getProjectEvolve(projectId));
  136. }
  137. @ApiOperation(value = "场站总体信息", notes = "查询场站总体信息")
  138. @ApiImplicitParams({
  139. })
  140. @GetMapping("/stationTotalityInfo")
  141. public AjaxResult stationTotalityInfo() {
  142. return AjaxResult.success(homePageService.getStationTotalityInfo());
  143. }
  144. @ApiOperation(value = "场站信息(杨总数据)", notes = "计算风机台数、风机机型、风机点位坐标、塔坐标")
  145. @ApiImplicitParams({
  146. @ApiImplicitParam(name = "场站id", value = "stationId", paramType = "query", dataType = "String"),
  147. })
  148. @GetMapping("/stationInfo")
  149. public AjaxResult stationInfo(String stationId) {
  150. // ----{杨总数据},计算风机台数、风机机型、风机点位坐标、塔坐标
  151. return AjaxResult.success(homePageService.getStationInfo(stationId));
  152. }
  153. @ApiOperation(value = "场站下拉框", notes = "获取场站信息下拉框")
  154. @ApiImplicitParams({
  155. })
  156. @GetMapping("/api/stationSelect")
  157. public AjaxResult stationSelect() {
  158. // label: 依兰四期
  159. // value : 项目id
  160. // towerInfo:[{label:‘依兰四起06171’value:‘006171’},{label:value}]
  161. return AjaxResult.success();
  162. }
  163. }