WindDirectionController.java 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package com.gyee.runeconomy.controller.WindDirection;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.gyee.runeconomy.dto.result.JsonResult;
  4. import com.gyee.runeconomy.dto.result.ResultCode;
  5. import com.gyee.runeconomy.service.WindDirection.WindDirectionService;
  6. import com.gyee.runeconomy.service.WindDirection.WindMachineService;
  7. import org.springframework.web.bind.annotation.*;
  8. import javax.annotation.Resource;
  9. import java.text.ParseException;
  10. @RestController
  11. @CrossOrigin
  12. @RequestMapping("/winddirecton")
  13. public class WindDirectionController {
  14. @Resource
  15. private WindDirectionService windDirectionService;
  16. @Resource
  17. private WindMachineService windMachineService;
  18. /***
  19. * 风速风向频次玫瑰图
  20. * @return
  21. */
  22. @GetMapping("/roses")
  23. public JSONObject fsRoses(String wtid,String kssj,String jssj) throws Exception {
  24. Object o = windDirectionService.fxRoses(wtid, kssj, jssj);
  25. return JsonResult.successData(ResultCode.SUCCESS, o);
  26. }
  27. /**
  28. * 对风偏差分析
  29. * @return
  30. */
  31. @GetMapping("/deviation/ratio")
  32. public JSONObject fsDeviationRatio(String wtid,String kssj,String jssj) throws ParseException {
  33. Object o = windDirectionService.windDeviationRatio(wtid, kssj, jssj);
  34. return JsonResult.successData(ResultCode.SUCCESS, o);
  35. }
  36. /**
  37. * 单机偏差分析
  38. * @return
  39. */
  40. @GetMapping("/machine")
  41. public JSONObject Deviationmachine(String wpid) throws Exception {
  42. Object o = windMachineService.machine(wpid);
  43. return JsonResult.successData(ResultCode.SUCCESS, o);
  44. }
  45. }