ShowChartsController.java 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. package com.controller;
  2. import com.model.pojo.RepEntity;
  3. import com.model.vo.configVo.*;
  4. import com.server.*;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.web.bind.annotation.RequestBody;
  7. import org.springframework.web.bind.annotation.RequestHeader;
  8. import org.springframework.web.bind.annotation.RequestMapping;
  9. import org.springframework.web.bind.annotation.RestController;
  10. import java.sql.SQLException;
  11. @RestController
  12. public class ShowChartsController {
  13. @Autowired
  14. ShowHistogramService showHistogramService;
  15. @Autowired
  16. ShowPieService showPieService;
  17. @Autowired
  18. ShowLineService showLineService;
  19. @Autowired
  20. ShowScatterService showScatterService;
  21. @Autowired
  22. ShowIndividualService showIndividualService;
  23. @Autowired
  24. ShowPopulationService showPopulationService;
  25. @Autowired
  26. ColumnScreenService columnScreenService;
  27. /*
  28. 展示柱状图
  29. */
  30. @CheckToken
  31. @RequestMapping("/showHistogram")
  32. public RepEntity showHistogram(@RequestHeader String token,@RequestBody HistogramConfigInfo body){
  33. return showHistogramService.showHistogram(body);
  34. }
  35. /*
  36. 展示饼图
  37. */
  38. @CheckToken
  39. @RequestMapping("/showPie")
  40. public RepEntity showPie(@RequestHeader String token,@RequestBody PieConfigInfo body){
  41. return showPieService.showPie(body);
  42. }
  43. /*
  44. 展示Line
  45. */
  46. @CheckToken
  47. @RequestMapping("/showLine")
  48. public RepEntity showLine(@RequestHeader String token,@RequestBody LineConfigInfo body){
  49. return showLineService.showLine(body);
  50. }
  51. /*
  52. showScatter
  53. */
  54. @CheckToken
  55. @RequestMapping("/showScatter")
  56. public RepEntity showScatter(@RequestHeader String token,@RequestBody ScatterConfigInfo body){
  57. return showScatterService.showScatter(body);
  58. }
  59. /*
  60. show个体统计表
  61. */
  62. @CheckToken
  63. @RequestMapping("/showIndividual")
  64. public RepEntity showIndividual(@RequestHeader String token,@RequestBody IndividualConfigInfo body){
  65. return showIndividualService.showIndividual(body);
  66. }
  67. /*
  68. show总体统计表
  69. */
  70. @CheckToken
  71. @RequestMapping("/showPopulation")
  72. public RepEntity showPopulation(@RequestHeader String token,@RequestBody PopulationInfo body) throws SQLException {
  73. return showPopulationService.showPopulation(body);
  74. }
  75. /*
  76. 展示单列数据
  77. */
  78. @CheckToken
  79. @RequestMapping("/showScreenData")
  80. public RepEntity showScreenData(@RequestHeader String token,@RequestBody ColumnScreenInfo body){
  81. return columnScreenService.getScreenData(body);
  82. }
  83. }