package com.web.report.controller; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import com.app.base.control.WebController; import com.app.base.data.ApiResponseResult; import com.web.report.service.ReportPhaseTwoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @Api(description = "二期报表") @CrossOrigin @ControllerAdvice //@RestController @Controller @RequestMapping(value = "/report_two") public class ReportPhaseTwoController extends WebController { @Autowired private ReportPhaseTwoService reportPhaseTwoService; @RequestMapping(value = "/toOCV") public String toOCV(){ return "/report2/ocv1"; } @ApiOperation(value = "获取OCV数据报表", notes = "获取OCV数据报表", hidden = true) @RequestMapping(value = "/getOCVList", method = RequestMethod.GET) @ResponseBody public ApiResponseResult getOCVList(String itemNo,String modelNo, String begTime, String endTime) { try { ApiResponseResult result = reportPhaseTwoService.getOCVList(itemNo,modelNo,begTime, endTime); logger.debug("获取OCV数据报表:" + result); return result; } catch (Exception e) { e.printStackTrace(); logger.error("获取OCV数据报表失败!", e); return ApiResponseResult.failure("获取OCV数据报表失败!"); } } }