MouldHistoryController.java 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package com.hssx.cloudmodel.controller;
  2. import com.hssx.cloudmodel.entity.MouldHistoryTime;
  3. import com.hssx.cloudmodel.entity.vo.MouldHistoryTimeVO;
  4. import com.hssx.cloudmodel.service.MouldHistoryService;
  5. import com.hssx.cloudmodel.util.HttpRespMsg;
  6. import io.swagger.annotations.ApiOperation;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.stereotype.Controller;
  9. import org.springframework.web.bind.annotation.RequestMapping;
  10. import org.springframework.web.bind.annotation.ResponseBody;
  11. import org.springframework.web.bind.annotation.RestController;
  12. import javax.servlet.http.HttpServletRequest;
  13. import javax.servlet.http.HttpServletResponse;
  14. /**
  15. * <p>
  16. * 前端控制器
  17. * </p>
  18. *
  19. * @author 吴涛涛
  20. * @since 2019-10-11
  21. */
  22. @Controller
  23. @RequestMapping("/mouldhistory")
  24. public class MouldHistoryController {
  25. @Autowired
  26. private MouldHistoryService mouldHistoryService;
  27. /**
  28. *
  29. * 开合次数的excel导出/开合历史数据的excel导出
  30. * @param equipmentNo 设备编号
  31. * @param startTime 时间点 如:2019-02-15
  32. * @param endTime 时间点 如:2019-02-15
  33. * @param type 0-开合次数数据,1-开合历史数据
  34. * @return
  35. */
  36. @ApiOperation("开合次数的excel导出/开合历史数据的excel导出")
  37. @RequestMapping("/exportExcel")
  38. @ResponseBody
  39. public HttpRespMsg openingAndClosingTimesChart(HttpServletResponse response, String equipmentNo, String startTime, String endTime, Integer type){
  40. HttpRespMsg msg = mouldHistoryService.getOpeningAndClosingTimesChart(response,equipmentNo,startTime,endTime,type);
  41. return msg;
  42. }
  43. /**
  44. * 获取云模盒的每日开合次数周期 (时间/周期)
  45. * 参数:time 时间点 如:2019-02-15
  46. * equipmentNo 设备编号
  47. * @return
  48. */
  49. @ApiOperation("获取云模盒的开合次数周期 (时间/周期)")
  50. @RequestMapping("/openingAndClosingTimesChartCycle")
  51. @ResponseBody
  52. public HttpRespMsg openingAndClosingTimesChartCycle(String equipmentNo,String startDate, String endDate){
  53. HttpRespMsg msg = mouldHistoryService.openingAndClosingTimesChartCycle(equipmentNo, startDate, endDate);
  54. return msg;
  55. }
  56. }