LeaderboardController.java 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. package com.gyee.runeconomy.controller;
  2. import com.baomidou.mybatisplus.core.toolkit.StringUtils;
  3. import com.gyee.runeconomy.config.AjaxStatus;
  4. import com.gyee.runeconomy.dto.AjaxResult;
  5. import com.gyee.runeconomy.dto.SawVo;
  6. import com.gyee.runeconomy.model.auto.Curvefittingmain;
  7. import com.gyee.runeconomy.model.auto.Curvefittingmonthmain;
  8. import com.gyee.runeconomy.model.vo.Tablepar;
  9. import com.gyee.runeconomy.service.auto.impl.LeaderboardService;
  10. import com.gyee.runeconomy.util.DateUtils;
  11. import io.swagger.annotations.Api;
  12. import io.swagger.annotations.ApiImplicitParam;
  13. import io.swagger.annotations.ApiImplicitParams;
  14. import io.swagger.annotations.ApiOperation;
  15. import org.springframework.stereotype.Controller;
  16. import org.springframework.web.bind.annotation.*;
  17. import javax.annotation.Resource;
  18. import java.util.*;
  19. @Controller
  20. @RequestMapping("/leaderboard")
  21. @Api(value = "排行榜功能",tags = "排行榜功能")
  22. public class LeaderboardController {
  23. @Resource
  24. private LeaderboardService leaderboardService;
  25. /**查询拟合优度列表**/
  26. // @PostMapping("/fittingtoplist")
  27. // @ResponseBody
  28. // @ApiOperation(value = "查询拟合优度列表", notes = "查询拟合优度列表")
  29. // @ApiImplicitParams({
  30. // @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
  31. // @ApiImplicitParam(name = "wpIps", value = "风场编号", required = true, dataType = "string", paramType = "query"),
  32. // @ApiImplicitParam(name = "beginDate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
  33. // @ApiImplicitParam(name = "endDate", value = "结束日期", required = true, dataType = "string", paramType = "query")})
  34. //
  35. // public AjaxResult fittingtoplist(@RequestBody Tablepar tablepar, String wpIps, String beginDate, String endDate) {
  36. //
  37. // Date beginDate_d=null;
  38. // Date endDate_d=null;
  39. // if (StringUtils.isNotEmpty(beginDate))
  40. // {
  41. // beginDate_d= DateUtils.parseDate(beginDate);
  42. // }
  43. // if (StringUtils.isNotEmpty(endDate))
  44. // {
  45. // endDate_d= DateUtils.parseDate(endDate);
  46. // }
  47. // List<StatisticalAnalysisTopVo> vos= leaderboardService.getRnewTopDate(wpIps, beginDate_d, endDate_d);
  48. //
  49. // for (StatisticalAnalysisTopVo vo : vos) {
  50. // if (vo.getPower() > 1) {
  51. // vo.setPower(1.0);
  52. // }
  53. // }
  54. //
  55. // if (tablepar.getOrderByColumn().equals("power")) {
  56. // if (tablepar.getIsAsc().equals("asc")) {
  57. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  58. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  59. // return arg0.getPower().compareTo(arg1.getPower());
  60. // }
  61. //
  62. // });
  63. //
  64. // } else {
  65. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  66. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  67. // return arg1.getPower().compareTo(arg0.getPower());
  68. // }
  69. //
  70. // });
  71. // }
  72. // } else if (tablepar.getOrderByColumn().equals("speed")) {
  73. // if (tablepar.getIsAsc().equals("asc")) {
  74. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  75. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  76. // return arg0.getSpeed().compareTo(arg1.getSpeed());
  77. // }
  78. //
  79. // });
  80. //
  81. // } else {
  82. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  83. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  84. // return arg1.getSpeed().compareTo(arg0.getSpeed());
  85. // }
  86. //
  87. // });
  88. // }
  89. // }
  90. //
  91. // if (vos != null && !vos.isEmpty()) {
  92. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  93. // } else {
  94. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  95. // }
  96. //
  97. // }
  98. /**查询拟合优度图表**/
  99. // @GetMapping("/fittingtopchart")
  100. // @ResponseBody
  101. // @ApiOperation(value = "查询拟合优度图表", notes = "查询拟合优度图表")
  102. // @ApiImplicitParams({
  103. // @ApiImplicitParam(name = "wtIds", value = "风机编号", required = true, dataType = "string", paramType = "query"),
  104. // @ApiImplicitParam(name = "beginDate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
  105. // @ApiImplicitParam(name = "endDate", value = "结束日期", required = true, dataType = "string", paramType = "query")})
  106. //
  107. // public AjaxResult fittingtopchart(String wtIds, String beginDate, String endDate) throws Exception {
  108. // Date beginDate_d=null;
  109. // Date endDate_d=null;
  110. // if (StringUtils.isNotEmpty(beginDate))
  111. // {
  112. // beginDate_d= DateUtils.parseDate(beginDate);
  113. // }
  114. // if (StringUtils.isNotEmpty(endDate))
  115. // {
  116. // endDate_d= DateUtils.parseDate(endDate);
  117. // }
  118. // Map<String, List> map =new HashMap<>();
  119. // if (StringUtils.notEmp(wtIds) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
  120. // map = leaderboardService.fittingtopchart(wtIds, beginDate_d, endDate_d);
  121. // }
  122. //
  123. // if (map != null && !map.isEmpty()) {
  124. // return AjaxResult.successData(AjaxStatus.success.code, map);
  125. // } else {
  126. // return AjaxResult.successData(AjaxStatus.success.code, map);
  127. // }
  128. // }
  129. /**查询总发电量排行列表**/
  130. // @PostMapping("/totalPowerCapacityTopList")
  131. // @ResponseBody
  132. // @ApiOperation(value = "查询总发电量排行列表", notes = "查询总发电量排行列表")
  133. // @ApiImplicitParams({
  134. // @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
  135. // @ApiImplicitParam(name = "wpIps", value = "风场编号", required = true, dataType = "string", paramType = "query"),
  136. // @ApiImplicitParam(name = "beginDate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
  137. // @ApiImplicitParam(name = "endDate", value = "结束日期", required = true, dataType = "string", paramType = "query")})
  138. //
  139. // public AjaxResult totalPowerCapacityTopList(@RequestBody Tablepar tablepar, String wpIps, String beginDate, String endDate) {
  140. //
  141. // Date beginDate_d=null;
  142. // Date endDate_d=null;
  143. // if (StringUtils.isNotEmpty(beginDate))
  144. // {
  145. // beginDate_d= DateUtils.parseDate(beginDate);
  146. // }
  147. // if (StringUtils.isNotEmpty(endDate))
  148. // {
  149. // endDate_d= DateUtils.parseDate(endDate);
  150. // }
  151. // List<StatisticalAnalysisTopVo> vos= leaderboardService.totalPowerCapacityTopList(wpIps, beginDate_d, endDate_d);
  152. //
  153. //
  154. // if (tablepar.getOrderByColumn().equals("power")) {
  155. // if (tablepar.getIsAsc().equals("asc")) {
  156. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  157. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  158. // return arg0.getPower().compareTo(arg1.getPower());
  159. // }
  160. //
  161. // });
  162. //
  163. // } else {
  164. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  165. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  166. // return arg1.getPower().compareTo(arg0.getPower());
  167. // }
  168. //
  169. // });
  170. // }
  171. // } else if (tablepar.getOrderByColumn().equals("speed")) {
  172. // if (tablepar.getIsAsc().equals("asc")) {
  173. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  174. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  175. // return arg0.getSpeed().compareTo(arg1.getSpeed());
  176. // }
  177. //
  178. // });
  179. //
  180. // } else {
  181. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  182. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  183. // return arg1.getSpeed().compareTo(arg0.getSpeed());
  184. // }
  185. //
  186. // });
  187. // }
  188. // } else if (tablepar.getOrderByColumn().equals("generatingcapacity")) {
  189. // if (tablepar.getIsAsc().equals("asc")) {
  190. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  191. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  192. // return arg0.getSpeed().compareTo(arg1.getSpeed());
  193. // }
  194. //
  195. // });
  196. //
  197. // } else {
  198. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  199. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  200. // return arg1.getSpeed().compareTo(arg0.getSpeed());
  201. // }
  202. //
  203. // });
  204. // }
  205. // }
  206. //
  207. // if (vos != null && !vos.isEmpty()) {
  208. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  209. // } else {
  210. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  211. // }
  212. //
  213. // }
  214. /**查询利用率排行榜列表**/
  215. // @PostMapping("/utilizationList")
  216. // @ResponseBody
  217. // @ApiOperation(value = "查询总发电量排行列表", notes = "查询总发电量排行列表")
  218. // @ApiImplicitParams({
  219. // @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
  220. // @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
  221. // @ApiImplicitParam(name = "beginDate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
  222. // @ApiImplicitParam(name = "endDate", value = "结束日期", required = true, dataType = "string", paramType = "query"),
  223. // @ApiImplicitParam(name = "type", value = "类型 0:风场,1:项目,2:线路,3:风机,", required = true, dataType = "string", paramType = "query")})
  224. //
  225. // public AjaxResult utilizationList(@RequestBody Tablepar tablepar, String wpId, String beginDate, String endDate,String type) {
  226. //
  227. // Date beginDate_d=null;
  228. // Date endDate_d=null;
  229. // if (StringUtils.isNotEmpty(beginDate))
  230. // {
  231. // beginDate_d= DateUtils.parseDate(beginDate);
  232. // }
  233. // if (StringUtils.isNotEmpty(endDate))
  234. // {
  235. // endDate_d= DateUtils.parseDate(endDate);
  236. // }
  237. //
  238. // List<Windturbineinfoday3> vos= leaderboardService.utilizationList(tablepar, wpId, beginDate_d, endDate_d, type);
  239. //
  240. //
  241. // if (vos != null && !vos.isEmpty()) {
  242. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  243. // } else {
  244. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  245. // }
  246. //
  247. // }
  248. /**查询损失率排行榜列表**/
  249. // @PostMapping("/lossList")
  250. // @ResponseBody
  251. // @ApiOperation(value = "查询损失率排行榜列表", notes = "查询损失率排行榜列表")
  252. // @ApiImplicitParams({
  253. // @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
  254. // @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
  255. // @ApiImplicitParam(name = "beginDate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
  256. // @ApiImplicitParam(name = "endDate", value = "结束日期", required = true, dataType = "string", paramType = "query"),
  257. // @ApiImplicitParam(name = "type", value = "类型 0:风场,1:项目,2:线路,3:风机,", required = true, dataType = "string", paramType = "query")})
  258. //
  259. // public AjaxResult lossList(@RequestBody Tablepar tablepar, String wpId, String beginDate, String endDate,String type) {
  260. //
  261. // Date beginDate_d=null;
  262. // Date endDate_d=null;
  263. // if (StringUtils.isNotEmpty(beginDate))
  264. // {
  265. // beginDate_d= DateUtils.parseDate(beginDate);
  266. // }
  267. // if (StringUtils.isNotEmpty(endDate))
  268. // {
  269. // endDate_d= DateUtils.parseDate(endDate);
  270. // }
  271. // List<Windturbineinfoday3> vos= leaderboardService.lossList(tablepar, wpId, beginDate_d, endDate_d, type);
  272. //
  273. //
  274. // if (vos != null && !vos.isEmpty()) {
  275. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  276. // } else {
  277. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  278. // }
  279. //
  280. // }
  281. /**查询负荷率排行榜列表**/
  282. // @PostMapping("/loadfactortoplist")
  283. // @ResponseBody
  284. // @ApiOperation(value = "查询负荷率排行榜列表", notes = "查询负荷率排行榜列表")
  285. // @ApiImplicitParams({
  286. // @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
  287. // @ApiImplicitParam(name = "type", value = "类型 0:风场,1:项目,2:线路,3:风机,", required = true, dataType = "string", paramType = "query"),
  288. // @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
  289. // @ApiImplicitParam(name = "beginDate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
  290. // @ApiImplicitParam(name = "endDate", value = "结束日期", required = true, dataType = "string", paramType = "query")})
  291. //
  292. // public AjaxResult loadfactortoplist(@RequestBody Tablepar tablepar,String type, String wpId, String beginDate, String endDate) {
  293. //
  294. //
  295. // Date beginDate_d=null;
  296. // Date endDate_d=null;
  297. // if (StringUtils.isNotEmpty(beginDate))
  298. // {
  299. // beginDate_d= DateUtils.parseDate(beginDate);
  300. // }
  301. // if (StringUtils.isNotEmpty(endDate))
  302. // {
  303. // endDate_d= DateUtils.parseDate(endDate);
  304. // }
  305. // List<StatisticalAnalysisTopVo> vos= leaderboardService.loadfactortoplist(type, wpId, beginDate_d, endDate_d);
  306. //
  307. // if (null!=tablepar.getOrderByColumn() && tablepar.getOrderByColumn().equals("power")) {
  308. // if (tablepar.getIsAsc().equals("asc")) {
  309. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  310. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  311. // return arg0.getPower().compareTo(arg1.getPower());
  312. // }
  313. //
  314. // });
  315. //
  316. // } else {
  317. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  318. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  319. // return arg1.getPower().compareTo(arg0.getPower());
  320. // }
  321. //
  322. // });
  323. // }
  324. // } else if (null!=tablepar.getOrderByColumn() &&tablepar.getOrderByColumn().equals("speed")) {
  325. // if (tablepar.getIsAsc().equals("asc")) {
  326. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  327. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  328. // return arg0.getSpeed().compareTo(arg1.getSpeed());
  329. // }
  330. //
  331. // });
  332. //
  333. // } else {
  334. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  335. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  336. // return arg1.getSpeed().compareTo(arg0.getSpeed());
  337. // }
  338. //
  339. // });
  340. // }
  341. // } else if (null!=tablepar.getOrderByColumn() &&tablepar.getOrderByColumn().equals("generatingcapacity")) {
  342. // if (tablepar.getIsAsc().equals("asc")) {
  343. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  344. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  345. // return arg0.getSpeed().compareTo(arg1.getSpeed());
  346. // }
  347. //
  348. // });
  349. //
  350. // } else {
  351. // Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
  352. // public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
  353. // return arg1.getSpeed().compareTo(arg0.getSpeed());
  354. // }
  355. //
  356. // });
  357. // }
  358. // }
  359. //
  360. //
  361. // if (vos != null && !vos.isEmpty()) {
  362. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  363. // } else {
  364. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  365. // }
  366. //
  367. // }
  368. /**查询报警排行榜列表**/
  369. // @PostMapping("/querywarningStatistical")
  370. // @ResponseBody
  371. // @ApiOperation(value = "查询报警排行榜列表", notes = "查询报警排行榜列表")
  372. // @ApiImplicitParams({
  373. // @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
  374. // @ApiImplicitParam(name = "type", value = "类型 1报警:,2:报警类型,3:厂家", required = true, dataType = "string", paramType = "query"),
  375. // @ApiImplicitParam(name = "beginDate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
  376. // @ApiImplicitParam(name = "endDate", value = "结束日期", required = true, dataType = "string", paramType = "query")})
  377. //
  378. // public AjaxResult querywarningStatistical(@RequestBody Tablepar tablepar, String type, String beginDate, String endDate) {
  379. //
  380. // Date beginDate_d=null;
  381. // Date endDate_d=null;
  382. // if (StringUtils.isNotEmpty(beginDate))
  383. // {
  384. // beginDate_d= DateUtils.parseDate(beginDate);
  385. // }
  386. // if (StringUtils.isNotEmpty(endDate))
  387. // {
  388. // endDate_d= DateUtils.parseDate(endDate);
  389. // }
  390. // List<SawVo> vos= leaderboardService.getWarningTopDate( tablepar, type, beginDate_d, endDate_d);
  391. //
  392. //
  393. // if (vos != null && !vos.isEmpty()) {
  394. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  395. // } else {
  396. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  397. // }
  398. //
  399. // }
  400. /**查询报警排行榜图表**/
  401. // @GetMapping("/querywarningStatisticalPie")
  402. // @ResponseBody
  403. // @ApiOperation(value = "查询报警排行榜列表", notes = "查询报警排行榜列表")
  404. // @ApiImplicitParams({
  405. //
  406. // @ApiImplicitParam(name = "type", value = "类型 1报警:,2:报警类型,3:厂家", required = true, dataType = "string", paramType = "query"),
  407. // @ApiImplicitParam(name = "beginDate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
  408. // @ApiImplicitParam(name = "endDate", value = "结束日期", required = true, dataType = "string", paramType = "query")})
  409. //
  410. // public AjaxResult querywarningStatisticalPie(String type, String beginDate, String endDate) {
  411. //
  412. // Date beginDate_d=null;
  413. // Date endDate_d=null;
  414. // if (StringUtils.isNotEmpty(beginDate))
  415. // {
  416. // beginDate_d= DateUtils.parseDate(beginDate);
  417. // }
  418. // if (StringUtils.isNotEmpty(endDate))
  419. // {
  420. // endDate_d= DateUtils.parseDate(endDate);
  421. // }
  422. // List<SawVo> vos=
  423. // leaderboardService.getWarningTopDatePercentage( type, beginDate_d, endDate_d);
  424. //
  425. //
  426. // if (vos != null && !vos.isEmpty()) {
  427. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  428. // } else {
  429. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  430. // }
  431. //
  432. // }
  433. /*******************************************************************************************************************************/
  434. /**查询日曲线偏差率列表**/
  435. @PostMapping("/curvefittingmainList")
  436. @ResponseBody
  437. @ApiOperation(value = "查询日曲线偏差率列表", notes = "查询日曲线偏差率列表")
  438. @ApiImplicitParams({
  439. @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
  440. @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
  441. @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
  442. public AjaxResult curvefittingmainList(@RequestBody Tablepar tablepar, String wpId, String recorddate) {
  443. List<Curvefittingmain> vos=new ArrayList<>();
  444. if (StringUtils.isNotEmpty(recorddate))
  445. {
  446. Date date= DateUtils.parseDate(recorddate);
  447. vos= leaderboardService.curvefittingmainList( tablepar, wpId, date);
  448. }
  449. if (vos != null && !vos.isEmpty()) {
  450. return AjaxResult.successData(AjaxStatus.success.code, vos);
  451. } else {
  452. return AjaxResult.successData(AjaxStatus.success.code, vos);
  453. }
  454. }
  455. /**查询日曲线(实际/保证 实际/最优 最优/保证)图表**/
  456. // @GetMapping("/getCurvechatAjax")
  457. // @ResponseBody
  458. // @ApiOperation(value = "查询日曲线", notes = "查询日曲线")
  459. // @ApiImplicitParams({
  460. // @ApiImplicitParam(name = "type", value = "类型 sjbz:实际/保证,sjzy:实际/最优,zybz:最优/保证", required = true, dataType = "string", paramType = "query"),
  461. // @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
  462. // @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
  463. //
  464. // public AjaxResult getCurvechatAjax(String type,String wtId, String recorddate) {
  465. // Map<String, Object> vos=new HashMap<>();
  466. // if (StringUtils.isNotEmpty(recorddate))
  467. // {
  468. // Date date= DateUtils.parseDate(recorddate);
  469. // vos= leaderboardService.getCurvechatAjax( type,wtId, date);
  470. // }
  471. //
  472. //
  473. // if (vos != null && !vos.isEmpty()) {
  474. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  475. // } else {
  476. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  477. // }
  478. // }
  479. /**查询日曲线同比图表**/
  480. // @GetMapping("/curvechatAjaxtb")
  481. // @ResponseBody
  482. // @ApiOperation(value = "查询日曲线同比图表", notes = "查询日曲线同比图表")
  483. // @ApiImplicitParams({
  484. // @ApiImplicitParam(name = "type", value = "类型 tb:同比,hb:环比,bg:标杆", required = true, dataType = "string", paramType = "query"),
  485. // @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
  486. // @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
  487. //
  488. // public AjaxResult curvechatAjaxtb(String type,String wtId, String recorddate) {
  489. //
  490. // Map<String, Object> vos=new HashMap<>();
  491. // if (StringUtils.isNotEmpty(recorddate))
  492. // {
  493. // Date date= DateUtils.parseDate(recorddate);
  494. // vos= leaderboardService.curvechatAjaxtb( type,wtId, date);
  495. // }
  496. //
  497. //
  498. // if (vos != null && !vos.isEmpty()) {
  499. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  500. // } else {
  501. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  502. // }
  503. // }
  504. /**查询日曲线环比图表**/
  505. // @GetMapping("/curvechatAjaxhb")
  506. // @ResponseBody
  507. // @ApiOperation(value = "查询日曲线环比图表", notes = "查询日曲线环比图表")
  508. // @ApiImplicitParams({
  509. // @ApiImplicitParam(name = "type", value = "类型 tb:同比,hb:环比,bg:标杆", required = true, dataType = "string", paramType = "query"),
  510. // @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
  511. // @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
  512. //
  513. // public AjaxResult curvechatAjaxhb(String type,String wtId, String recorddate) {
  514. // Map<String, Object> vos=new HashMap<>();
  515. // if (StringUtils.isNotEmpty(recorddate))
  516. // {
  517. // Date date= DateUtils.parseDate(recorddate);
  518. // vos= leaderboardService.curvechatAjaxhb( type,wtId, date);
  519. // }
  520. //
  521. //
  522. // if (vos != null && !vos.isEmpty()) {
  523. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  524. // } else {
  525. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  526. // }
  527. // }
  528. /**查询日曲线标杆图表**/
  529. // @GetMapping("/curvechatAjaxbg")
  530. // @ResponseBody
  531. // @ApiOperation(value = "查询日曲线标杆图表", notes = "查询日曲线标杆图表")
  532. // @ApiImplicitParams({
  533. // @ApiImplicitParam(name = "type", value = "类型 tb:同比,hb:环比,bg:标杆", required = true, dataType = "string", paramType = "query"),
  534. // @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
  535. // @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
  536. //
  537. // public AjaxResult curvechatAjaxbg(String type,String wtId, String recorddate) {
  538. // Map<String, Object> vos=new HashMap<>();
  539. // if (StringUtils.isNotEmpty(recorddate))
  540. // {
  541. // Date date= DateUtils.parseDate(recorddate);
  542. // vos= leaderboardService.curvechatAjaxbg( type,wtId, date);
  543. // }
  544. //
  545. //
  546. // if (vos != null && !vos.isEmpty()) {
  547. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  548. // } else {
  549. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  550. // }
  551. // }
  552. /*******************************************************************************************************************************/
  553. /**查询月曲线偏差率列表**/
  554. @PostMapping("/curvefittingmonthmainList")
  555. @ResponseBody
  556. @ApiOperation(value = "查询月曲线偏差率列表", notes = "查询月曲线偏差率列表")
  557. @ApiImplicitParams({
  558. @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
  559. @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
  560. @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
  561. @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
  562. public AjaxResult curvefittingmonthmainList(@RequestBody Tablepar tablepar, String wpId, String year,String month) {
  563. List<Curvefittingmonthmain> vos= leaderboardService.curvefittingmonthmainList( tablepar, wpId, year, month);
  564. if (vos != null && !vos.isEmpty()) {
  565. return AjaxResult.successData(AjaxStatus.success.code, vos);
  566. } else {
  567. return AjaxResult.successData(AjaxStatus.success.code, vos);
  568. }
  569. }
  570. /**查询月曲线(实际/保证 实际/最优 最优/保证)图表**/
  571. // @GetMapping("/curveMonthchatAjax")
  572. // @ResponseBody
  573. // @ApiOperation(value = "查询月曲线偏差率", notes = "查询月曲线偏差率")
  574. // @ApiImplicitParams({
  575. // @ApiImplicitParam(name = "type", value = "类型 sjbz:实际/保证,sjzy:实际/最优,zybz:最优/保证", required = true, dataType = "string", paramType = "query"),
  576. // @ApiImplicitParam(name = "wtId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
  577. // @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
  578. // @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
  579. //
  580. // public AjaxResult curveMonthchatAjax(String type,String wtId, String year,String month) {
  581. //
  582. // Map<String, Object> vos= leaderboardService.curveMonthchatAjax( type,wtId, year, month);
  583. //
  584. // if (vos != null && !vos.isEmpty()) {
  585. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  586. // } else {
  587. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  588. // }
  589. // }
  590. /**查询月曲线同比图表**/
  591. // @GetMapping("/curveMonthchatAjaxtb")
  592. // @ResponseBody
  593. // @ApiOperation(value = "查询月曲线同比图表", notes = "查询月曲线同比图表")
  594. // @ApiImplicitParams({
  595. // @ApiImplicitParam(name = "type", value = "类型 tb:同比,hb:环比,bg:标杆", required = true, dataType = "string", paramType = "query"),
  596. // @ApiImplicitParam(name = "wtId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
  597. // @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
  598. // @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
  599. //
  600. // public AjaxResult curveMonthchatAjaxtb(String type,String wtId, String year,String month) {
  601. //
  602. // Map<String, Object> vos= leaderboardService.curveMonthchatAjaxtb( type,wtId, year, month);
  603. //
  604. // if (vos != null && !vos.isEmpty()) {
  605. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  606. // } else {
  607. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  608. // }
  609. // }
  610. /**查询月曲线环比图表**/
  611. // @GetMapping("/curveMonthchatAjaxhb")
  612. // @ResponseBody
  613. // @ApiOperation(value = "查询月曲线环比图表", notes = "查询月曲线环比图表")
  614. // @ApiImplicitParams({
  615. // @ApiImplicitParam(name = "type", value = "类型 tb:同比,hb:环比,bg:标杆", required = true, dataType = "string", paramType = "query"),
  616. // @ApiImplicitParam(name = "wtId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
  617. // @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
  618. // @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
  619. //
  620. // public AjaxResult curveMonthchatAjaxhb(String type,String wtId, String year,String month) {
  621. //
  622. // Map<String, Object> vos= leaderboardService.curveMonthchatAjaxhb( type,wtId, year, month);
  623. //
  624. // if (vos != null && !vos.isEmpty()) {
  625. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  626. // } else {
  627. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  628. // }
  629. // }
  630. /**查询月曲线标杆图表**/
  631. // @GetMapping("/curveMonthchatAjaxbg")
  632. // @ResponseBody
  633. // @ApiOperation(value = "查询月曲线标杆图表", notes = "查询月曲线标杆图表")
  634. // @ApiImplicitParams({
  635. // @ApiImplicitParam(name = "type", value = "类型 tb:同比,hb:环比,bg:标杆", required = true, dataType = "string", paramType = "query"),
  636. // @ApiImplicitParam(name = "wtId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
  637. // @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
  638. // @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
  639. //
  640. // public AjaxResult curveMonthchatAjaxbg(String type,String wtId, String year,String month) {
  641. //
  642. // Map<String, Object> vos= leaderboardService.curveMonthchatAjaxbg( type,wtId, year, month);
  643. //
  644. // if (vos != null && !vos.isEmpty()) {
  645. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  646. // } else {
  647. // return AjaxResult.successData(AjaxStatus.success.code, vos);
  648. // }
  649. // }
  650. }