AnalysisController.java 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. package cn.gyee.tamplate.controller.analysis;
  2. import cn.gyee.tamplate.model.operation.Operation;
  3. import cn.gyee.tamplate.model.vo.AnalsisUpdateVo;
  4. import cn.gyee.tamplate.model.vo.AnalysisMainVo;
  5. import cn.gyee.tamplate.model.vo.BdzVo;
  6. import cn.gyee.tamplate.service.analysis.AnalysisService;
  7. import cn.gyee.tamplate.util.common.StringUtils;
  8. import io.swagger.models.auth.In;
  9. import oracle.jdbc.proxy.annotation.Post;
  10. import org.springframework.web.bind.annotation.*;
  11. import javax.annotation.Resource;
  12. import java.util.List;
  13. /**
  14. * @ClassName : AnalysisController
  15. * @Author : xieshengjie
  16. * @Date: 2021/3/8 12:11
  17. * @Description : 统计分析controller
  18. */
  19. @RestController
  20. @RequestMapping("//analysis")
  21. public class AnalysisController {
  22. @Resource
  23. private AnalysisService analysisService;
  24. /**
  25. * 首页list
  26. * @param beginDate
  27. * @param endDate
  28. * @return
  29. */
  30. @GetMapping("/list")
  31. @ResponseBody
  32. @CrossOrigin(origins = "*", maxAge = 3600)
  33. public List<AnalysisMainVo> list(
  34. @RequestParam(value = "beginDate",required = true)String beginDate,
  35. @RequestParam(value = "endDate",required = true)String endDate){
  36. List<AnalysisMainVo> resultList = analysisService.analysismainlist(beginDate,endDate);
  37. return resultList;
  38. }
  39. /**
  40. * 表底查询
  41. * @param theday
  42. * @param wpid
  43. * @return
  44. * @throws Exception
  45. */
  46. @GetMapping("/bczlist")
  47. @ResponseBody
  48. @CrossOrigin(origins = "*", maxAge = 3600)
  49. public List<Object> bczlist(
  50. @RequestParam(value = "theday",required = true)String theday,
  51. @RequestParam(value = "wpid",required = true)String wpid) throws Exception {
  52. List<Object> bdzlist = analysisService.bdzlist(theday, wpid);
  53. return bdzlist;
  54. }
  55. /**
  56. * 表底值修改
  57. * @param bdzVo
  58. */
  59. @PostMapping("/bczupdate")
  60. @CrossOrigin(origins = "*", maxAge = 3600)
  61. public void bczupdate(@RequestBody List<BdzVo> bdzVo) {
  62. if (StringUtils.isNotEmpty(bdzVo))
  63. analysisService.updateBdz(bdzVo);
  64. }
  65. @GetMapping("/tjfxlist")
  66. @ResponseBody
  67. @CrossOrigin(origins = "*", maxAge = 3600)
  68. public List<Object> tjfxlist(
  69. @RequestParam(value = "theday",required = true)String theday,
  70. @RequestParam(value = "wpid",required = true)String wpid,
  71. @RequestParam(value = "identity",required = true) Integer identity) {
  72. List<Object> tjfxlist = analysisService.tjfxlist(theday, wpid, identity);
  73. return tjfxlist;
  74. }
  75. /**
  76. * 统计分析修改
  77. * @param vos
  78. */
  79. @PostMapping("/tjfxupdate")
  80. @CrossOrigin(origins = "*", maxAge = 3600)
  81. public void tjfxupdate(@RequestBody List<AnalsisUpdateVo> vos) {
  82. if (StringUtils.isNotEmpty(vos))
  83. analysisService.updateTjfx(vos);
  84. }
  85. }