NewDataFittingController.java 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. package com.gyee.runeconomy.controller;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.gyee.runeconomy.dto.result.JsonResult;
  4. import com.gyee.runeconomy.dto.result.PowerPointData;
  5. import com.gyee.runeconomy.dto.result.ResultCode;
  6. import com.gyee.runeconomy.model.auto.ProEconPowerFittingAnalySis;
  7. import com.gyee.runeconomy.model.vo.NewDataFittingVo;
  8. import com.gyee.runeconomy.service.auto.impl.NewDataFittingService;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.web.bind.annotation.*;
  11. import java.util.List;
  12. import java.util.Map;
  13. @RestController
  14. @CrossOrigin
  15. @RequestMapping("/new/power/fitting")
  16. public class NewDataFittingController {
  17. @Autowired
  18. private NewDataFittingService newDataFittingService;
  19. /**
  20. * 功率曲线拟合
  21. * @param newDataFittingVo
  22. * @return
  23. */
  24. @PostMapping("/data")
  25. public JSONObject dataFitting(@RequestBody NewDataFittingVo newDataFittingVo ) {
  26. ProEconPowerFittingAnalySis obj = newDataFittingService.newDataFitting(newDataFittingVo);
  27. return JsonResult.successData(ResultCode.SUCCESS, obj);
  28. }
  29. /**
  30. * 读取曲线,散点等数据
  31. * @param id 拟合好的数据ID
  32. * @return
  33. */
  34. // @GetMapping("curve")
  35. // public JSONObject dataFittingCurve(String id){
  36. // Map<String, Object> result = newDataFittingService.dataFittingCurve(id);
  37. // return JsonResult.successData(ResultCode.SUCCESS, result);
  38. // }
  39. /**
  40. * 通过key获取原始数据
  41. * 对应前端的圈选功能
  42. * @param yk 有用点的key
  43. * @param wk 无用点的key
  44. * @return
  45. */
  46. // @GetMapping("filter")
  47. // public JSONObject dataFittingFilter(String yk, String wk){
  48. // List<PowerPointData> list = newDataFittingService.dataOrigin(yk, wk);
  49. // return JsonResult.successData(ResultCode.SUCCESS, list);
  50. // }
  51. /**
  52. * file 文件数据展示
  53. * @param id
  54. * @return
  55. */
  56. // @GetMapping("show")
  57. // public JSONObject dataFittingShow(String id){
  58. // Map<String, Object> result = newDataFittingService.dataFittingShow(id);
  59. // return JsonResult.successData(ResultCode.SUCCESS, result);
  60. // }
  61. }