WindDeviationController.java 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package com.gyee.runeconomy.controller;
  2. import com.gyee.common.model.StringUtils;
  3. import com.gyee.runeconomy.dto.R;
  4. import com.gyee.runeconomy.dto.ResultMsg;
  5. import com.gyee.runeconomy.model.vo.ProEconEquipmentInfoDay4Vo;
  6. import com.gyee.runeconomy.service.WindDeviationService;
  7. import io.swagger.annotations.Api;
  8. import io.swagger.annotations.ApiOperation;
  9. import org.springframework.stereotype.Controller;
  10. import org.springframework.web.bind.annotation.GetMapping;
  11. import org.springframework.web.bind.annotation.RequestMapping;
  12. import org.springframework.web.bind.annotation.RequestParam;
  13. import org.springframework.web.bind.annotation.ResponseBody;
  14. import javax.annotation.Resource;
  15. import java.util.List;
  16. import java.util.Map;
  17. @Controller
  18. @RequestMapping("/winddeviation")
  19. @Api(value = "曲线对风偏差", tags = "曲线对风偏差")
  20. public class WindDeviationController {
  21. @Resource
  22. private WindDeviationService windDeviationService;
  23. /**
  24. * 查询曲线对风偏差
  25. *
  26. * @return
  27. */
  28. @GetMapping("/getDeviationValue")
  29. @ResponseBody
  30. @ApiOperation(value = "曲线对风偏差", notes = "曲线对风偏差")
  31. public R getDeviationValue(
  32. @RequestParam(value = "wtId", required = true) String wtId ,
  33. @RequestParam(value = "recorddate", required = true) String recorddate) throws Exception {
  34. Map<String, Object> result= windDeviationService.getDeviationValue(wtId,recorddate);
  35. if (StringUtils.isNotNull(result)) {
  36. return R.data(ResultMsg.ok(result));
  37. } else {
  38. return R.error(ResultMsg.error());
  39. }
  40. }
  41. /**
  42. * 查询区间曲线偏差率
  43. *
  44. * @return
  45. */
  46. @GetMapping("/queryEquipmentInfoDay4")
  47. @ResponseBody
  48. @ApiOperation(value = "查询区间曲线偏差率", notes = "查询区间曲线偏差率")
  49. public R queryEquipmentInfoDay4(
  50. @RequestParam(value = "wpId", required = true) String wpId ,
  51. @RequestParam(value = "recorddate", required = true) String recorddate) throws Exception {
  52. List<ProEconEquipmentInfoDay4Vo> result= windDeviationService.queryEquipmentInfoDay4(wpId,recorddate);
  53. if (StringUtils.isNotNull(result)) {
  54. return R.data(ResultMsg.ok(result));
  55. } else {
  56. return R.error(ResultMsg.error());
  57. }
  58. }
  59. }