FileExcelController.java 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. package com.xintong.visualinspection.controller;
  2. import java.text.ParseException;
  3. import java.text.SimpleDateFormat;
  4. import java.util.Date;
  5. import java.util.List;
  6. import javax.servlet.http.HttpServletRequest;
  7. import javax.servlet.http.HttpServletResponse;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.web.bind.annotation.RequestBody;
  10. import org.springframework.web.bind.annotation.RequestMapping;
  11. import org.springframework.web.bind.annotation.RequestMethod;
  12. import org.springframework.web.bind.annotation.RequestParam;
  13. import org.springframework.web.bind.annotation.RestController;
  14. import com.xintong.visualinspection.bean.StatisticsBean;
  15. import com.xintong.visualinspection.service.StatisticsService;
  16. /**
  17. * 文件名:StatisticsController
  18. * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
  19. */
  20. @RestController
  21. @RequestMapping("/file")
  22. public class FileExcelController extends BaseController {
  23. @Autowired
  24. private StatisticsService statisticsService;
  25. /**
  26. * 温馨服务考核情况反馈表(所有员工排名)
  27. * @return
  28. * String
  29. * @exception
  30. * @since 1.0.0
  31. */
  32. @RequestMapping(value = "/employee/order",method=RequestMethod.GET)
  33. public String getEmployeeOrder(HttpServletRequest req,HttpServletResponse resp,
  34. @RequestParam Long dept_id,
  35. @RequestParam String start_date,@RequestParam String end_date,
  36. @RequestParam String start_score,@RequestParam String end_score){
  37. StatisticsBean obj = new StatisticsBean();
  38. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );
  39. try {
  40. Date start = sdf.parse(start_date);
  41. Date end = sdf.parse(end_date);
  42. obj.setDept_id(dept_id);
  43. obj.setStart_date(start);
  44. obj.setEnd_date(end);
  45. obj.setStart_score(start_score);
  46. obj.setEnd_score(end_score);
  47. } catch (ParseException e) {
  48. e.printStackTrace();
  49. }
  50. statisticsService.getEmployeeCheckedInfo(obj, req, resp);
  51. return super.returnSuccessResult(null);
  52. }
  53. /**
  54. * 温馨服务检查千分考核扣分情况汇总表
  55. * @param obj
  56. * @return
  57. */
  58. @RequestMapping(value = "/score/info",method=RequestMethod.GET)
  59. public String getScoreInfo(HttpServletRequest req,HttpServletResponse resp,
  60. @RequestParam String start_date,@RequestParam String end_date){
  61. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );
  62. StatisticsBean obj = new StatisticsBean();
  63. try {
  64. Date start = sdf.parse(start_date);
  65. Date end = sdf.parse(end_date);
  66. obj.setStart_date(start);
  67. obj.setEnd_date(end);
  68. } catch (ParseException e) {
  69. e.printStackTrace();
  70. }
  71. statisticsService.getFeeStationCheckedScore(obj, req, resp);
  72. return super.returnSuccessResult(null);
  73. }
  74. /**
  75. * 温馨服务检查情况统计表
  76. */
  77. @RequestMapping(value = "/score/item/info",method=RequestMethod.GET)
  78. public String getScoreItemInfo(HttpServletRequest req,HttpServletResponse resp,
  79. @RequestParam String start_date,@RequestParam String end_date){
  80. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );
  81. StatisticsBean obj = new StatisticsBean();
  82. try {
  83. Date start = sdf.parse(start_date);
  84. Date end = sdf.parse(end_date);
  85. obj.setStart_date(start);
  86. obj.setEnd_date(end);
  87. } catch (ParseException e) {
  88. e.printStackTrace();
  89. }
  90. statisticsService.getFeeStationCheckItemScore(obj, req, resp);
  91. return super.returnSuccessResult(null);
  92. }
  93. }