package com.whyc.controller; import com.whyc.service.ExcelService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @RequestMapping("excel") @RestController @Api("excel导出") public class ExcelController { @Autowired private ExcelService service; @GetMapping("dcReport") @ApiOperation(value = "直流报表") public void dcReport(int battGroupId, int testRecordCount, HttpServletResponse response) throws IOException { service.dcReport(battGroupId,testRecordCount,response); } }